home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jhelp.z / StockWatch.java < prev    next >
Text File  |  1997-07-30  |  3KB  |  77 lines

  1. /*
  2.  * Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
  3.  *
  4.  * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
  5.  * modify and redistribute this software in source and binary code form,
  6.  * provided that i) this copyright notice and license appear on all copies of
  7.  * the software; and ii) Licensee does not utilize the software in a manner
  8.  * which is disparaging to Sun.
  9.  *
  10.  * This software is provided "AS IS," without a warranty of any kind. ALL
  11.  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
  12.  * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
  13.  * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
  14.  * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
  15.  * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
  16.  * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
  17.  * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
  18.  * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
  19.  * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
  20.  * POSSIBILITY OF SUCH DAMAGES.
  21.  *
  22.  * This software is not designed or intended for use in on-line control of
  23.  * aircraft, air traffic, aircraft navigation or aircraft communications; or in
  24.  * the design, construction, operation or maintenance of any nuclear
  25.  * facility. Licensee represents and warrants that it will not use or
  26.  * redistribute the Software for such purposes.
  27.  */
  28.  
  29. package examples.stock;
  30.  
  31. import java.rmi.*;
  32.  
  33. /**
  34.  * The StockWatch remote interface is used to register interest in
  35.  * receiving stock updates.
  36.  */
  37. public interface StockWatch extends java.rmi.Remote {
  38.  
  39.     /**
  40.      * Request notification of stock updates.
  41.      * @param stock the stock name
  42.      * @param obj the remote object to be notified
  43.      * @return the latest update of the stock
  44.      * @exception StockNotFoundException if stock is not known
  45.      * @exception RemoteException if some communication failure occurs
  46.      */
  47.     Stock watch(String stock, StockNotify obj)
  48.     throws StockNotFoundException, RemoteException;
  49.  
  50.     /**
  51.      * Cancel request for stock updates for a particular stock.
  52.      * @param stock the stock name
  53.      * @param obj the remote object canceling the notification
  54.      * @exception RemoteException if some communication failure occurs
  55.      */
  56.     void cancel(String stock, StockNotify obj) throws RemoteException;
  57.  
  58.     /**
  59.      * Returns an array of stock update information for the stocks
  60.      * already registered by the remote object.
  61.      * @param obj the remote object
  62.      * @return the list of stocks, or null if obj is not watching any
  63.      *  stocks
  64.      * @exception RemoteException if some communication failure occurs
  65.      */
  66.     Stock[] list(StockNotify obj) throws RemoteException;
  67.  
  68.     /**
  69.      * Cancel all requests for stock updates for the remote object.
  70.      * @param obj the remote object canceling the request
  71.      * @exception RemoteException if some communication failure occurs
  72.      */
  73.     void cancelAll(StockNotify obj) throws RemoteException;
  74. }
  75.  
  76.     
  77.