org.glassfish.grizzly.smart.transformers
Class ArrayDecoder
java.lang.Object
org.glassfish.grizzly.AbstractTransformer<Buffer,E>
org.glassfish.grizzly.smart.transformers.AbstractSmartMemberDecoder<E>
org.glassfish.grizzly.smart.transformers.SequenceDecoder<Object>
org.glassfish.grizzly.smart.transformers.ArrayDecoder
- All Implemented Interfaces:
- SmartMemberTransformer<Buffer,Object>, Transformer<Buffer,Object>
public class ArrayDecoder
- extends SequenceDecoder<Object>
- Author:
- oleksiys
| Methods inherited from class org.glassfish.grizzly.smart.transformers.SequenceDecoder |
checkSize, getAnnotatedLimit, getAnnotatedSize, getComponentDecoder, getComponentType, getConfig, getSequence, initialize, saveState, setComponentDecoder, setComponentType, setConfig |
| Methods inherited from class org.glassfish.grizzly.AbstractTransformer |
getInput, getLastResult, getMemoryManager, getOutput, getProperties, getValue, getValue, hibernate, obtainMemoryManager, removeValue, setInput, setMemoryManager, setOutput, setValue, transform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentElementIdxAttribute
protected Attribute<Integer> currentElementIdxAttribute
ArrayDecoder
public ArrayDecoder()
transform
public TransformationResult<Object> transform(AttributeStorage storage,
Buffer input,
Object output)
throws TransformationException
- Description copied from interface:
Transformer
- Transforms an input data to some custom representation.
- Specified by:
transform in interface Transformer<Buffer,Object>- Overrides:
transform in class SequenceDecoder<Object>
- Parameters:
storage - the external state storage, where Transformer
could retrieve or store its state.
- Returns:
- the result
TransformationResult
- Throws:
TransformationException
release
public void release(AttributeStorage storage)
- Description copied from interface:
Transformer
- The Transformer has done its work and can release all
associated resource.
- Specified by:
release in interface Transformer<Buffer,Object>- Overrides:
release in class SequenceDecoder<Object>
- Parameters:
storage - the external state storage, where Transformer
could retrieve or store its state.
createSequence
protected Object createSequence(AttributeStorage storage,
int size)
- Description copied from class:
SequenceDecoder
- Creates a sequence object with certain size.
- Specified by:
createSequence in class SequenceDecoder<Object>
- Parameters:
storage - attribute storagesize - the sequence size
set
protected void set(AttributeStorage storage,
Object sequence,
Object component)
- Description copied from class:
SequenceDecoder
- Stores an element into the sequence.
- Specified by:
set in class SequenceDecoder<Object>
- Parameters:
storage - attribute storage.sequence - sequence object.component - sequence element.
next
protected boolean next(AttributeStorage storage,
Object sequence)
- Description copied from class:
SequenceDecoder
- Moves to next sequence element and makes it current.
Returns true, if there is next elements in sequence,
or false otherwise.
- Specified by:
next in class SequenceDecoder<Object>
- Parameters:
storage - attribute storage.sequence - sequence object.
- Returns:
- true, if there is next elements in sequence,
or false otherwise.
size
protected int size(AttributeStorage storage,
Object sequence)
- Description copied from class:
SequenceDecoder
- Returns the size of the sequence.
- Specified by:
size in class SequenceDecoder<Object>
- Parameters:
storage - attribute storage.sequence - sequence object.
- Returns:
- the size of the sequence.
Copyright © 2009 SUN Microsystems. All Rights Reserved.