net.sf.juoserver.api
Interface ProtocolController

All Known Subinterfaces:
Controller
All Known Implementing Classes:
ControllerImpl

public interface ProtocolController

Contract for a protocol controller.

A protocol controller is an object whose responsibility is to decide what message to reply with basing the decision on the request message.

In order not to let the communication details slip into the model entities, the protocol controller should take care of all of the protocol mechanisms and of them only, delegating all the rest to the model - e.g., it will handle the message requesting a double-click to use an item, but will not directly execute the item usage - it will rather delegate it to the model.

The protocol controller is defined assuming a basic request-reply communication pattern.


Method Summary
 List<Message> getReply(Message msg)
          Retrieves the reply for a certain request message.
 boolean isConversationActive()
           
 void postProcess(Message request)
          Post-processes the request message.
 

Method Detail

getReply

List<Message> getReply(Message msg)
Retrieves the reply for a certain request message.

Parameters:
msg - request message
Returns:
reply message

postProcess

void postProcess(Message request)
Post-processes the request message.

Parameters:
request - the request message to be post-processed

isConversationActive

boolean isConversationActive()
Returns:
true if and only if the conversation with the client is still active


Copyright © 2010-2012. All Rights Reserved.