public abstract class AbstractTokenEncoder extends Object implements TokenEncoder
Modifier | Constructor and Description |
---|---|
protected |
AbstractTokenEncoder()
Initializes a new encoder.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doSourceUpdated(TokenValued source)
Sets the source buffer for encoding.
|
void |
encodeField(BinaryBuilder buffer,
int index)
This implementation delegates to
TokenEncoder.encode(BinaryBuilder) . |
protected TokenValued |
getSource()
Returns the current source held by this encoder.
|
void |
setSource(TokenValued source)
This implementation sets the source variable and invokes
the method
doSourceUpdated(TokenValued) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encode
public final void setSource(TokenValued source)
doSourceUpdated(TokenValued)
.setSource
in interface TokenEncoder
source
- the value container to encodepublic void encodeField(BinaryBuilder buffer, int index)
TokenEncoder.encode(BinaryBuilder)
.
Implementations that require field-specific handling should override
this method instead.encodeField
in interface TokenEncoder
buffer
- the buffer to which to append the encodingindex
- the index of the field to encodeprotected final TokenValued getSource()
protected abstract void doSourceUpdated(TokenValued source)
source
- the buffer from which values to encode
are readCopyright © 2020 Actian Corporation. All rights reserved.