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 by MessageSlicer.
Author:
Thomas Pantelis
See Also:
  • Method Details

    • 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 the handleMessage(Object, ActorRef) method
      Parameters:
      message - the message to check
      Returns:
      true if handled, false otherwise
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • 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 ActorRef sendTo)
      Invoked to handle message slices and other messages pertaining to this class.
      Parameters:
      message - the message
      sendTo - the reference of the actor to which subsequent message slices should be sent
      Returns:
      true if the message was handled, false otherwise