1 /* 2 * @(#)ServerRef.java 1.16 03/12/19 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package java.rmi.server; 9 10 import java.rmi.*; 11 12 /** 13 * A ServerRef represents the server-side handle for a remote object 14 * implementation. 15 * 16 * @version 1.16, 12/19/03 17 * @author Ann Wollrath 18 * @since JDK1.1 19 */ 20 public interface ServerRef extends RemoteRef { 21 22 /** indicate compatibility with JDK 1.1.x version of class. */ 23 static final long serialVersionUID = -4557750989390278438L; 24 25 /** 26 * Creates a client stub object for the supplied Remote object. 27 * If the call completes successfully, the remote object should 28 * be able to accept incoming calls from clients. 29 * @param obj the remote object implementation 30 * @param data information necessary to export the object 31 * @return the stub for the remote object 32 * @exception RemoteException if an exception occurs attempting 33 * to export the object (e.g., stub class could not be found) 34 * @since JDK1.1 35 */ 36 RemoteStub exportObject(Remote obj, Object data) 37 throws RemoteException; 38 39 /** 40 * Returns the hostname of the current client. When called from a 41 * thread actively handling a remote method invocation the 42 * hostname of the client is returned. 43 * @return the client's host name 44 * @exception ServerNotActiveException if called outside of servicing 45 * a remote method invocation 46 * @since JDK1.1 47 */ 48 String getClientHost() throws ServerNotActiveException; 49 } 50