1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.webservices.finance.stockmarket;
18
19 import org.apache.turbine.services.Service;
20 import java.rmi.RemoteException;
21
22 /***
23 StockQuoteService provides a web service for getting stock quotes.
24
25 @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
26 @version $Id: StockQuoteService.java,v 1.4 2004/02/23 03:15:29 jford Exp $
27 */
28
29 public interface StockQuoteService extends Service
30 {
31 /*** The name of this service */
32 public String SERVICE_NAME = "StockQuoteService";
33
34
35 /***
36 Get a single stock quote, given a symbol return the current price.
37
38 @param symbol The stock symbol.
39 @return String The current price.
40 */
41 public String quote( String symbol )
42 throws RemoteException;
43
44 /***
45 Get a single stock quote record, given a symbol return a StockQuote object.
46
47 @param symbol The stock symbol.
48 @return StockQuote A full stock quote record.
49 */
50
51 public StockQuote fullQuote( String symbol )
52 throws RemoteException;
53
54 /***
55 Get an array of quote records, given a array of stock symbols.
56
57 @param symbols[] The array of stock symbols.
58 @return StockQuote[] An array of full stock quotes for each stock symbol.
59 */
60 public StockQuote[] fullQuotes( String [] symbol )
61 throws RemoteException;
62
63 /***
64 Set the name of the web service used by this service to retrieve stock quotes.
65
66 @param service The name of the web service.
67 */
68 public void setWebService( String service );
69
70 /***
71 Get the name of the web service used by this service to retrieve stock quotes.
72
73 @return String The name of the web service.
74 */
75 public String getWebService();
76
77 }