edu.uci.isr.yancees.server.rmi
Class RemoteProtocolSessionImplementation
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.uci.isr.yancees.server.rmi.RemoteProtocolSessionImplementation
- All Implemented Interfaces:
- java.rmi.Remote, RemoteProtocolSessionInterface, java.io.Serializable, java.rmi.server.Unreferenced
- public class RemoteProtocolSessionImplementation
- extends java.rmi.server.UnicastRemoteObject
- implements RemoteProtocolSessionInterface, java.rmi.server.Unreferenced
This class works as a remote wrapper to the local protocolSession
It is sent as a callback interface to the yancees clients
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
RemoteProtocolSessionImplementation
public RemoteProtocolSessionImplementation(ProtocolSession session)
throws java.rmi.RemoteException
sendMessage
public void sendMessage(MessageInterface message)
throws YanceesException,
java.rmi.RemoteException
- Description copied from interface:
RemoteProtocolSessionInterface
- Send a message to the protocol plug-in that is responsible for this
context
- Specified by:
sendMessage
in interface RemoteProtocolSessionInterface
- Parameters:
message
- is an XML document wrapped in the message.
- Throws:
YanceesException
java.rmi.RemoteException
terminate
public void terminate(MessageInterface message)
throws YanceesException,
java.rmi.RemoteException
- Gracefully terminates the current session
- Specified by:
terminate
in interface RemoteProtocolSessionInterface
- Parameters:
message
- is a finalization message to be sent to the plug-in(s)
created to handle this session
- Throws:
YanceesException
- in case of parsing or message errors
java.rmi.RemoteException
- in case of connection errors
terminate
public void terminate()
throws YanceesException,
java.rmi.RemoteException
- Gracefully terminates the current session
- Specified by:
terminate
in interface RemoteProtocolSessionInterface
- Throws:
YanceesException
- in case of parsing or message errors
java.rmi.RemoteException
- in case of connection errors
unreferenced
public void unreferenced()
- Implements the Unreferenced interface.
This class is invoked by the Distributed Garbage Collector when the RMI reference
counter for this object becomes 0 or when there is no communication for more than
the lease period, which default timeout is 10 minutes.
This method is used to release any resource allocated to this record which,
in this case, is the protocol plug-in.
- Specified by:
unreferenced
in interface java.rmi.server.Unreferenced