com.twistedmatrix.spread.pb
Class PBJellyPolicy

java.lang.Object
  |
  +--com.twistedmatrix.spread.JellyPolicy
        |
        +--com.twistedmatrix.spread.pb.PBJellyPolicy

public class PBJellyPolicy
extends JellyPolicy

Jelly policy for Perspective Broker. Subclass this to customize jellying behaviour in your PB connections.


Constructor Summary
PBJellyPolicy()
           
 
Method Summary
 java.lang.Object jellyOther(Jelly.JellyEncoder encoder, java.lang.Object o)
          Jellying support for RemoteReferences and Referenceables.
 void registerSerializer(java.lang.Class klass, CopyableSerializer serializer)
          Register a serializer for a class.
 void registerUnserializer(ByteString typeName, CopyableUnserializer unserializer)
          Register an unserializer for a copyable type name.
 java.lang.Object unjellyOther(Jelly.JellyDecoder decoder, ByteString type, java.util.List lst)
          Deal with types added by PB.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBJellyPolicy

public PBJellyPolicy()
Method Detail

registerSerializer

public void registerSerializer(java.lang.Class klass,
                               CopyableSerializer serializer)
Register a serializer for a class.

registerUnserializer

public void registerUnserializer(ByteString typeName,
                                 CopyableUnserializer unserializer)
Register an unserializer for a copyable type name.

jellyOther

public java.lang.Object jellyOther(Jelly.JellyEncoder encoder,
                                   java.lang.Object o)
Jellying support for RemoteReferences and Referenceables.
Overrides:
jellyOther in class JellyPolicy
Following copied from class: com.twistedmatrix.spread.JellyPolicy
Returns:
a jelly S-expression, or null if object is unjellyable.

unjellyOther

public java.lang.Object unjellyOther(Jelly.JellyDecoder decoder,
                                     ByteString type,
                                     java.util.List lst)
Deal with types added by PB.
Overrides:
unjellyOther in class JellyPolicy
Following copied from class: com.twistedmatrix.spread.JellyPolicy
Returns:
an unjellied object, or null if it can't be unjellied.