public class MessageSlicer extends Object implements AutoCloseable
MessageAssembler
is used to re-assemble the messages.MessageAssembler
Modifier and Type | Class and Description |
---|---|
static class |
MessageSlicer.Builder |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_SLICING_TRIES |
Modifier and Type | Method and Description |
---|---|
static MessageSlicer.Builder |
builder()
Returns a new Builder for creating MessageSlicer instances.
|
void |
cancelSlicing(Predicate<org.opendaylight.yangtools.concepts.Identifier> filter)
Cancels all in-progress sliced message state that matches the given filter.
|
void |
checkExpiredSlicedMessageState()
Checks for and removes sliced message state that has expired due to inactivity from the assembling component
on the other end.
|
void |
close()
Closes and removes all in-progress sliced message state.
|
boolean |
handleMessage(Object message)
Invoked to handle messages pertaining to this class.
|
static boolean |
isHandledMessage(Object message)
Checks if the given message is handled by this class.
|
boolean |
slice(SliceOptions options)
Slices a message into chunks based on the serialized size, the maximum message slice size and the given
options.
|
public static final int DEFAULT_MAX_SLICING_TRIES
public static MessageSlicer.Builder builder()
public static boolean isHandledMessage(Object message)
handleMessage(Object)
methodmessage
- the message to checkpublic boolean slice(SliceOptions options)
options
- the SliceOptionspublic boolean handleMessage(Object message)
message
- the messagepublic void checkExpiredSlicedMessageState()
public void close()
close
in interface AutoCloseable
Copyright © 2019 OpenDaylight. All rights reserved.