org.directwebremoting.jsonrpc.io
Class JsonRpcCalls

java.lang.Object
  extended by org.directwebremoting.extend.Calls
      extended by org.directwebremoting.jsonrpc.io.JsonRpcCalls
All Implemented Interfaces:
java.lang.Iterable<Call>

public class JsonRpcCalls
extends Calls

An extension to the Calls object to hold JsonRpc version information.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
JsonRpcCalls()
           
 
Method Summary
 void addParseError(java.lang.String message)
          If parsing has failed and we should not continue, then we might want to carry on with the parse to get information like the id that is needed for the response, but remembering the error messages
 StringWrapper getId()
          A version of Calls.getBatchId() that returns a StringWrapper so we can return a verbatim string because id is really a variant type in Javascript.
 java.lang.String getParseErrors()
          Get a summary of the parse errors.
 java.lang.String getVersion()
           
 boolean isParseErrorClean()
          Did parsing complete without errors?
 void setVersion(java.lang.String version)
           
 
Methods inherited from class org.directwebremoting.extend.Calls
addCall, getBatchId, getCall, getCallCount, iterator, setBatchId, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonRpcCalls

public JsonRpcCalls()
Method Detail

getId

public StringWrapper getId()
A version of Calls.getBatchId() that returns a StringWrapper so we can return a verbatim string because id is really a variant type in Javascript.

See Also:
Calls.getBatchId()

getVersion

public java.lang.String getVersion()
Returns:
The JsonRpc version string as defined in the jsonrpc attribute

setVersion

public void setVersion(java.lang.String version)
See Also:
getVersion()

addParseError

public void addParseError(java.lang.String message)
If parsing has failed and we should not continue, then we might want to carry on with the parse to get information like the id that is needed for the response, but remembering the error messages


isParseErrorClean

public boolean isParseErrorClean()
Did parsing complete without errors?

See Also:
addParseError(String)

getParseErrors

public java.lang.String getParseErrors()
Get a summary of the parse errors. If there is more than one parse error, then return them all concatenated by a ', '


Copyright 2008