public class JavaExternalSerializerProtocol extends AbstractSerializationProtocol
SerializationProtocol that uses Java's default serialization mechanism. This means
that exceptions will come from serializing objects that do not implement SerializablemuleContext| Constructor and Description |
|---|
JavaExternalSerializerProtocol() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
doDeserialize(InputStream inputStream,
ClassLoader classLoader)
Deserializes the given
inputStream using the provided classLoader. |
protected byte[] |
doSerialize(Object object)
Serializes the given object.
|
protected <T> T |
postInitialize(T object) |
void |
serialize(Object object,
OutputStream out)
Serializes the given object and writes the result into
out |
deserialize, deserialize, deserialize, deserialize, serialize, setMuleContextpublic void serialize(Object object, OutputStream out) throws SerializationException
outserialize in interface SerializationProtocolserialize in class AbstractSerializationProtocolobject - the object to be serialized. Might be nullout - an OutputStream where the result will be writtenSerializationException - in case of unexpected exceptionprotected byte[] doSerialize(Object object) throws Exception
doSerialize in class AbstractSerializationProtocolobject - the object to be serializedException - any exception thrown. Base class will handle accordinglyprotected <T> T doDeserialize(InputStream inputStream, ClassLoader classLoader) throws Exception
inputStream using the provided classLoader. No need to worry about error handling or
deserialization post initialization. Base class does all of that automaticallydoDeserialize in class AbstractSerializationProtocolinputStream - an open InputStream, not to be explicitly closed in this methodclassLoader - a ClassLoaderExceptionprotected <T> T postInitialize(T object)
postInitialize in class AbstractSerializationProtocolCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.