edu.uci.isr.yancees
Interface YanceesInterface

All Known Implementing Classes:
YanceesClient, YanceesRMIClient

public interface YanceesInterface

Author:
Roberto Silveira Silva Filho [rsilvafi@ics.uci.edu] This interface is here as a template. It must be implemented by local (client-side) implementations of YANCEES, in order to provide a standard façade for the interaction of clients with the server. The implementatin of this interface will hide the communication idiossincrasies associated to the transport protocol (RMI, Sockets, HTTP and so on) that YANCEES may use.

Method Summary
 ProtocolPluginInterface connectToNewProtocol(java.lang.String protocolId, SubscriberInterface rsi)
          Connects to a new instance of a protocol plug-in.
 ProtocolPluginInterface connectToSharedProtocol(java.lang.String protocolId, SubscriberInterface rsi)
          Connects to an existing protocol instance.
 void disconnectFromProtocol(java.lang.String protocolId, SubscriberInterface rsi)
          Terminates unshared protocol instances, or shared protocol instances if no more clients are connected to them.
 void publish(EventInterface evt)
           
 void resumeYancees()
           
 void shutdownYancees()
           
 void subscribe(SubscriptionInterface msg, SubscriberInterface rsi)
           
 void suspendYancees()
           
 void unsubscribe(SubscriberInterface rsi)
           
 void unsubscribe(SubscriberInterface rsi, MessageInterface sub)
           
 

Method Detail

connectToSharedProtocol

ProtocolPluginInterface connectToSharedProtocol(java.lang.String protocolId,
                                                SubscriberInterface rsi)
                                                throws YanceesException
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

ProtocolPluginInterface connectToNewProtocol(java.lang.String protocolId,
                                             SubscriberInterface rsi)
                                             throws YanceesException
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,
                            SubscriberInterface rsi)
                            throws YanceesException
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
Throws:
YanceesException

subscribe

void subscribe(SubscriptionInterface msg,
               SubscriberInterface rsi)
               throws YanceesException
Throws:
YanceesException

unsubscribe

void unsubscribe(SubscriberInterface rsi)
                 throws YanceesException
Throws:
YanceesException

unsubscribe

void unsubscribe(SubscriberInterface rsi,
                 MessageInterface sub)
                 throws YanceesException
Throws:
YanceesException

shutdownYancees

void shutdownYancees()
                     throws YanceesException
Throws:
YanceesException

suspendYancees

void suspendYancees()
                    throws YanceesException
Throws:
YanceesException

resumeYancees

void resumeYancees()
                   throws YanceesException
Throws:
YanceesException