home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / rmi / server / ServerRef.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.4 KB  |  45 lines

  1. /*
  2.  * @(#)ServerRef.java    1.8 98/03/18
  3.  *
  4.  * Copyright 1996, 1997 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.     /* indicate compatibility with JDK 1.1.x version of class */
  26.     static final long serialVersionUID = -4557750989390278438L;
  27.  
  28.     /** 
  29.      * Find or create a client stub object for the supplied Remote.
  30.      * @param obj the remote object implementation
  31.      * information necessary to export the object
  32.      */
  33.     RemoteStub exportObject(Remote obj, Object data)
  34.     throws RemoteException;
  35.  
  36.     /**
  37.      * Return the hostname of the current client.  When called from a
  38.      * thread actively handling a remote method invocation the
  39.      * hostname of the client is returned.
  40.      * @exception ServerNotActiveException If called outside of servicing
  41.      * a remote method invocation.
  42.      */
  43.     String getClientHost() throws ServerNotActiveException;
  44. }
  45.