public static class SliceOptions.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SliceOptions |
build()
Builds a new SliceOptions instance.
|
protected void |
checkSealed() |
SliceOptions.Builder |
fileBackedOutputStream(FileBackedOutputStream newFileBackedStream)
Sets the
FileBackedOutputStream containing the message data to slice. |
SliceOptions.Builder |
identifier(org.opendaylight.yangtools.concepts.Identifier newIdentifier)
Sets the identifier of the component to slice.
|
<T extends Serializable> |
message(T newMessage)
Sets the message to slice.
|
SliceOptions.Builder |
onFailureCallback(Consumer<Throwable> newOnFailureCallback)
Sets the callback to be notified of failure.
|
SliceOptions.Builder |
replyTo(akka.actor.ActorRef newReplyTo)
Sets the reference of the actor to which message slice replies should be sent.
|
SliceOptions.Builder |
sendTo(akka.actor.ActorRef sendTo)
Sets the reference of the actor to which to send the message slices.
|
SliceOptions.Builder |
sendTo(akka.actor.ActorSelection sendTo)
Sets the ActorSelection to which to send the message slices.
|
public SliceOptions.Builder identifier(org.opendaylight.yangtools.concepts.Identifier newIdentifier)
newIdentifier
- the identifierpublic SliceOptions.Builder fileBackedOutputStream(FileBackedOutputStream newFileBackedStream)
FileBackedOutputStream
containing the message data to slice.newFileBackedStream
- the FileBackedOutputStream
public <T extends Serializable> SliceOptions.Builder message(T newMessage)
FileBackedOutputStream
. If the
message doesn't need to be sliced, ie its serialized size is less than the maximum message slice size, then
the original message is sent. Otherwise the first message slice is sent.
Note: a FileBackedOutputStreamFactory
must be set in the MessageSlicer
.
T
- the Serializable message typenewMessage
- the messagepublic SliceOptions.Builder sendTo(akka.actor.ActorRef sendTo)
sendTo
- the ActorRefpublic SliceOptions.Builder sendTo(akka.actor.ActorSelection sendTo)
sendTo
- the ActorSelectionpublic SliceOptions.Builder replyTo(akka.actor.ActorRef newReplyTo)
MessageSlicer.handleMessage(Object)
method.newReplyTo
- the ActorRefpublic SliceOptions.Builder onFailureCallback(Consumer<Throwable> newOnFailureCallback)
newOnFailureCallback
- the callbackpublic SliceOptions build()
protected void checkSealed()
Copyright © 2019 OpenDaylight. All rights reserved.