|
||||||||||
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
public class 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.
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 |
|
RemoteYanceesImplementation(java.io.File configFile,
java.lang.String lookupName)
Alternative constructor with optional lookup name |
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 |
publishBuffer(EventInterface[] evtList)
This method is used by the publication buffer to speed up the transmission of events through the network. |
void |
resumeYancees()
|
void |
shutdownYancees()
|
void |
subscribe(SubscriptionInterface sub,
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, java.lang.String lookupName) throws java.rmi.RemoteException
java.rmi.RemoteException
public RemoteYanceesImplementation(java.io.File configFile) throws java.rmi.RemoteException
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
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 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
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 publish(EventInterface evt) throws YanceesException, java.rmi.RemoteException
publish
in interface RemoteYanceesInterface
evt
- is the event to be published.
YanceesException
java.rmi.RemoteException
public void publishBuffer(EventInterface[] evtList) throws YanceesException, java.rmi.RemoteException
publishBuffer
in interface RemoteYanceesInterface
evtList
- is a list of events to be published.
YanceesException
java.rmi.RemoteException
public void subscribe(SubscriptionInterface sub, RemoteSubscriberInterface rsi) throws YanceesException, java.rmi.RemoteException
subscribe
in interface RemoteYanceesInterface
sub
- is the message having the subscription/notification
-
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.
YanceesException
java.rmi.RemoteException
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 |