Class MessageAssembler
java.lang.Object
org.opendaylight.controller.cluster.messaging.MessageAssembler
- All Implemented Interfaces:
AutoCloseable
This class re-assembles messages sliced into smaller chunks by
MessageSlicer
.- Author:
- Thomas Pantelis
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageAssembler.Builder
builder()
Returns a new Builder for creating MessageAssembler instances.void
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 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 Details
-
builder
Returns a new Builder for creating MessageAssembler instances.- Returns:
- a Builder instance
-
isHandledMessage
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
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
-