ist.palcom.routing
Class AbstractRoutingManager2.ChoppedMessageHandler

java.lang.Object
  extended by ist.palcom.routing.AbstractRoutingManager2.ChoppedMessageHandler
Enclosing class:
AbstractRoutingManager2

protected class AbstractRoutingManager2.ChoppedMessageHandler
extends java.lang.Object

Handles chopping and reassembling of messages


Method Summary
 Message[] chopMessage(int sendBufferSize, Message message)
           
 Message rebuildChopped(Message choppedMessage)
          Reassembles chopped messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

chopMessage

public Message[] chopMessage(int sendBufferSize,
                             Message message)
Parameters:
sendBufferSize - The largest size of a message to send.
message - The message to chop.
Returns:
an array with either the original message, the original message chopped in small messages or an empty array if the send buffer is to small for sending the message.

rebuildChopped

public Message rebuildChopped(Message choppedMessage)
Reassembles chopped messages.

Parameters:
choppedMessage - The message part to assemble with any earlier received parts of the message.
Returns:
the the entire message if it was the last part or null otherwise.