public class Serializer extends Object
Event
s to an OutputStream
/ from an InputStream
. Uses a SiteAwareObjectInputStream
internally, so the right SiteClassLoader
is applied when
deserializing.Event
Modifier and Type | Method and Description |
---|---|
Event |
deserialize(byte[] data)
Deserializes an
Event from the given data. |
Event |
deserialize(InputStream data)
Deserializes an
Event from the given data. |
Environment |
getEnvironment()
Returns the
Environment that was used when creating this serializer. |
String |
getNodeId()
Returns to node id used when creating this serializer
|
Properties |
getPlatformConfig()
Return the platform configuration as
Properties . |
Site |
getSite(String siteName)
Returns the
Site with the given name |
void |
serialize(OutputStream out,
Event event)
Serializes the given
Event into the given OutputStream . |
public void serialize(OutputStream out, Event event) throws IOException
Event
into the given OutputStream
.out
- the OutputStream
to serialized the Event
intoevent
- the Event
to be serializedIOException
- if an error occurs during serializationpublic Event deserialize(InputStream data)
Event
from the given data.data
- the InputStream
containing the serialized Event
Event
, or null
if no event could be deserialized from the given datapublic Site getSite(String siteName)
Site
with the given namesiteName
- the name of the site to retrieveSite
public String getNodeId()
public Environment getEnvironment()
Environment
that was used when creating this serializer.Environment
public Properties getPlatformConfig()
Properties
.Copyright © 2011–2017 aiticon GmbH. All rights reserved.