|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.isr.yancees.server.ServerProtocolSession
It represents a session, a context, that deals with the exchange of messages between the clients and the corresponding plug-in instance that handles this protocol. It implements the same idea as a File a TCP connection object. In a protocol session there are two moments, an initial parsing and determinatoin of what plug-in to instantiate, followed by a sequence of messages, which replies are sent as events to the ProtocolListenerInterface, and then a termination of the session.
Constructor Summary | |
protected |
ServerProtocolSession(SubscriberInterface si,
ProtocolManager pm)
The protected here allows only the ProtocolAPI to initialize this object. |
Method Summary | |
protected void |
finalize()
This class is invoked by the Garbage Collector... |
protected void |
initialize(MessageInterface msg)
Issues an initialization message to initiate this session. |
void |
receivePluginNotification(EventInterface[] evtList,
PluginInterface source)
Receives a list of DATA events as notifications from another plug-in |
void |
receivePluginNotification(EventInterface evt,
PluginInterface source)
Receives a DATA notification from another plug-in |
void |
sendMessage(MessageInterface message)
Send a message to the protocol plug-in that is responsible for this context |
void |
terminate()
Terminates the session without sending a termination message This message finalizes the plug-in and terminates its instance. |
void |
terminate(MessageInterface msg)
Issues a termination message to finalze this session. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ServerProtocolSession(SubscriberInterface si, ProtocolManager pm)
si
- is the subscriptin listener interface, which will receive all the
events (data) generated as a result of the protocol.pm
- is the protocol manager, with plug-in factories, to be used.Method Detail |
protected void initialize(MessageInterface msg) throws YanceesException
msg
- is the initial message of this session.
YanceesException
public void terminate(MessageInterface msg) throws YanceesException
msg
- is the finalization messsage
YanceesException
public void terminate() throws YanceesException
YanceesException
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public void sendMessage(MessageInterface message) throws YanceesException
message
- is an XML document wrapped in the message.
YanceesException
public void receivePluginNotification(EventInterface evt, PluginInterface source)
receivePluginNotification
in interface PluginListenerInterface
evt
- is the event receivedsource
- is the plug-in sending the notification.public void receivePluginNotification(EventInterface[] evtList, PluginInterface source)
receivePluginNotification
in interface PluginListenerInterface
evtList
- is the list of events receivedsource
- is the plug-in sending the notification.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |