public class TurbineJsonRpcService extends TurbineBaseService implements JsonRpcService
Modifier and Type | Field and Description |
---|---|
static String |
JSON_BRIDGE_KEY
The key used to store the bridge in the session.
|
configuration, name, serviceBroker
initableBroker, isInitialized
SERVICE_NAME
Constructor and Description |
---|
TurbineJsonRpcService() |
Modifier and Type | Method and Description |
---|---|
void |
clearBridge(HttpSession session)
Remove the
JSONRPCBridge from the session |
org.jabsorb.JSONRPCBridge |
getBridge(HttpSession session)
Get the
JSONRPCBridge from the session |
Object |
processCall(CharArrayWriter cdata,
org.jabsorb.JSONRPCBridge json_bridge,
HttpServletRequest request)
Process a JSON RPC call
|
void |
registerObject(HttpSession session,
String key,
Object value)
Register an object with the
JSONRPCBridge in a given session |
void |
registerObjectGlobal(String key,
Object value)
Register an object with the
JSONRPCBridge globally |
init, init, init, shutdown
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
getInit, getInitableBroker, setInit, setInitableBroker
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration, getName, getProperties, setName, setServiceBroker
public static final String JSON_BRIDGE_KEY
public TurbineJsonRpcService()
public Object processCall(CharArrayWriter cdata, org.jabsorb.JSONRPCBridge json_bridge, HttpServletRequest request)
JsonRpcService
processCall
in interface JsonRpcService
cdata
- the JSON datajson_bridge
- the JSONRPCBridge
objectrequest
- the requestpublic void registerObjectGlobal(String key, Object value)
JsonRpcService
JSONRPCBridge
globallyregisterObjectGlobal
in interface JsonRpcService
key
- the name of the object in the sessionvalue
- the object to registerpublic void registerObject(HttpSession session, String key, Object value)
JsonRpcService
JSONRPCBridge
in a given sessionregisterObject
in interface JsonRpcService
session
- the sessionkey
- the name of the object in the sessionvalue
- the object to registerpublic org.jabsorb.JSONRPCBridge getBridge(HttpSession session)
JsonRpcService
JSONRPCBridge
from the sessiongetBridge
in interface JsonRpcService
session
- the sessionJSONRPCBridge
instancepublic void clearBridge(HttpSession session)
JsonRpcService
JSONRPCBridge
from the sessionclearBridge
in interface JsonRpcService
session
- the sessionCopyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.