Top Description Inners Fields Methods
jakarta.xml.ws.handler

public Interface MessageContext

extends Map<String, Object>
Known Direct Subinterfaces
jakarta.xml.ws.handler.soap.SOAPMessageContext, jakarta.xml.ws.handler.LogicalMessageContext
Imports
java.util.Map

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.

Since
1.6, JAX-WS 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
MessageContext.Scope

Property scope.

Field Summary

Modifier and TypeField and Description
public static final String
HTTP_REQUEST_HEADERS

Standard property: HTTP request headers.

public static final String
HTTP_REQUEST_METHOD

Standard property: HTTP request method.

public static final String
HTTP_RESPONSE_CODE

Standard property: HTTP response status code.

public static final String
HTTP_RESPONSE_HEADERS

Standard property: HTTP response headers.

public 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.

public static final String
MESSAGE_OUTBOUND_PROPERTY

Standard property: message direction, true for outbound messages, false for inbound.

public 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.

public static final String
PATH_INFO

Standard property: Request Path Info

Type: String

public static final String
QUERY_STRING

Standard property: Query string for request.

public static final String
REFERENCE_PARAMETERS

Standard property: WS Addressing Reference Parameters.

public static final String
SERVLET_CONTEXT

Standard property: servlet context object.

public static final String
SERVLET_REQUEST

Standard property: servlet request object.

public static final String
SERVLET_RESPONSE

Standard property: servlet response object.

public static final String
WSDL_DESCRIPTION

Standard property: input source for WSDL document.

public static final String
WSDL_INTERFACE

Standard property: name of wsdl interface (2.0) or port type (1.1).

public static final String
WSDL_OPERATION

Standard property: name of WSDL operation.

public static final String
WSDL_PORT

Standard property: name of WSDL port.

public static final String
WSDL_SERVICE

Standard property: name of WSDL service.

Method Summary

Modifier and TypeMethod and Description
public MessageContext.Scope

Returns:

Scope of the property
getScope
(String
Name of the property
name
)

Gets the scope of a property.

public void
setScope(String
Name of the property associated with the MessageContext
name
,
MessageContext.Scope
Desired scope of the property
scope
)

Sets the scope of a property.

Inherited from java.util.Map:
clearcomputecomputeIfAbsentcomputeIfPresentcontainsKeycontainsValuecopyOfentryentrySetequalsforEachgetgetOrDefaulthashCodeisEmptykeySetmergeofofofofofofofofofofofofEntriesputputAllputIfAbsentremoveremovereplacereplacereplaceAllsizevalues

Field Detail

HTTP_REQUEST_HEADERSback to summary
public static final String HTTP_REQUEST_HEADERS

Standard property: HTTP request headers.

Type: java.util.Map<java.lang.String, java.util.List<java.lang.String>>

HTTP_REQUEST_METHODback to summary
public static final String HTTP_REQUEST_METHOD

Standard property: HTTP request method.

Type: java.lang.String

HTTP_RESPONSE_CODEback to summary
public static final String HTTP_RESPONSE_CODE

Standard property: HTTP response status code.

Type: java.lang.Integer

HTTP_RESPONSE_HEADERSback to summary
public static final String HTTP_RESPONSE_HEADERS

Standard property: HTTP response headers.

Type: java.util.Map<java.lang.String, java.util.List<java.lang.String>>

INBOUND_MESSAGE_ATTACHMENTSback to summary
public 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<String, DataHandler>

MESSAGE_OUTBOUND_PROPERTYback to summary
public static final String MESSAGE_OUTBOUND_PROPERTY

Standard property: message direction, true for outbound messages, false for inbound.

Type: boolean

OUTBOUND_MESSAGE_ATTACHMENTSback to summary
public 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<String, DataHandler>

PATH_INFOback to summary
public static final String PATH_INFO

Standard property: Request Path Info

Type: String

QUERY_STRINGback to summary
public static final String QUERY_STRING

Standard property: Query string for request.

Type: String

REFERENCE_PARAMETERSback to summary
public static final String REFERENCE_PARAMETERS

Standard property: WS Addressing Reference Parameters. The list MUST include all SOAP headers marked with the wsa:IsReferenceParameter="true" attribute.

Type: List<Element>

Since
1.6, JAX-WS 2.1
SERVLET_CONTEXTback to summary
public static final String SERVLET_CONTEXT

Standard property: servlet context object.

Type: jakarta.servlet.ServletContext

SERVLET_REQUESTback to summary
public static final String SERVLET_REQUEST

Standard property: servlet request object.

Type: jakarta.servlet.http.HttpServletRequest

SERVLET_RESPONSEback to summary
public static final String SERVLET_RESPONSE

Standard property: servlet response object.

Type: jakarta.servlet.http.HttpServletResponse

WSDL_DESCRIPTIONback to summary
public static final String WSDL_DESCRIPTION

Standard property: input source for WSDL document.

Type: org.xml.sax.InputSource

WSDL_INTERFACEback to summary
public static final String WSDL_INTERFACE

Standard property: name of wsdl interface (2.0) or port type (1.1).

Type: javax.xml.namespace.QName

WSDL_OPERATIONback to summary
public static final String WSDL_OPERATION

Standard property: name of WSDL operation.

Type: javax.xml.namespace.QName

WSDL_PORTback to summary
public static final String WSDL_PORT

Standard property: name of WSDL port.

Type: javax.xml.namespace.QName

WSDL_SERVICEback to summary
public static final String WSDL_SERVICE

Standard property: name of WSDL service.

Type: javax.xml.namespace.QName

Method Detail

getScopeback to summary
public MessageContext.Scope getScope(String name)

Gets the scope of a property.

Parameters
name:String

Name of the property

Returns:MessageContext.Scope

Scope of the property

Exceptions
IllegalArgumentException:
if a non-existant property name is specified
setScopeback to summary
public void setScope(String name, MessageContext.Scope scope)

Sets the scope of a property.

Parameters
name:String

Name of the property associated with the MessageContext

scope:MessageContext.Scope

Desired scope of the property

Exceptions
IllegalArgumentException:
if an illegal property name is specified
jakarta.xml.ws.handler back to summary

public final Enum MessageContext.Scope

extends Enum<MessageContext.Scope>
Class Inheritance

Property scope. Properties scoped as APPLICATION are visible to handlers, client applications and service endpoints; properties scoped as HANDLER are only normally visible to handlers.

Field Summary

Modifier and TypeField and Description
public static final MessageContext.Scope
APPLICATION

Application visibility.

public static final MessageContext.Scope
HANDLER

Handler visibility.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static MessageContext.Scope
public static MessageContext.Scope[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

APPLICATIONback to summary
public static final MessageContext.Scope APPLICATION

Application visibility.

HANDLERback to summary
public static final MessageContext.Scope HANDLER

Handler visibility.

Constructor Detail

Scopeback to summary
private Scope()

Method Detail

valueOfback to summary
public static MessageContext.Scope valueOf(String name)
valuesback to summary
public static MessageContext.Scope[] values()