org.pm4j.core.pm.serialization
Class PmContentSerializer

java.lang.Object
  extended by org.pm4j.core.pm.serialization.PmContentSerializer

public class PmContentSerializer
extends java.lang.Object

Supports serialization and de-serialization of PM content.

Configurable PmAspects of PMs may be serialized/de-serialized with the help of serializable PmContentContainer instances.

The transferred PMs are identified by name. These names are in fact PM path expressions that may be resolved by the PmConversation that provides the context of the receiving PmContentSerializer.

Example: TODO

Author:
olaf boede

Constructor Summary
PmContentSerializer()
           
PmContentSerializer(PmContentCfg pmContentCfg)
          Initializes the PmContentSerializer with a content configuration.
 
Method Summary
 PmObject deserialize(PmObject pmCtxt, byte[] bytes)
           
 PmObject deserialize(PmObject pmCtxt, java.io.InputStream is)
          De-serializes a set of PM content objects from the given stream.
 void serialize(java.io.OutputStream os, java.lang.String remotePmPath, PmObject pm)
           
 byte[] serialize(PmObject pmCtxt)
           
 void serialize(PmObject pmCtxt, java.io.OutputStream os)
           
 byte[] serialize(java.lang.String remotePmPath, PmObject pm)
           
 byte[] serializeWithPmMessages(PmObject pmCtxt)
           
 void serializeWithPmMessages(PmObject pmCtxt, java.io.OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmContentSerializer

public PmContentSerializer(PmContentCfg pmContentCfg)
Initializes the PmContentSerializer with a content configuration.

Parameters:
pmContentCfg -

PmContentSerializer

public PmContentSerializer()
Method Detail

serialize

public void serialize(PmObject pmCtxt,
                      java.io.OutputStream os)

serializeWithPmMessages

public void serializeWithPmMessages(PmObject pmCtxt,
                                    java.io.OutputStream os)

serialize

public byte[] serialize(PmObject pmCtxt)

serializeWithPmMessages

public byte[] serializeWithPmMessages(PmObject pmCtxt)

serialize

public void serialize(java.io.OutputStream os,
                      java.lang.String remotePmPath,
                      PmObject pm)

serialize

public byte[] serialize(java.lang.String remotePmPath,
                        PmObject pm)

deserialize

public PmObject deserialize(PmObject pmCtxt,
                            java.io.InputStream is)
De-serializes a set of PM content objects from the given stream.

The following TODO: we need a kind of content resolver...

Parameters:
is -

deserialize

public PmObject deserialize(PmObject pmCtxt,
                            byte[] bytes)