325N/A/*
325N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
325N/A *
325N/A * This code is free software; you can redistribute it and/or modify it
325N/A * under the terms of the GNU General Public License version 2 only, as
325N/A * published by the Free Software Foundation. Oracle designates this
325N/A * particular file as subject to the "Classpath" exception as provided
325N/A * by Oracle in the LICENSE file that accompanied this code.
325N/A *
325N/A * This code is distributed in the hope that it will be useful, but WITHOUT
325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
325N/A * version 2 for more details (a copy is included in the LICENSE file that
325N/A * accompanied this code).
325N/A *
325N/A * You should have received a copy of the GNU General Public License version
325N/A * 2 along with this work; if not, write to the Free Software Foundation,
325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
325N/A *
325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
325N/A * or visit www.oracle.com if you need additional information or have any
325N/A * questions.
325N/A */
325N/A
325N/Apackage javax.xml.ws.handler;
325N/Aimport java.util.Map;
325N/A
325N/A/**
325N/A * The interface <code>MessageContext</code> abstracts the message
325N/A * context that is processed by a handler in the <code>handle</code>
325N/A * method.
325N/A *
325N/A * <p>The <code>MessageContext</code> interface provides methods to
325N/A * manage a property set. <code>MessageContext</code> properties
325N/A * enable handlers in a handler chain to share processing related
325N/A * state.
325N/A *
325N/A * @since JAX-WS 2.0
325N/A */
325N/Apublic interface MessageContext extends Map<String, Object> {
325N/A
325N/A /**
325N/A * Standard property: message direction, <code>true</code> for
325N/A * outbound messages, <code>false</code> for inbound.
325N/A * <p>Type: boolean
325N/A */
325N/A public static final String MESSAGE_OUTBOUND_PROPERTY =
325N/A "javax.xml.ws.handler.message.outbound";
325N/A
325N/A /**
325N/A * Standard property: Map of attachments to a message for the inbound
325N/A * message, key is the MIME Content-ID, value is a DataHandler.
325N/A * <p>Type: java.util.Map&lt;String,DataHandler>
325N/A */
325N/A public static final String INBOUND_MESSAGE_ATTACHMENTS =
325N/A "javax.xml.ws.binding.attachments.inbound";
325N/A
325N/A /**
325N/A * Standard property: Map of attachments to a message for the outbound
325N/A * message, key is the MIME Content-ID, value is a DataHandler.
325N/A * <p>Type: java.util.Map&lt;String,DataHandler>
325N/A */
325N/A public static final String OUTBOUND_MESSAGE_ATTACHMENTS =
325N/A "javax.xml.ws.binding.attachments.outbound";
325N/A
325N/A /**
325N/A * Standard property: input source for WSDL document.
325N/A * <p>Type: org.xml.sax.InputSource
325N/A */
325N/A public static final String WSDL_DESCRIPTION =
325N/A "javax.xml.ws.wsdl.description";
325N/A
325N/A /**
325N/A * Standard property: name of WSDL service.
325N/A * <p>Type: javax.xml.namespace.QName
325N/A */
325N/A public static final String WSDL_SERVICE =
325N/A "javax.xml.ws.wsdl.service";
325N/A
325N/A /**
325N/A * Standard property: name of WSDL port.
325N/A * <p>Type: javax.xml.namespace.QName
325N/A */
325N/A public static final String WSDL_PORT =
325N/A "javax.xml.ws.wsdl.port";
325N/A
325N/A /**
325N/A * Standard property: name of wsdl interface (2.0) or port type (1.1).
325N/A * <p>Type: javax.xml.namespace.QName
325N/A */
325N/A public static final String WSDL_INTERFACE =
325N/A "javax.xml.ws.wsdl.interface";
325N/A
325N/A /**
325N/A * Standard property: name of WSDL operation.
325N/A * <p>Type: javax.xml.namespace.QName
325N/A */
325N/A public static final String WSDL_OPERATION =
325N/A "javax.xml.ws.wsdl.operation";
325N/A
325N/A /**
325N/A * Standard property: HTTP response status code.
325N/A * <p>Type: java.lang.Integer
325N/A */
325N/A public static final String HTTP_RESPONSE_CODE =
325N/A "javax.xml.ws.http.response.code";
325N/A
325N/A /**
325N/A * Standard property: HTTP request headers.
325N/A * <p>Type: java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String>>
325N/A */
325N/A public static final String HTTP_REQUEST_HEADERS =
325N/A "javax.xml.ws.http.request.headers";
325N/A
325N/A /**
325N/A * Standard property: HTTP response headers.
325N/A * <p>Type: java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String>>
325N/A */
325N/A public static final String HTTP_RESPONSE_HEADERS =
325N/A "javax.xml.ws.http.response.headers";
325N/A
325N/A /**
325N/A * Standard property: HTTP request method.
325N/A * <p>Type: java.lang.String
325N/A */
325N/A public static final String HTTP_REQUEST_METHOD =
325N/A "javax.xml.ws.http.request.method";
325N/A
325N/A /**
325N/A * Standard property: servlet request object.
325N/A * <p>Type: javax.servlet.http.HttpServletRequest
325N/A */
325N/A public static final String SERVLET_REQUEST =
325N/A "javax.xml.ws.servlet.request";
325N/A
325N/A /**
325N/A * Standard property: servlet response object.
325N/A * <p>Type: javax.servlet.http.HttpServletResponse
325N/A */
325N/A public static final String SERVLET_RESPONSE =
325N/A "javax.xml.ws.servlet.response";
325N/A
325N/A /**
325N/A * Standard property: servlet context object.
325N/A * <p>Type: javax.servlet.ServletContext
325N/A */
325N/A public static final String SERVLET_CONTEXT =
325N/A "javax.xml.ws.servlet.context";
325N/A
325N/A /**
325N/A * Standard property: Query string for request.
325N/A * <p>Type: String
325N/A **/
325N/A public static final String QUERY_STRING =
325N/A "javax.xml.ws.http.request.querystring";
325N/A
325N/A /**
325N/A * Standard property: Request Path Info
325N/A * <p>Type: String
325N/A */
325N/A public static final String PATH_INFO =
325N/A "javax.xml.ws.http.request.pathinfo";
325N/A
325N/A /**
325N/A * Standard property: WS Addressing Reference Parameters.
325N/A * The list MUST include all SOAP headers marked with the
325N/A * wsa:IsReferenceParameter="true" attribute.
325N/A * <p>Type: List&lt;Element>
325N/A *
325N/A * @since JAX-WS 2.1
325N/A */
325N/A public static final String REFERENCE_PARAMETERS =
325N/A "javax.xml.ws.reference.parameters";
325N/A
325N/A /**
325N/A * Property scope. Properties scoped as <code>APPLICATION</code> are
325N/A * visible to handlers,
325N/A * client applications and service endpoints; properties scoped as
325N/A * <code>HANDLER</code>
325N/A * are only normally visible to handlers.
325N/A */
325N/A public enum Scope {APPLICATION, HANDLER};
325N/A
325N/A /**
325N/A * Sets the scope of a property.
325N/A *
325N/A * @param name Name of the property associated with the
325N/A * <code>MessageContext</code>
325N/A * @param scope Desired scope of the property
325N/A * @throws java.lang.IllegalArgumentException if an illegal
325N/A * property name is specified
325N/A */
325N/A public void setScope(String name, Scope scope);
325N/A
325N/A /**
325N/A * Gets the scope of a property.
325N/A *
325N/A * @param name Name of the property
325N/A * @return Scope of the property
325N/A * @throws java.lang.IllegalArgumentException if a non-existant
325N/A * property name is specified
325N/A */
325N/A public Scope getScope(String name);
325N/A}