org.planx.xmlstore.routing.operation
Class MessageFactoryImpl
java.lang.Object
org.planx.xmlstore.routing.operation.MessageFactoryImpl
- All Implemented Interfaces:
- MessageFactory
public class MessageFactoryImpl
- extends Object
- implements MessageFactory
Essentially this class translates numbers into classes. Given a message code
it can create a Message object or a Receiver.
- Author:
- Thomas Ambus
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CODE_CONNECT
public static final byte CODE_CONNECT
- See Also:
- Constant Field Values
CODE_ACKNOWLEDGE
public static final byte CODE_ACKNOWLEDGE
- See Also:
- Constant Field Values
CODE_NODE_LOOKUP
public static final byte CODE_NODE_LOOKUP
- See Also:
- Constant Field Values
CODE_NODE_REPLY
public static final byte CODE_NODE_REPLY
- See Also:
- Constant Field Values
CODE_DATA_LOOKUP
public static final byte CODE_DATA_LOOKUP
- See Also:
- Constant Field Values
CODE_DATA
public static final byte CODE_DATA
- See Also:
- Constant Field Values
CODE_STORE
public static final byte CODE_STORE
- See Also:
- Constant Field Values
CODE_STORE_REQUEST
public static final byte CODE_STORE_REQUEST
- See Also:
- Constant Field Values
CODE_HASH
public static final byte CODE_HASH
- See Also:
- Constant Field Values
CODE_HASH_REQUEST
public static final byte CODE_HASH_REQUEST
- See Also:
- Constant Field Values
CODE_REMOVE
public static final byte CODE_REMOVE
- See Also:
- Constant Field Values
MessageFactoryImpl
public MessageFactoryImpl(Map localMap,
Node local,
Space space)
createMessage
public Message createMessage(byte code,
DataInput in)
throws IOException,
UnknownMessageException
- Description copied from interface:
MessageFactory
- Creates a Message of type
code from the specified stream.
- Specified by:
createMessage in interface MessageFactory
- Throws:
UnknownMessageException - if the message code type is not supported
IOException
createReceiver
public Receiver createReceiver(byte code,
MessageServer server)
- Description copied from interface:
MessageFactory
- 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.
- Specified by:
createReceiver in interface MessageFactory
Copyright © 2010. All Rights Reserved.