com.sun.grizzly.smart
Class SmartDecoderTransformer<E>
java.lang.Object
com.sun.grizzly.AbstractTransformer<Buffer,E>
com.sun.grizzly.smart.SmartDecoderTransformer<E>
- All Implemented Interfaces:
- SmartTransformer<Buffer,E>, Transformer<Buffer,E>
public class SmartDecoderTransformer<E>
- extends AbstractTransformer<Buffer,E>
- implements SmartTransformer<Buffer,E>
Smart decoder, which is able to decode a Buffer to a custom protocol
message.
- Author:
- Alexey Stashok
| Methods inherited from class com.sun.grizzly.AbstractTransformer |
getInput, getLastResult, getMemoryManager, getOutput, getProperties, getValue, hibernate, obtainMemoryManager, setInput, setMemoryManager, setOutput, transform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MESSAGE_PROCESSING_TREE_ATTR_NAME
public static final String MESSAGE_PROCESSING_TREE_ATTR_NAME
- See Also:
- Constant Field Values
messageProcessingTreeAttribute
protected Attribute<List> messageProcessingTreeAttribute
currentTransformerIdxAttribute
protected Attribute<Integer> currentTransformerIdxAttribute
SmartDecoderTransformer
public SmartDecoderTransformer(Class<E> messageClass)
getMessageClass
public Class<E> getMessageClass()
transform
public TransformationResult<E> transform(AttributeStorage storage,
Buffer input,
E output)
throws TransformationException
- Description copied from interface:
Transformer
- Transforms an input data to some custom representation.
- Specified by:
transform in interface Transformer<Buffer,E>
- 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,E>- Overrides:
release in class AbstractTransformer<Buffer,E>
- Parameters:
storage - the external state storage, where Transformer
could retrieve or store its state.
getPredefinedTransformers
public Map<Class,Class<? extends Transformer>> getPredefinedTransformers()
createTransformer
public Transformer createTransformer(Class fieldType,
Class<? extends Transformer> prefTransformerClass)
- Specified by:
createTransformer in interface SmartTransformer<Buffer,E>
getTransformer
protected Class<? extends Transformer> getTransformer(Class clazz)
Copyright © 2009 SUN Microsystems. All Rights Reserved.