com.novell.sentinel.json
Class DelegatingJSONHandlerImpl

java.lang.Object
  extended by com.novell.sentinel.json.DelegatingJSONHandlerImpl
All Implemented Interfaces:
JSONHandler

public class DelegatingJSONHandlerImpl
extends Object
implements JSONHandler

Simple implementation of JSONHandler that delegates all calls to another JSONHandler. Derived classes can selectively override methods to do something useful.


Constructor Summary
DelegatingJSONHandlerImpl()
           
DelegatingJSONHandlerImpl(JSONHandler _delegate)
           
 
Method Summary
 JSONHandler booleanValue(boolean booleanValue)
          Report a JSON boolean value.
 JSONHandler endArray()
          End the current JSON array.
 JSONHandler endObject()
          End the current JSON object.
 JSONHandler getDelegate()
           
 JSONHandler name(String valueName)
          Report the name for the following value (object, array, or simple value).
 JSONHandler nullValue()
          Report a JSON null value.
 JSONHandler numberValue(String numberValue)
          Report a JSON number value.
 void setDelegate(JSONHandler _delegate)
           
 JSONHandler startArray()
          Start a new JSON array.
 JSONHandler startObject()
          Start a new JSON object.
 JSONHandler stringValue(String value)
          Report a JSON string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingJSONHandlerImpl

public DelegatingJSONHandlerImpl()

DelegatingJSONHandlerImpl

public DelegatingJSONHandlerImpl(JSONHandler _delegate)
Method Detail

getDelegate

public JSONHandler getDelegate()

setDelegate

public void setDelegate(JSONHandler _delegate)

startObject

public JSONHandler startObject()
                        throws IOException
Description copied from interface: JSONHandler
Start a new JSON object.

Specified by:
startObject in interface JSONHandler
Returns:
This handler instance.
Throws:
IOException

endObject

public JSONHandler endObject()
                      throws IOException
Description copied from interface: JSONHandler
End the current JSON object.

Specified by:
endObject in interface JSONHandler
Returns:
This handler instance.
Throws:
IOException

startArray

public JSONHandler startArray()
                       throws IOException
Description copied from interface: JSONHandler
Start a new JSON array.

Specified by:
startArray in interface JSONHandler
Returns:
This handler instance.
Throws:
IOException

endArray

public JSONHandler endArray()
                     throws IOException
Description copied from interface: JSONHandler
End the current JSON array.

Specified by:
endArray in interface JSONHandler
Returns:
This handler instance.
Throws:
IOException

name

public JSONHandler name(String valueName)
                 throws IOException
Description copied from interface: JSONHandler
Report the name for the following value (object, array, or simple value).

Specified by:
name in interface JSONHandler
Parameters:
valueName - The value name.
Returns:
This handler instance.
Throws:
IOException

stringValue

public JSONHandler stringValue(String value)
                        throws IOException
Description copied from interface: JSONHandler
Report a JSON string value.

Specified by:
stringValue in interface JSONHandler
Parameters:
value - The value.
Returns:
This handler instance.
Throws:
IOException

numberValue

public JSONHandler numberValue(String numberValue)
                        throws IOException
Description copied from interface: JSONHandler
Report a JSON number value. The implementation is responsible for converting the lexical representation into the appropriate Java type.

Specified by:
numberValue in interface JSONHandler
Parameters:
numberValue - The lexical representation of a JSON number value.
Returns:
This handler instance.
Throws:
IOException

booleanValue

public JSONHandler booleanValue(boolean booleanValue)
                         throws IOException
Description copied from interface: JSONHandler
Report a JSON boolean value.

Specified by:
booleanValue in interface JSONHandler
Parameters:
booleanValue - true or false
Returns:
This handler instance.
Throws:
IOException

nullValue

public JSONHandler nullValue()
                      throws IOException
Description copied from interface: JSONHandler
Report a JSON null value.

Specified by:
nullValue in interface JSONHandler
Returns:
This handler instance.
Throws:
IOException