de.root1.simon
Class SimonRemoteInstance

java.lang.Object
  extended by de.root1.simon.SimonRemoteInstance
All Implemented Interfaces:
java.io.Serializable

public class SimonRemoteInstance
extends java.lang.Object
implements java.io.Serializable

This class is used by an endpoint if a remote object has to be "transferred" to the opposite endpoint. In such case, only the interface name is relevant. So an instance of this class is transferred instead of the "real" implementation of the remote object.

Author:
ACHR
See Also:
Serialized Form

Constructor Summary
protected SimonRemoteInstance(org.apache.mina.core.session.IoSession session, java.lang.Object remoteObject)
          Creates a new SimonRemoteInstance transport object
 
Method Summary
protected  java.lang.String getId()
          Returns an unique identifier for this remote object.
protected  java.util.List<java.lang.String> getInterfaceNames()
          Returns the name of the interface of the remote object's implementation
protected  java.lang.String getRemoteObjectName()
          Returns the proxy's remote object name in the related lookup table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimonRemoteInstance

protected SimonRemoteInstance(org.apache.mina.core.session.IoSession session,
                              java.lang.Object remoteObject)
Creates a new SimonRemoteInstance transport object

Parameters:
session - the IoSession to which the remote object is related to
remoteObject - the remote object for which we generate this transport object for
Method Detail

getInterfaceNames

protected java.util.List<java.lang.String> getInterfaceNames()
Returns the name of the interface of the remote object's implementation

Returns:
the remote object's interface

getId

protected java.lang.String getId()
Returns an unique identifier for this remote object. This is necessary to differ from two remote objects with the same implementation

Returns:
a unique ID for the remote object

getRemoteObjectName

protected java.lang.String getRemoteObjectName()
Returns the proxy's remote object name in the related lookup table. This method is used by ProcessMessageRunnable.processEquals() to get an instance of this object from lookup table for comparison.

Returns:
the remote object name


Copyright © 2011. All Rights Reserved.