Interface JsonRpcService
-
- All Known Implementing Classes:
TurbineJsonRpcService
public interface JsonRpcService extends Service
The interface an JsonRpcService implements.- Version:
- $Id$
- Author:
- Scott Eade
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_NAMETurbineJsonRpcService.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearBridge(HttpSession session)Remove theJSONRPCBridgefrom the sessionorg.jabsorb.JSONRPCBridgegetBridge(HttpSession session)Get theJSONRPCBridgefrom the sessionObjectprocessCall(CharArrayWriter cdata, org.jabsorb.JSONRPCBridge json_bridge, HttpServletRequest request)Process a JSON RPC callvoidregisterObject(HttpSession session, String key, Object value)Register an object with theJSONRPCBridgein a given sessionvoidregisterObjectGlobal(String key, Object value)Register an object with theJSONRPCBridgeglobally-
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
-
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
TurbineJsonRpcService.- See Also:
- Constant Field Values
-
-
Method Detail
-
processCall
Object processCall(CharArrayWriter cdata, org.jabsorb.JSONRPCBridge json_bridge, HttpServletRequest request)
Process a JSON RPC call- Parameters:
cdata- the JSON datajson_bridge- theJSONRPCBridgeobjectrequest- the request- Returns:
- the return object of the JSON RPC call
-
registerObject
void registerObject(HttpSession session, String key, Object value)
Register an object with theJSONRPCBridgein a given session- Parameters:
session- the sessionkey- the name of the object in the sessionvalue- the object to register (not null)
-
registerObjectGlobal
void registerObjectGlobal(String key, Object value)
Register an object with theJSONRPCBridgeglobally- Parameters:
key- the name of the object in the sessionvalue- the object to register (not null)
-
getBridge
org.jabsorb.JSONRPCBridge getBridge(HttpSession session)
Get theJSONRPCBridgefrom the session- Parameters:
session- the session- Returns:
- the
JSONRPCBridgeinstance
-
clearBridge
void clearBridge(HttpSession session)
Remove theJSONRPCBridgefrom the session- Parameters:
session- the session
-
-