edu.emory.mathcs.rmix.server
Class BoundRemoteObject

java.lang.Object
  extended byedu.emory.mathcs.rmix.server.RemoteObject
      extended byedu.emory.mathcs.rmix.server.BoundRemoteObject
All Implemented Interfaces:
Exportable, java.rmi.Remote

public class BoundRemoteObject
extends RemoteObject
implements Exportable

Convenience base class for remote objects that binds the object to a single endpoint created by specific RMIX protocol with given parameters, remote interfaces, and the interceptor.

Version:
1.0
Author:
Dawid Kurzyniec

Constructor Summary
protected BoundRemoteObject(java.lang.String protocol)
          Constructs new remote object and exports it using given RMIX protocol.
protected BoundRemoteObject(java.lang.String protocol, java.lang.Class[] interfaces)
          Constructs new remote object and exports it using given RMIX protocol and specific set of remote interfaces.
protected BoundRemoteObject(java.lang.String protocol, java.lang.Class[] interfaces, Interceptor interceptor)
          Constructs new remote object and exports it using given RMIX protocol, specific set of remote interfaces, and a given invocation interceptor.
protected BoundRemoteObject(java.lang.String protocol, java.lang.Class[] interfaces, Interceptor interceptor, Parameters params)
          Constructs new remote object and exports it using given RMIX protocol, specific set of remote interfaces, invocation interceptor, and export parameters.
protected BoundRemoteObject(java.lang.String protocol, java.lang.Class[] interfaces, Parameters params)
          Constructs new remote object and exports it using given RMIX protocol, specific set of remote interfaces, and given export parameters.
protected BoundRemoteObject(java.lang.String protocol, Parameters params)
          Constructs new remote object and exports it using given RMIX protocol and parameters.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the remote object that is distinct from the original.
 ServerRef exportObject()
          implementation of the exportable interface
 ObjGUID getObjGUID()
          Gets the GUID associated with this remote object and its stubs.
 ServerRef getRef()
          Gets the endpoint that this object is bind to.
 
Methods inherited from class edu.emory.mathcs.rmix.server.RemoteObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoundRemoteObject

protected BoundRemoteObject(java.lang.String protocol)
                     throws java.rmi.RemoteException
Constructs new remote object and exports it using given RMIX protocol.

Parameters:
protocol - the name of RMIX protocol to export the object.
Throws:
java.rmi.RemoteException - if the export fails.

BoundRemoteObject

protected BoundRemoteObject(java.lang.String protocol,
                            Parameters params)
                     throws java.rmi.RemoteException
Constructs new remote object and exports it using given RMIX protocol and parameters.

Parameters:
protocol - the name of RMIX protocol to export the object.
params - export parameters.
Throws:
java.rmi.RemoteException - if the export fails.

BoundRemoteObject

protected BoundRemoteObject(java.lang.String protocol,
                            java.lang.Class[] interfaces)
                     throws java.rmi.RemoteException
Constructs new remote object and exports it using given RMIX protocol and specific set of remote interfaces.

Parameters:
protocol - the name of RMIX protocol to export the object.
interfaces - the remote interfaces to export.
Throws:
java.rmi.RemoteException - if the export fails.

BoundRemoteObject

protected BoundRemoteObject(java.lang.String protocol,
                            java.lang.Class[] interfaces,
                            Interceptor interceptor)
                     throws java.rmi.RemoteException
Constructs new remote object and exports it using given RMIX protocol, specific set of remote interfaces, and a given invocation interceptor.

Parameters:
protocol - the name of RMIX protocol to export the object.
interfaces - the remote interfaces to export.
interceptor - the invocation interceptor.
Throws:
java.rmi.RemoteException - if the export fails.

BoundRemoteObject

protected BoundRemoteObject(java.lang.String protocol,
                            java.lang.Class[] interfaces,
                            Parameters params)
                     throws java.rmi.RemoteException
Constructs new remote object and exports it using given RMIX protocol, specific set of remote interfaces, and given export parameters.

Parameters:
protocol - the name of RMIX protocol to export the object.
interfaces - the remote interfaces to export.
params - export parameters.
Throws:
java.rmi.RemoteException - if the export fails.

BoundRemoteObject

protected BoundRemoteObject(java.lang.String protocol,
                            java.lang.Class[] interfaces,
                            Interceptor interceptor,
                            Parameters params)
                     throws java.rmi.RemoteException
Constructs new remote object and exports it using given RMIX protocol, specific set of remote interfaces, invocation interceptor, and export parameters.

Parameters:
protocol - the name of RMIX protocol to export the object.
interfaces - the remote interfaces to export.
interceptor - the invocation interceptor.
params - export parameters.
Throws:
java.rmi.RemoteException - if the export fails.
Method Detail

getRef

public ServerRef getRef()
Gets the endpoint that this object is bind to.

Returns:
the server endpoint of this object.

getObjGUID

public ObjGUID getObjGUID()
Gets the GUID associated with this remote object and its stubs.

Overrides:
getObjGUID in class RemoteObject
Returns:
the GUID of this remote object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the remote object that is distinct from the original.

Returns:
the new remote object
Throws:
java.lang.CloneNotSupportedException - if clone failed due to a RemoteException.

exportObject

public ServerRef exportObject()
implementation of the exportable interface

Specified by:
exportObject in interface Exportable
Returns:
the server reference to be passed on to the client.
See Also:
Rmix.getServerContext()