public class ServiceContext
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String header,
java.lang.Object value)
Adds a header.
|
static void |
begin(ServletRequest request,
ServletResponse response,
java.lang.String serviceName,
java.lang.String objectId)
Sets the request object prior to calling the service's method.
|
static void |
end()
Cleanup at the end of a request.
|
static ServiceContext |
getContext()
Returns the service request.
|
static java.lang.Object |
getContextHeader(java.lang.String header)
Gets a header from the context.
|
static java.lang.String |
getContextObjectId()
Returns the object id, corresponding to the ?id= of the URL.
|
static ServletRequest |
getContextRequest()
Returns the service request.
|
static ServletResponse |
getContextResponse()
Returns the service request.
|
static java.lang.String |
getContextServiceName()
Returns the service id, corresponding to the pathInfo of the URL.
|
java.lang.Object |
getHeader(java.lang.String header)
Gets a header.
|
static java.lang.String |
getObjectId()
Deprecated.
|
static ServletRequest |
getRequest()
Deprecated.
|
static java.lang.String |
getServiceName()
Deprecated.
|
public static void begin(ServletRequest request, ServletResponse response, java.lang.String serviceName, java.lang.String objectId) throws ServletException
request
- the calling servlet requestserviceId
- the service identifierobjectId
- the object identifierServletException
public static ServiceContext getContext()
public void addHeader(java.lang.String header, java.lang.Object value)
public java.lang.Object getHeader(java.lang.String header)
public static java.lang.Object getContextHeader(java.lang.String header)
public static ServletRequest getContextRequest()
public static ServletResponse getContextResponse()
public static java.lang.String getContextServiceName()
public static java.lang.String getContextObjectId()
public static void end()
public static ServletRequest getRequest()
public static java.lang.String getServiceName()
public static java.lang.String getObjectId()