Package com.caucho.services.server
Class ServiceContext
java.lang.Object
com.caucho.services.server.ServiceContext
Context for a service, to handle request-specific information.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a header.static voidbegin(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String serviceName, String objectId) Sets the request object prior to calling the service's method.static voidend()Cleanup at the end of a request.static ServiceContextReturns the service request.static ObjectgetContextHeader(String header) Gets a header from the context.static StringReturns the object id, corresponding to the ?id= of the URL.static javax.servlet.ServletRequestReturns the service request.static javax.servlet.ServletResponseReturns the service request.static StringReturns the service id, corresponding to the pathInfo of the URL.Gets a header.static StringDeprecated.static javax.servlet.ServletRequestDeprecated.static StringDeprecated.
-
Method Details
-
begin
public static void begin(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String serviceName, String objectId) throws javax.servlet.ServletException Sets the request object prior to calling the service's method.- Parameters:
request- the calling servlet requestserviceId- the service identifierobjectId- the object identifier- Throws:
javax.servlet.ServletException
-
getContext
Returns the service request. -
addHeader
Adds a header. -
getHeader
Gets a header. -
getContextHeader
Gets a header from the context. -
getContextRequest
public static javax.servlet.ServletRequest getContextRequest()Returns the service request. -
getContextResponse
public static javax.servlet.ServletResponse getContextResponse()Returns the service request. -
getContextServiceName
Returns the service id, corresponding to the pathInfo of the URL. -
getContextObjectId
Returns the object id, corresponding to the ?id= of the URL. -
end
public static void end()Cleanup at the end of a request. -
getRequest
public static javax.servlet.ServletRequest getRequest()Deprecated.Returns the service request. -
getServiceName
Deprecated.Returns the service id, corresponding to the pathInfo of the URL. -
getObjectId
Deprecated.Returns the object id, corresponding to the ?id= of the URL.
-