com.twistedmatrix.spread
Class JellyPolicy

java.lang.Object
  |
  +--com.twistedmatrix.spread.JellyPolicy
Direct Known Subclasses:
PBJellyPolicy

public class JellyPolicy
extends java.lang.Object

Policy for dealing with unknown objects during jellying and unjellying.


Constructor Summary
JellyPolicy()
           
 
Method Summary
 java.lang.Object jellyOther(Jelly.JellyEncoder encoder, java.lang.Object o)
          Jelly objects not handled by base Jelly protocol.
 java.lang.Object unjellyOther(Jelly.JellyDecoder decoder, ByteString type, java.util.List sexp)
          Unjelly s-expressions not handled by base Jelly protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JellyPolicy

public JellyPolicy()
Method Detail

jellyOther

public java.lang.Object jellyOther(Jelly.JellyEncoder encoder,
                                   java.lang.Object o)
Jelly objects not handled by base Jelly protocol. Default policy is not to handle it.
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 sexp)
Unjelly s-expressions not handled by base Jelly protocol. Default policy is not to handle it.
Returns:
an unjellied object, or null if it can't be unjellied.