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 StringThe key used to store the bridge in the session.Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, serviceBrokerFields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitializedFields inherited from interface org.apache.turbine.services.jsonrpc.JsonRpcService
SERVICE_NAMEFields inherited from interface org.apache.turbine.services.Service
SERVICE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearBridge(jakarta.servlet.http.HttpSession session) Remove theJSONRPCBridgefrom the sessionorg.jabsorb.JSONRPCBridgegetBridge(jakarta.servlet.http.HttpSession session) Get theJSONRPCBridgefrom the sessionprocessCall(CharArrayWriter cdata, org.jabsorb.JSONRPCBridge json_bridge, jakarta.servlet.http.HttpServletRequest request) Process a JSON RPC callvoidregisterObject(jakarta.servlet.http.HttpSession session, String key, Object value) Register an object with theJSONRPCBridgein a given sessionvoidregisterObjectGlobal(String key, Object value) Register an object with theJSONRPCBridgegloballyMethods inherited from class org.apache.turbine.services.TurbineBaseService
init, init, init, shutdownMethods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBrokerMethods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBrokerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdownMethods 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:JsonRpcServiceProcess a JSON RPC call- Specified by:
processCallin interfaceJsonRpcService- Parameters:
cdata- the JSON datajson_bridge- theJSONRPCBridgeobjectrequest- the request- Returns:
- the return object of the JSON RPC call
-
registerObjectGlobal
Description copied from interface:JsonRpcServiceRegister an object with theJSONRPCBridgeglobally- Specified by:
registerObjectGlobalin interfaceJsonRpcService- Parameters:
key- the name of the object in the sessionvalue- the object to register (not null)
-
registerObject
Description copied from interface:JsonRpcServiceRegister an object with theJSONRPCBridgein a given session- Specified by:
registerObjectin interfaceJsonRpcService- Parameters:
session- the sessionkey- the name of the object in the sessionvalue- the object to register (not null)
-
getBridge
Description copied from interface:JsonRpcServiceGet theJSONRPCBridgefrom the session- Specified by:
getBridgein interfaceJsonRpcService- Parameters:
session- the session- Returns:
- the
JSONRPCBridgeinstance
-
clearBridge
Description copied from interface:JsonRpcServiceRemove theJSONRPCBridgefrom the session- Specified by:
clearBridgein interfaceJsonRpcService- Parameters:
session- the session
-