org.scribble.protocol.monitor
Interface ProtocolMonitor

All Known Implementing Classes:
DefaultProtocolMonitor

public interface ProtocolMonitor

This is the interface for the Protocol Monitor.


Method Summary
 Session createSession(MonitorContext context, Description protocol, Class<? extends Session> sessionClass)
          This method creates a new session (conversation instance) and initializes it based on the supplied description.
 Result messageReceived(MonitorContext context, Description protocol, Session conv, Message mesg)
          This method checks whether the conversation instance, managed by the supplied context, can handle the supplied 'received' message.
 Result messageSent(MonitorContext context, Description protocol, Session conv, Message mesg)
          This method checks whether the conversation instance, managed by the supplied context, can handle the supplied 'sent' message.
 

Method Detail

createSession

Session createSession(MonitorContext context,
                      Description protocol,
                      Class<? extends Session> sessionClass)
This method creates a new session (conversation instance) and initializes it based on the supplied description.

Parameters:
context - The monitor context
protocol - The protocol description
sessionClass - The session implenentation class to instantiate
Returns:
The created and initialized session

messageSent

Result messageSent(MonitorContext context,
                   Description protocol,
                   Session conv,
                   Message mesg)
This method checks whether the conversation instance, managed by the supplied context, can handle the supplied 'sent' message.

Parameters:
context - The monitor context
protocol - The protocol description
conv - The conversation
mesg - The 'sent' message
Returns:
The result

messageReceived

Result messageReceived(MonitorContext context,
                       Description protocol,
                       Session conv,
                       Message mesg)
This method checks whether the conversation instance, managed by the supplied context, can handle the supplied 'received' message.

Parameters:
context - The monitor context
protocol - The protocol description
conv - The conversation
mesg - The 'received' message
Returns:
The result


Copyright © 2008-Present Scribble.org. All Rights Reserved.