Module datarush.library
Class AbstractObjectEncoderFactory
java.lang.Object
com.pervasive.datarush.encoding.binary.AbstractObjectEncoderFactory
- All Implemented Interfaces:
EncoderFactory
- Direct Known Subclasses:
AnnotationEncoderFactory,ItemSetEncoderFactory
Base implementation of
EncoderFactory for
customizing the encoding/decoding of ObjectTokenType.
To support a new object type, extend this class
rather than implementing EncoderFactory directly.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanisFactoryForType(TokenType type) Determine if this factory supports the given class type.protected abstract booleanisFactoryForType(Class<?> type) Determine if this factory supports the given class type.final TokenDecodernewDecoder(TokenType type) Create a newdecoderinstance for the given type.protected abstract TokenDecodernewDecoder(Class<?> type) Create a new decoder instance for the given type.newEncoder(TokenType type) Create a newencoderinstance for the given type.protected abstract TokenEncodernewEncoder(Class<?> type) Create a new encoder instance for the given type.
-
Constructor Details
-
AbstractObjectEncoderFactory
public AbstractObjectEncoderFactory()
-
-
Method Details
-
isFactoryForType
Description copied from interface:EncoderFactoryDetermine if this factory supports the given class type. A factory may support many types.- Specified by:
isFactoryForTypein interfaceEncoderFactory- Parameters:
type- the type to check- Returns:
- true if supported; false otherwise
-
newDecoder
Description copied from interface:EncoderFactoryCreate a newdecoderinstance for the given type. The type is specified to allow a single factory to serve multiple types.- Specified by:
newDecoderin interfaceEncoderFactory- Parameters:
type- the type which is to be decoded- Returns:
- a new decoder instance
-
newEncoder
Description copied from interface:EncoderFactoryCreate a newencoderinstance for the given type. The type is specified to allow a single factory to serve multiple types.- Specified by:
newEncoderin interfaceEncoderFactory- Parameters:
type- the type which is to be encoded- Returns:
- a new encoder instance
-
isFactoryForType
Determine if this factory supports the given class type. A factory may support many types.- Parameters:
type- the type to check- Returns:
- true if supported; false otherwise
-
newDecoder
Create a new decoder instance for the given type. The type is specified to allow a single factory to serve multiple types.- Parameters:
type- the class which is to be decoded- Returns:
- a new encoder instance
-
newEncoder
Create a new encoder instance for the given type. The type is specified to allow a single factory to serve multiple types.- Parameters:
type- the class which is to be decoded- Returns:
- a new decoder instance
-