public class ServiceContext extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String header,
Object value)
Adds a header.
|
static void |
begin(ServletRequest request,
ServletResponse response,
String serviceName,
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 Object |
getContextHeader(String header)
Gets a header from the context.
|
static 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 String |
getContextServiceName()
Returns the service id, corresponding to the pathInfo of the URL.
|
Object |
getHeader(String header)
Gets a header.
|
static String |
getObjectId()
Deprecated.
|
static ServletRequest |
getRequest()
Deprecated.
|
static String |
getServiceName()
Deprecated.
|
public static void begin(ServletRequest request, ServletResponse response, String serviceName, String objectId) throws ServletException
request - the calling servlet requestserviceId - the service identifierobjectId - the object identifierServletExceptionpublic static ServiceContext getContext()
public static Object getContextHeader(String header)
public static ServletRequest getContextRequest()
public static ServletResponse getContextResponse()
public static String getContextServiceName()
public static String getContextObjectId()
public static void end()
public static ServletRequest getRequest()
public static String getServiceName()
public static String getObjectId()
Copyright © 2017 Caucho Technology, Inc. All rights reserved.