|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.uci.isr.yancees.server.rmi.RemoteYanceesImplementation
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.
Nested Class Summary | |
protected class |
RemoteYanceesImplementation.NotificationBuffer
This buffer schedules events to be notified. |
class |
RemoteYanceesImplementation.SubscriberMediator
Performs the mapping between the remote interface and the local subscriber interface, working also as a record of the active subscriptions. |
Field Summary | |
static boolean |
MULTI_THREADED_PUBLISH
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Fields inherited from interface edu.uci.isr.yancees.server.rmi.RemoteYanceesInterface |
RMI_LOOKUP_NAME |
Constructor Summary | |
RemoteYanceesImplementation(java.io.File configFile)
Constructor that accepts an architecture configuration file, with which plug-ins, filters and services are installed in the basic infrastructure |
Method Summary | |
RemoteProtocolPluginInterface |
connectToNewProtocol(java.lang.String protocolId,
RemoteSubscriberInterface rsi)
Connects to a new instance of a protocol plug-in. |
RemoteProtocolPluginInterface |
connectToSharedProtocol(java.lang.String protocolId,
RemoteSubscriberInterface rsi)
Connects to an existing protocol instance. |
void |
disconnectFromProtocol(java.lang.String protocolId,
RemoteSubscriberInterface rsi)
Terminates unshared protocol instances, or shared protocol instances if no more clients are connected to them. |
static void |
main(java.lang.String[] args)
|
void |
publish(EventInterface evt)
Multithreaded implementation of the Publish command Note that the YanceesException will not be thrown here |
void |
publish(EventInterface[] evtList)
Publishes an array of opaque events, which can be XML files, hashtable representations or other objects that implements the eventInterface. |
void |
resumeYancees()
|
void |
shutdownYancees()
|
void |
subscribe(MessageInterface msg,
RemoteSubscriberInterface rsi)
Multithreaded implementation fo the subscribe command. |
void |
suspendYancees()
|
void |
threadGuard()
|
void |
unsubscribe(RemoteSubscriberInterface rsi)
Multithreaded implementaiton of ubsubscribe method |
void |
unsubscribe(RemoteSubscriberInterface rsi,
MessageInterface msg)
Multithreaded implementaiton of ubsubscribe method |
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 |
Field Detail |
public static boolean MULTI_THREADED_PUBLISH
Constructor Detail |
public RemoteYanceesImplementation(java.io.File configFile) throws java.rmi.RemoteException
Method Detail |
public static void main(java.lang.String[] args)
public RemoteProtocolPluginInterface connectToSharedProtocol(java.lang.String protocolId, RemoteSubscriberInterface rsi) throws YanceesException, java.rmi.RemoteException
RemoteYanceesInterface
connectToSharedProtocol
in interface RemoteYanceesInterface
protocolId
- is the name of the protocol as registered in the configuration file
and as available in the protocol factoryrsi
- is the subscriber interface that can be used to receive events from the plug-in
java.rmi.RemoteException
- is thrown in case of RMI related issues
YanceesException
- is thrown in case of errors in the creation of the protocol plug-inpublic RemoteProtocolPluginInterface connectToNewProtocol(java.lang.String protocolId, RemoteSubscriberInterface rsi) throws YanceesException, java.rmi.RemoteException
RemoteYanceesInterface
connectToNewProtocol
in interface RemoteYanceesInterface
protocolId
- is the name of the protocol as registered in the configuration file
and as available in the protocol factoryrsi
- is the subscriber interface that can be used to receive events from the plug-in
YanceesException
- is thrown in case of errors in the creation of the protocol plug-in
java.rmi.RemoteException
- is thrown in case of RMI related issuespublic void disconnectFromProtocol(java.lang.String protocolId, RemoteSubscriberInterface rsi) throws YanceesException, java.rmi.RemoteException
RemoteYanceesInterface
disconnectFromProtocol
in interface RemoteYanceesInterface
protocolId
- is the name of the protocol as registered in the configuration file
and as available in the protocol factoryrsi
- is the subscriber interface that can be used to receive events from the plug-in
java.rmi.RemoteException
- is thrown in case of RMI related issues
YanceesException
- is thrown in case of errors in the creation of the protocol plug-inpublic void publish(EventInterface evt) throws YanceesException, java.rmi.RemoteException
publish
in interface RemoteYanceesInterface
evt
- is the event to be published.
java.rmi.RemoteException
YanceesException
public void publish(EventInterface[] evtList) throws YanceesException, java.rmi.RemoteException
RemoteYanceesInterface
publish
in interface RemoteYanceesInterface
evtList
- is a list of events to be published.
YanceesException
java.rmi.RemoteException
public void subscribe(MessageInterface msg, RemoteSubscriberInterface rsi) throws YanceesException, java.rmi.RemoteException
subscribe
in interface RemoteYanceesInterface
msg
- is the message having the subscription/notificationrsi
- is the remote interface to receive the events when the subscription matches
YanceesException
java.rmi.RemoteException
public void unsubscribe(RemoteSubscriberInterface rsi) throws YanceesException, java.rmi.RemoteException
unsubscribe
in interface RemoteYanceesInterface
rsi
- is the remote subscriber engaging in the operation.
java.rmi.RemoteException
YanceesException
public void unsubscribe(RemoteSubscriberInterface rsi, MessageInterface msg) throws YanceesException, java.rmi.RemoteException
unsubscribe
in interface RemoteYanceesInterface
rsi
- is the remote subscriber engaging in the operation.msg
- is the Subscriptoin being discontinued
YanceesException
java.rmi.RemoteException
public void shutdownYancees() throws YanceesException, java.rmi.RemoteException
shutdownYancees
in interface RemoteYanceesInterface
YanceesException
java.rmi.RemoteException
public void suspendYancees() throws YanceesException, java.rmi.RemoteException
suspendYancees
in interface RemoteYanceesInterface
YanceesException
java.rmi.RemoteException
public void resumeYancees() throws YanceesException, java.rmi.RemoteException
resumeYancees
in interface RemoteYanceesInterface
YanceesException
java.rmi.RemoteException
public void threadGuard()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |