org.planx.xmlstore.routing.messaging
Interface MessageFactory

All Known Implementing Classes:
MessageFactoryImpl

public interface MessageFactory

Creates Message and Receiver objects based on message code types.


Method Summary
 Message createMessage(byte code, DataInput in)
          Creates a Message of type code from the specified stream.
 Receiver createReceiver(byte code, MessageServer server)
          Creates a Receiver for handling a Message of type code.
 

Method Detail

createMessage

Message createMessage(byte code,
                      DataInput in)
                      throws IOException,
                             UnknownMessageException
Creates a Message of type code from the specified stream.

Throws:
UnknownMessageException - if the message code type is not supported
IOException

createReceiver

Receiver createReceiver(byte code,
                        MessageServer server)
Creates a Receiver for handling a Message of type code. If no standard Receiver should handle the message null is returned. In this case, an application specific receiver will be used if one is registered.



Copyright © 2010. All Rights Reserved.