Package jadex.serialization
Interface ISerializationServices
- All Known Implementing Classes:
SerializationServices
public interface ISerializationServices
Functionality for managing serialization.
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(InputStream is, ClassLoader cl) Decodes/deserializes an object.void
encode
(OutputStream os, ClassLoader cl, Object obj) Encodes/serializes an object for a particular receiver.static ISerializationServices
get()
Gets an instance of the serialization services.List
<jadex.common.transformation.traverser.ITraverseProcessor> Get the clone processors.List
<jadex.common.transformation.traverser.ITraverseProcessor> Gets the post-processors for decoding a received message.List
<jadex.common.transformation.traverser.ITraverseProcessor> Gets the pre-processors for encoding a received message.getSerializer
(int id) Returns a serializer per id.Returns all serializers.Get the string converters (can convert to and from string, possibly only for some types).boolean
isLocalReference
(Object object) Test if an object has reference semantics.boolean
isRemoteObject
(Object target) Test if an object is a remote object.
-
Method Details
-
get
Gets an instance of the serialization services.- Returns:
- Instance of serialization services, thread safe.
-
encode
Encodes/serializes an object for a particular receiver.- Parameters:
os
- OutputStream to write the object.cl
- The classloader used for encoding.obj
- Object to be encoded.
-
decode
Decodes/deserializes an object.- Parameters:
is
- InputStream to read.cl
- The classloader used for decoding.- Returns:
- Object to be encoded.
-
isRemoteObject
Test if an object is a remote object. -
isLocalReference
Test if an object has reference semantics. It is a reference when: - it implements IRemotable - it is an IService, IExternalAccess or IFuture - if the object has used an @Reference annotation at type level - has been explicitly set to be reference -
getPreprocessors
List<jadex.common.transformation.traverser.ITraverseProcessor> getPreprocessors()Gets the pre-processors for encoding a received message. -
getPostprocessors
List<jadex.common.transformation.traverser.ITraverseProcessor> getPostprocessors()Gets the post-processors for decoding a received message. -
getCloneProcessors
List<jadex.common.transformation.traverser.ITraverseProcessor> getCloneProcessors()Get the clone processors.- Returns:
- The clone processors.
-
getStringConverters
Get the string converters (can convert to and from string, possibly only for some types).- Returns:
- The converters by name (constants in IStringConverter).
-
getSerializers
ISerializer[] getSerializers()Returns all serializers.- Returns:
- Serializers.
-
getSerializer
Returns a serializer per id.- Parameters:
id
- The id.- Returns:
- The serializer.
-