com.caucho.services.server
类 ServiceContext

java.lang.Object
  继承者 com.caucho.services.server.ServiceContext

public class ServiceContext
extends java.lang.Object

Context for a service, to handle request-specific information.


方法摘要
 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 ?
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()
          已过时。  
static ServletRequest getRequest()
          已过时。  
static java.lang.String getServiceName()
          已过时。  
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

begin

public static void begin(ServletRequest request,
                         ServletResponse response,
                         java.lang.String serviceName,
                         java.lang.String objectId)
                  throws ServletException
Sets the request object prior to calling the service's method.

参数:
request - the calling servlet request
serviceId - the service identifier
objectId - the object identifier
抛出:
ServletException

getContext

public static ServiceContext getContext()
Returns the service request.


addHeader

public void addHeader(java.lang.String header,
                      java.lang.Object value)
Adds a header.


getHeader

public java.lang.Object getHeader(java.lang.String header)
Gets a header.


getContextHeader

public static java.lang.Object getContextHeader(java.lang.String header)
Gets a header from the context.


getContextRequest

public static ServletRequest getContextRequest()
Returns the service request.


getContextResponse

public static ServletResponse getContextResponse()
Returns the service request.


getContextServiceName

public static java.lang.String getContextServiceName()
Returns the service id, corresponding to the pathInfo of the URL.


getContextObjectId

public static java.lang.String 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 ServletRequest getRequest()
已过时。 

Returns the service request.


getServiceName

public static java.lang.String getServiceName()
已过时。 

Returns the service id, corresponding to the pathInfo of the URL.


getObjectId

public static java.lang.String getObjectId()
已过时。 

Returns the object id, corresponding to the ?id= of the URL.