edu.uci.isr.yancees.server.rmi
Interface RemoteYanceesInterface

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
RemoteYanceesImplementation

public interface RemoteYanceesInterface
extends java.rmi.Remote

Author:
Roberto Silveira Silva Filho [rsilvafi@ics.uci.edu] This remote interface is the façade for the services in the YANCEES server.

Field Summary
static java.lang.String RMI_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.
 void publish(EventInterface evt)
          Publishes an opaque event, which can be a XML file, a hashtable representation or another object that implements the eventInterface.
 void publishBuffer(EventInterface[] evt)
          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(SubscriptionInterface sub, RemoteSubscriberInterface rsi)
          Subscribers to YANCEES events.
 void suspendYancees()
           
 void unsubscribe(RemoteSubscriberInterface rsi)
          unsubscribes or deactivates all subscriptoins registered under the provided subscriber interface
 void unsubscribe(RemoteSubscriberInterface rsi, MessageInterface sub)
          unsubscribes or deactivates the subscription registered under the provided subscriber interface
 

Field Detail

RMI_LOOKUP_NAME

static final java.lang.String RMI_LOOKUP_NAME
See Also:
Constant Field Values
Method Detail

connectToSharedProtocol

RemoteProtocolPluginInterface connectToSharedProtocol(java.lang.String protocolId,
                                                      RemoteSubscriberInterface rsi)
                                                      throws YanceesException,
                                                             java.rmi.RemoteException
Connects to an existing protocol instance. If there is no instance available, YANCEES instantiates a new protocol plug-in. Subsequent calls to this method, for that specific protocol, will return the shared plug-in instance.

Parameters:
protocolId - is the name of the protocol as registered in the configuration file and as available in the protocol factory
rsi - is the subscriber interface that can be used to receive events from the plug-in
Returns:
a reference to the plug-in
Throws:
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 issues

connectToNewProtocol

RemoteProtocolPluginInterface connectToNewProtocol(java.lang.String protocolId,
                                                   RemoteSubscriberInterface rsi)
                                                   throws YanceesException,
                                                          java.rmi.RemoteException
Connects to a new instance of a protocol plug-in. Each time this method is invoked, a new instance is created.

Parameters:
protocolId - is the name of the protocol as registered in the configuration file and as available in the protocol factory
rsi - is the subscriber interface that can be used to receive events from the plug-in
Returns:
a reference to the plug-in
Throws:
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 issues

disconnectFromProtocol

void disconnectFromProtocol(java.lang.String protocolId,
                            RemoteSubscriberInterface rsi)
                            throws YanceesException,
                                   java.rmi.RemoteException
Terminates unshared protocol instances, or shared protocol instances if no more clients are connected to them.

Parameters:
protocolId - is the name of the protocol as registered in the configuration file and as available in the protocol factory
rsi - is the subscriber interface that can be used to receive events from the plug-in
Throws:
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 issues

publish

void publish(EventInterface evt)
             throws YanceesException,
                    java.rmi.RemoteException
Publishes an opaque event, which can be a XML file, a hashtable representation or another object that implements the eventInterface.

Parameters:
evt - is the event being published
Throws:
YanceesException
java.rmi.RemoteException

publishBuffer

void publishBuffer(EventInterface[] evt)
                   throws YanceesException,
                          java.rmi.RemoteException
Publishes an array of opaque events, which can be XML files, hashtable representations or other objects that implements the eventInterface.

Parameters:
evt - is the event being published
Throws:
YanceesException
java.rmi.RemoteException

subscribe

void subscribe(SubscriptionInterface sub,
               RemoteSubscriberInterface rsi)
               throws YanceesException,
                      java.rmi.RemoteException
Subscribers to YANCEES events. It uses a message that is usually a XMl subscription

Parameters:
sub - is the subscription
rsi - is the remote interface to receive the events when the subscription matches
Throws:
YanceesException
java.rmi.RemoteException

unsubscribe

void unsubscribe(RemoteSubscriberInterface rsi)
                 throws YanceesException,
                        java.rmi.RemoteException
unsubscribes or deactivates all subscriptoins registered under the provided subscriber interface

Parameters:
rsi - is the remote interface used to receive the events when the subscription matches
Throws:
YanceesException
java.rmi.RemoteException

unsubscribe

void unsubscribe(RemoteSubscriberInterface rsi,
                 MessageInterface sub)
                 throws YanceesException,
                        java.rmi.RemoteException
unsubscribes or deactivates the subscription registered under the provided subscriber interface

Parameters:
rsi - is the remote interface used to receive the events when the subscription matches
sub - is the subscription message
Throws:
YanceesException
java.rmi.RemoteException

shutdownYancees

void shutdownYancees()
                     throws YanceesException,
                            java.rmi.RemoteException
Throws:
YanceesException
java.rmi.RemoteException

suspendYancees

void suspendYancees()
                    throws YanceesException,
                           java.rmi.RemoteException
Throws:
YanceesException
java.rmi.RemoteException

resumeYancees

void resumeYancees()
                   throws YanceesException,
                          java.rmi.RemoteException
Throws:
YanceesException
java.rmi.RemoteException