KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > webservices > finance > stockmarket > StockQuoteService


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.webservices.finance.stockmarket;
18
19 import org.apache.turbine.services.Service;
20 import java.rmi.RemoteException JavaDoc;
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 JavaDoc 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 JavaDoc quote( String JavaDoc symbol )
42         throws RemoteException JavaDoc;
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 JavaDoc symbol )
52             throws RemoteException JavaDoc;
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 JavaDoc [] symbol )
61             throws RemoteException JavaDoc;
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 JavaDoc 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 JavaDoc getWebService();
76
77 }
78
Popular Tags