org.qtunes.auth.control
Class ControlJSONSerializer

java.lang.Object
  extended by org.qtunes.core.util.JSONSerializer
      extended by org.qtunes.auth.control.ControlJSONSerializer

public class ControlJSONSerializer
extends JSONSerializer

A JSONSerializer that has been customizer to serialize/deserialize object likely to to passed to or from the ControlMethodInvoker


Constructor Summary
ControlJSONSerializer()
           
ControlJSONSerializer(java.lang.String[] features)
          Features: bitsetmap - bitset serialized as {bitset: fe00000 }
 
Method Summary
 java.lang.Object getCustomRead(java.util.Map m)
          Subclasses may override this method to return a more specific type of object than the Map specified.
 java.lang.Object getCustomWrite(java.lang.Object o)
          Get an object that can be serialized to represent the specified Object.
 
Methods inherited from class org.qtunes.core.util.JSONSerializer
getCustomRead, read, read, readAsProbableString, readCustomToken, setLaxKeyQuoting, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlJSONSerializer

public ControlJSONSerializer()

ControlJSONSerializer

public ControlJSONSerializer(java.lang.String[] features)
Features: bitsetmap - bitset serialized as {bitset: fe00000 }

Method Detail

getCustomWrite

public java.lang.Object getCustomWrite(java.lang.Object o)
Description copied from class: JSONSerializer
Get an object that can be serialized to represent the specified Object. This method is called when there is no default way to serialize the parameter - by default it throws an Exception saying the object cannot be serialized. It can be overridden by subclasses.

Overrides:
getCustomWrite in class JSONSerializer
Parameters:
o - an unserializable Object
Returns:
an Object which can be used in it's place

getCustomRead

public java.lang.Object getCustomRead(java.util.Map m)
Description copied from class: JSONSerializer
Subclasses may override this method to return a more specific type of object than the Map specified. Roughly the opposite of JSONSerializer.getCustomWrite(java.lang.Object).

Overrides:
getCustomRead in class JSONSerializer
Parameters:
m - a generic Map
Returns:
the Object that the Map represents.