edu.uci.isr.yancees.server.rmi
Class RemoteYanceesImplementation
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.uci.isr.yancees.server.rmi.RemoteYanceesImplementation
- All Implemented Interfaces:
- java.rmi.Remote, RemoteYanceesInterface, java.io.Serializable
- public class RemoteYanceesImplementation
- extends java.rmi.server.UnicastRemoteObject
- implements RemoteYanceesInterface
This class implements the RemoteYanceesInterface, which is a façade,
a remote interface to all Yancees APIs:
Publisher, Subscriber and Protocol. It collects the calls and route them to the
appropriate API. It glues everything together.
This is a remote class since it is registered in the server side to handle
yancess calls.
- 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 |
MULTI_THREADED_PUBLISH
public static boolean MULTI_THREADED_PUBLISH
RemoteYanceesImplementation
public RemoteYanceesImplementation(java.io.File configFile)
throws java.rmi.RemoteException
main
public static void main(java.lang.String[] args)
createNewSession
public RemoteProtocolSessionInterface createNewSession(MessageInterface msg,
RemoteSubscriberInterface rsi)
throws YanceesException,
java.rmi.RemoteException
- Specified by:
createNewSession
in interface RemoteYanceesInterface
- Throws:
YanceesException
java.rmi.RemoteException
publish
public void publish(EventInterface evt)
throws YanceesException,
java.rmi.RemoteException
- Multithreaded implementation of the Publish command
Note that the YanceesException will not be thrown here
- Specified by:
publish
in interface RemoteYanceesInterface
- Parameters:
evt
- is the event to be published.
- Throws:
YanceesException
java.rmi.RemoteException
publish
public void publish(EventInterface[] evtList)
throws YanceesException,
java.rmi.RemoteException
- Specified by:
publish
in interface RemoteYanceesInterface
- Parameters:
evtList
- is a list of events to be published.
- Throws:
YanceesException
java.rmi.RemoteException
subscribe
public void subscribe(MessageInterface msg,
RemoteSubscriberInterface rsi)
throws YanceesException,
java.rmi.RemoteException
- Multithreaded implementation fo the subscribe command.
Sends a subscription. When the subscriptio is matched, events are routed
back to the remote subscriber.
- Specified by:
subscribe
in interface RemoteYanceesInterface
- Parameters:
msg
- is the message having the subscription/notification
- Throws:
YanceesException
java.rmi.RemoteException
unsubscribe
public void unsubscribe(RemoteSubscriberInterface rsi)
throws YanceesException,
java.rmi.RemoteException
- Multithreaded implementaiton of ubsubscribe method
- Specified by:
unsubscribe
in interface RemoteYanceesInterface
- Parameters:
rsi
- is the remote subscriber engaging in the operation.
- Throws:
YanceesException
java.rmi.RemoteException
unsubscribe
public void unsubscribe(RemoteSubscriberInterface rsi,
MessageInterface msg)
throws YanceesException,
java.rmi.RemoteException
- Multithreaded implementaiton of ubsubscribe method
- Specified by:
unsubscribe
in interface RemoteYanceesInterface
- Parameters:
rsi
- is the remote subscriber engaging in the operation.msg
- is the Subscriptoin being discontinued
- Throws:
YanceesException
java.rmi.RemoteException
shutdownYancees
public void shutdownYancees()
throws YanceesException,
java.rmi.RemoteException
- Specified by:
shutdownYancees
in interface RemoteYanceesInterface
- Throws:
YanceesException
java.rmi.RemoteException
suspendYancees
public void suspendYancees()
throws YanceesException,
java.rmi.RemoteException
- Specified by:
suspendYancees
in interface RemoteYanceesInterface
- Throws:
YanceesException
java.rmi.RemoteException
resumeYancees
public void resumeYancees()
throws YanceesException,
java.rmi.RemoteException
- Specified by:
resumeYancees
in interface RemoteYanceesInterface
- Throws:
YanceesException
java.rmi.RemoteException
threadGuard
public void threadGuard()