java.lang.Object
swim.codec.Encoder<I,O>
swim.codec.DynamicEncoder<I,O>
Dynamically generated
Encoder continuation.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind()Returns the encoded result.protected abstract voidLifecycle callback invoked after thisDynamicEncoderhas finished encoding avalue.doEncode()Returns a newEncodercontinuation for thisDynamicEncoder, ornullif thisDynamicEncoderis done.Returns anEncoderthat represents the continuation of how to encode the giveninputobject.Returns anEncodercontinuation whose behavior may be altered by the given out-of-bandcondition.pull(OutputBuffer<?> output) Incrementally encodes as muchoutputbuffer data as possible, and returns anotherEncoderthat represents the continuation of how to write additional buffer data.trap()Returns the encode error.
-
Field Details
-
encoding
Current encoder continuation.
-
-
Constructor Details
-
DynamicEncoder
public DynamicEncoder()
-
-
Method Details
-
feed
Description copied from class:EncoderReturns anEncoderthat represents the continuation of how to encode the giveninputobject. -
pull
Description copied from class:EncoderIncrementally encodes as muchoutputbuffer data as possible, and returns anotherEncoderthat represents the continuation of how to write additional buffer data. IfisLastistrue, thenpullmust return a terminatedEncoder, i.e. anEncoderin the done state, or in the error state. The givenoutputbuffer is only guaranteed to be valid for the duration of the method call; references tooutputmust not be stored. -
fork
Description copied from class:EncoderReturns anEncodercontinuation whose behavior may be altered by the given out-of-bandcondition. -
bind
Description copied from class:EncoderReturns the encoded result. Only guaranteed to return a result when in the done state. -
trap
Description copied from class:EncoderReturns the encode error. Only guaranteed to return an error when in the error state. -
doEncode
Returns a newEncodercontinuation for thisDynamicEncoder, ornullif thisDynamicEncoderis done. -
didEncode
Lifecycle callback invoked after thisDynamicEncoderhas finished encoding avalue.
-