home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / ServerRef.java < prev    next >
Text File  |  1998-09-22  |  1KB  |  43 lines

  1. /*
  2.  * @(#)ServerRef.java    1.4 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.rmi.server;
  16.  
  17. import java.rmi.*;
  18.  
  19. /**
  20.  * A ServerRef represents the server-side handle for a remote object
  21.  * implementation.
  22.  */
  23. public interface ServerRef extends RemoteRef {
  24.  
  25.     /** 
  26.      * Find or create a client stub object for the supplied Remote.
  27.      * @param obj the remote object implementation
  28.      * @param data information necessary to export the object
  29.      *         (e.g. port number)
  30.      */
  31.     RemoteStub exportObject(Remote obj, Object data)
  32.     throws RemoteException;
  33.  
  34.     /**
  35.      * Return the hostname of the current client.  When called from a
  36.      * thread actively handling a remote method invocation the
  37.      * hostname of the client is returned.
  38.      * @exception ServerNotActiveException If called outside of servicing
  39.      * a remote method invocation.
  40.      */
  41.     String getClientHost() throws ServerNotActiveException;
  42. }
  43.