Class BinaryResponseProcessor
- java.lang.Object
-
- jadex.binary.AbstractCodec
-
- jadex.extension.rs.publish.binary.BinaryResponseProcessor
-
- All Implemented Interfaces:
IDecoderHandler
,ITraverseProcessor
public class BinaryResponseProcessor extends AbstractCodec
Codec for encoding and decoding response objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected IBeanIntrospector
intro
Bean introspector for inspecting beans.
-
Constructor Summary
Constructors Constructor Description BinaryResponseProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
createObject(java.lang.Class<?> clazz, IDecodingContext context)
Creates the object during decoding.java.lang.Object
encode(java.lang.Object object, java.lang.Class<?> clazz, java.util.List<ITraverseProcessor> preprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, Traverser traverser, java.lang.ClassLoader targetcl, IEncodingContext ec)
Encode the object.boolean
isApplicable(java.lang.Class<?> clazz)
Tests if the decoder can decode the class.boolean
isApplicable(java.lang.Object object, java.lang.Class<?> clazz, boolean clone, java.lang.ClassLoader targetcl)
Test if the processor is applicable.-
Methods inherited from class jadex.binary.AbstractCodec
canReference, decode, decodeSubObjects, isApplicable, isFixedFrame, process, recordKnownDecodedObject
-
-
-
-
Field Detail
-
intro
protected IBeanIntrospector intro
Bean introspector for inspecting beans.
-
-
Method Detail
-
isApplicable
public boolean isApplicable(java.lang.Class<?> clazz)
Tests if the decoder can decode the class.- Specified by:
isApplicable
in interfaceIDecoderHandler
- Specified by:
isApplicable
in classAbstractCodec
- Parameters:
clazz
- The class.- Returns:
- True, if the decoder can decode this class.
-
createObject
public java.lang.Object createObject(java.lang.Class<?> clazz, IDecodingContext context)
Creates the object during decoding.- Specified by:
createObject
in classAbstractCodec
- Parameters:
clazz
- The class of the object.context
- The decoding context.- Returns:
- The created object.
-
isApplicable
public boolean isApplicable(java.lang.Object object, java.lang.Class<?> clazz, boolean clone, java.lang.ClassLoader targetcl)
Test if the processor is applicable.- Parameters:
object
- The object.targetcl
- If not null, the traverser should make sure that the result object is compatible with the class loader, e.g. by cloning the object using the class loaded from the target class loader.- Returns:
- True, if is applicable.
-
encode
public java.lang.Object encode(java.lang.Object object, java.lang.Class<?> clazz, java.util.List<ITraverseProcessor> preprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, Traverser traverser, java.lang.ClassLoader targetcl, IEncodingContext ec)
Encode the object.- Specified by:
encode
in classAbstractCodec
-
-