Class TurbineJsonRpcService
java.lang.Object
org.apache.turbine.services.BaseInitable
org.apache.turbine.services.BaseService
org.apache.turbine.services.TurbineBaseService
org.apache.turbine.services.jsonrpc.TurbineJsonRpcService
- All Implemented Interfaces:
Initable
,JsonRpcService
,Service
This is a service that will respond to JSON-RPC calls.
- Version:
- $Id$
- Author:
- Scott Eade
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The key used to store the bridge in the session.Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, serviceBroker
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
Fields inherited from interface org.apache.turbine.services.jsonrpc.JsonRpcService
SERVICE_NAME
Fields inherited from interface org.apache.turbine.services.Service
SERVICE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearBridge
(jakarta.servlet.http.HttpSession session) Remove theJSONRPCBridge
from the sessionorg.jabsorb.JSONRPCBridge
getBridge
(jakarta.servlet.http.HttpSession session) Get theJSONRPCBridge
from the sessionprocessCall
(CharArrayWriter cdata, org.jabsorb.JSONRPCBridge json_bridge, jakarta.servlet.http.HttpServletRequest request) Process a JSON RPC callvoid
registerObject
(jakarta.servlet.http.HttpSession session, String key, Object value) Register an object with theJSONRPCBridge
in a given sessionvoid
registerObjectGlobal
(String key, Object value) Register an object with theJSONRPCBridge
globallyMethods inherited from class org.apache.turbine.services.TurbineBaseService
init, init, init, shutdown
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 Details
-
JSON_BRIDGE_KEY
The key used to store the bridge in the session.- See Also:
-
-
Constructor Details
-
TurbineJsonRpcService
public TurbineJsonRpcService()
-
-
Method Details
-
processCall
public Object processCall(CharArrayWriter cdata, org.jabsorb.JSONRPCBridge json_bridge, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:JsonRpcService
Process a JSON RPC call- Specified by:
processCall
in interfaceJsonRpcService
- Parameters:
cdata
- the JSON datajson_bridge
- theJSONRPCBridge
objectrequest
- the request- Returns:
- the return object of the JSON RPC call
-
registerObjectGlobal
Description copied from interface:JsonRpcService
Register an object with theJSONRPCBridge
globally- Specified by:
registerObjectGlobal
in interfaceJsonRpcService
- Parameters:
key
- the name of the object in the sessionvalue
- the object to register (not null)
-
registerObject
Description copied from interface:JsonRpcService
Register an object with theJSONRPCBridge
in a given session- Specified by:
registerObject
in interfaceJsonRpcService
- Parameters:
session
- the sessionkey
- the name of the object in the sessionvalue
- the object to register (not null)
-
getBridge
Description copied from interface:JsonRpcService
Get theJSONRPCBridge
from the session- Specified by:
getBridge
in interfaceJsonRpcService
- Parameters:
session
- the session- Returns:
- the
JSONRPCBridge
instance
-
clearBridge
Description copied from interface:JsonRpcService
Remove theJSONRPCBridge
from the session- Specified by:
clearBridge
in interfaceJsonRpcService
- Parameters:
session
- the session
-