edu.uci.isr.yancees.server.rmi
Class RemoteAbstractProtocolPluginImplementation

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by edu.uci.isr.yancees.server.rmi.RemoteAbstractProtocolPluginImplementation
All Implemented Interfaces:
ProtocolPluginInterface, RemoteProtocolPluginInterface, java.io.Serializable, java.rmi.Remote

public abstract class RemoteAbstractProtocolPluginImplementation
extends java.rmi.server.UnicastRemoteObject
implements RemoteProtocolPluginInterface

This class needs to be especialized to add remote method implemetations. this abstract class also implements a listener protocol. It can notify the client that created the protocol using events.

See Also:
Serialized Form

Field Summary
protected  SubscriberInterface subscriber
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteAbstractProtocolPluginImplementation(SubscriberInterface si)
          This is the constructor of the plug-in.
 
Method Summary
 long getId()
           
 java.lang.String getTag()
           
protected  void notifySubscriber(EventInterface event)
          This methods need to be repeated here, from the AbstractProtocolPlugin.
protected  void notifySybscriber(EventInterface[] eventList)
          This methods need to be repeated here, from the AbstractProtocolPlugin.
 
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

subscriber

protected SubscriberInterface subscriber
Constructor Detail

RemoteAbstractProtocolPluginImplementation

public RemoteAbstractProtocolPluginImplementation(SubscriberInterface si)
                                           throws java.rmi.RemoteException
This is the constructor of the plug-in. The RemoteException is thrown to alert the plug-in creator of any erros in the creationg of the plug-in. This is required by the super class (UnicastRemoteObject).

Throws:
java.rmi.RemoteException
Method Detail

notifySubscriber

protected void notifySubscriber(EventInterface event)
This methods need to be repeated here, from the AbstractProtocolPlugin. We assume that the subscriber here is actually a mediator to to a remote interface and that this local invocation will issue in a forward of the events to the actual subscriber.

Parameters:
event - is the event being sent

notifySybscriber

protected void notifySybscriber(EventInterface[] eventList)
This methods need to be repeated here, from the AbstractProtocolPlugin. We assume that the subscriber here is actually a mediator to to a remote interface and that this local invocation will issue in a forward of the events to the actual subscriber.

Parameters:
event - is the list of events being sent

getId

public long getId()
Specified by:
getId in interface ProtocolPluginInterface
Returns:
the unique Id of this plugin

getTag

public java.lang.String getTag()
Specified by:
getTag in interface ProtocolPluginInterface
Returns:
the tag name that this plugin is representing. It corresponds to the type of this plugin instance. For example, if this is a plug-in that handles a subtree headed by the tag, its type will be "followed-by"