MessageContext (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.xml.ws.handler Interface MessageContext

所有父接口:
Map<String,Object>
所有已知子接口:
LogicalMessageContext, SOAPMessageContext

public interface MessageContext
extends Map<String,Object>

The interface MessageContext abstracts the message context that is processed by a handler in the handle method.

The MessageContext interface provides methods to manage a property set. MessageContext properties enable handlers in a handler chain to share processing related state.

从以下版本开始:
JAX-WS 2.0

嵌套类摘要
static class MessageContext.Scope
          Property scope.
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
字段摘要
static String HTTP_REQUEST_HEADERS
          Standard property: HTTP request headers.
static String HTTP_REQUEST_METHOD
          Standard property: HTTP request method.
static String HTTP_RESPONSE_CODE
          Standard property: HTTP response status code.
static String HTTP_RESPONSE_HEADERS
          Standard property: HTTP response headers.
static String INBOUND_MESSAGE_ATTACHMENTS
          Standard property: Map of attachments to a message for the inbound message, key is the MIME Content-ID, value is a DataHandler.
static String MESSAGE_OUTBOUND_PROPERTY
          Standard property: message direction, true for outbound messages, false for inbound.
static String OUTBOUND_MESSAGE_ATTACHMENTS
          Standard property: Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler.
static String PATH_INFO
          Standard property: Request Path Info Type: String
static String QUERY_STRING
          Standard property: Query string for request.
static String SERVLET_CONTEXT
          Standard property: servlet context object.
static String SERVLET_REQUEST
          Standard property: servlet request object.
static String SERVLET_RESPONSE
          Standard property: servlet response object.
static String WSDL_DESCRIPTION
          Standard property: input source for WSDL document.
static String WSDL_INTERFACE
          Standard property: name of wsdl interface (2.0) or port type (1.1).
static String WSDL_OPERATION
          Standard property: name of WSDL operation.
static String WSDL_PORT
          Standard property: name of WSDL port.
static String WSDL_SERVICE
          Standard property: name of WSDL service.
 
方法摘要
 MessageContext.Scope getScope(String name)
          Gets the scope of a property.
 void setScope(String name, MessageContext.Scope scope)
          Sets the scope of a property.
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

字段详细信息

MESSAGE_OUTBOUND_PROPERTY

static final String MESSAGE_OUTBOUND_PROPERTY
Standard property: message direction, true for outbound messages, false for inbound.

Type: boolean

另请参见:
常量字段


INBOUND_MESSAGE_ATTACHMENTS

static final String INBOUND_MESSAGE_ATTACHMENTS
Standard property: Map of attachments to a message for the inbound message, key is the MIME Content-ID, value is a DataHandler.

Type: java.util.Map

另请参见:
常量字段


OUTBOUND_MESSAGE_ATTACHMENTS

static final String OUTBOUND_MESSAGE_ATTACHMENTS
Standard property: Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler.

Type: java.util.Map

另请参见:
常量字段


WSDL_DESCRIPTION

static final String WSDL_DESCRIPTION
Standard property: input source for WSDL document.

Type: org.xml.sax.InputSource

另请参见:
常量字段


WSDL_SERVICE

static final String WSDL_SERVICE
Standard property: name of WSDL service.

Type: javax.xml.namespace.QName

另请参见:
常量字段


WSDL_PORT

static final String WSDL_PORT
Standard property: name of WSDL port.

Type: javax.xml.namespace.QName

另请参见:
常量字段


WSDL_INTERFACE

static final String WSDL_INTERFACE
Standard property: name of wsdl interface (2.0) or port type (1.1).

Type: javax.xml.namespace.QName

另请参见:
常量字段


WSDL_OPERATION

static final String WSDL_OPERATION
Standard property: name of WSDL operation.

Type: javax.xml.namespace.QName

另请参见:
常量字段


HTTP_RESPONSE_CODE

static final String HTTP_RESPONSE_CODE
Standard property: HTTP response status code.

Type: java.lang.Integer

另请参见:
常量字段


HTTP_REQUEST_HEADERS

static final String HTTP_REQUEST_HEADERS
Standard property: HTTP request headers.

Type: java.util.Map>

另请参见:
常量字段


HTTP_RESPONSE_HEADERS

static final String HTTP_RESPONSE_HEADERS
Standard property: HTTP response headers.

Type: java.util.Map>

另请参见:
常量字段


HTTP_REQUEST_METHOD

static final String HTTP_REQUEST_METHOD
Standard property: HTTP request method.

Type: java.lang.String

另请参见:
常量字段


SERVLET_REQUEST

static final String SERVLET_REQUEST
Standard property: servlet request object.

Type: javax.servlet.http.HttpServletRequest

另请参见:
常量字段


SERVLET_RESPONSE

static final String SERVLET_RESPONSE
Standard property: servlet response object.

Type: javax.servlet.http.HttpServletResponse

另请参见:
常量字段


SERVLET_CONTEXT

static final String SERVLET_CONTEXT
Standard property: servlet context object.

Type: javax.servlet.ServletContext

另请参见:
常量字段


QUERY_STRING

static final String QUERY_STRING
Standard property: Query string for request.

Type: String

另请参见:
常量字段


PATH_INFO

static final String PATH_INFO
Standard property: Request Path Info

Type: String

另请参见:
常量字段

方法详细信息

setScope

void setScope(String name,
              MessageContext.Scope scope)
Sets the scope of a property.

参数:
name - Name of the property associated with the MessageContext
scope - Desired scope of the property
抛出异常:
IllegalArgumentException - if an illegal property name is specified

getScope

MessageContext.Scope getScope(String name)
Gets the scope of a property.

参数:
name - Name of the property
返回:
Scope of the property
抛出异常:
IllegalArgumentException - if a non-existant property name is specified

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.