Class MessageAssembler
- java.lang.Object
-
- org.opendaylight.controller.cluster.messaging.MessageAssembler
-
- All Implemented Interfaces:
AutoCloseable
public final class MessageAssembler extends Object implements AutoCloseable
This class re-assembles messages sliced into smaller chunks byMessageSlicer
.- Author:
- Thomas Pantelis
- See Also:
MessageSlicer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageAssembler.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageAssembler.Builder
builder()
Returns a new Builder for creating MessageAssembler instances.void
checkExpiredAssembledMessageState()
Checks for and removes assembled message state that has expired due to inactivity from the slicing component on the other end.void
close()
boolean
handleMessage(Object message, @NonNull akka.actor.ActorRef sendTo)
Invoked to handle message slices and other messages pertaining to this class.static boolean
isHandledMessage(Object message)
Checks if the given message is handled by this class.
-
-
-
Method Detail
-
builder
public static MessageAssembler.Builder builder()
Returns a new Builder for creating MessageAssembler instances.- Returns:
- a Builder instance
-
isHandledMessage
public static boolean isHandledMessage(Object message)
Checks if the given message is handled by this class. If so, it should be forwarded to thehandleMessage(Object, ActorRef)
method- Parameters:
message
- the message to check- Returns:
- true if handled, false otherwise
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
checkExpiredAssembledMessageState
public void checkExpiredAssembledMessageState()
Checks for and removes assembled message state that has expired due to inactivity from the slicing component on the other end.
-
handleMessage
public boolean handleMessage(Object message, @NonNull akka.actor.ActorRef sendTo)
Invoked to handle message slices and other messages pertaining to this class.- Parameters:
message
- the messagesendTo
- the reference of the actor to which subsequent message slices should be sent- Returns:
- true if the message was handled, false otherwise
-
-