ohair@286: /* ohair@286: * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ohair@286: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ohair@286: * ohair@286: * This code is free software; you can redistribute it and/or modify it ohair@286: * under the terms of the GNU General Public License version 2 only, as ohair@286: * published by the Free Software Foundation. Oracle designates this ohair@286: * particular file as subject to the "Classpath" exception as provided ohair@286: * by Oracle in the LICENSE file that accompanied this code. ohair@286: * ohair@286: * This code is distributed in the hope that it will be useful, but WITHOUT ohair@286: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ohair@286: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ohair@286: * version 2 for more details (a copy is included in the LICENSE file that ohair@286: * accompanied this code). ohair@286: * ohair@286: * You should have received a copy of the GNU General Public License version ohair@286: * 2 along with this work; if not, write to the Free Software Foundation, ohair@286: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ohair@286: * ohair@286: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@286: * or visit www.oracle.com if you need additional information or have any ohair@286: * questions. ohair@286: */ ohair@286: ohair@286: package com.sun.xml.internal.ws.api; ohair@286: ohair@286: import com.sun.istack.internal.NotNull; ohair@286: import com.sun.istack.internal.Nullable; ohair@286: import com.sun.xml.internal.ws.api.addressing.AddressingVersion; ohair@286: import com.sun.xml.internal.ws.api.message.Message; ohair@286: import com.sun.xml.internal.ws.api.pipe.Codec; ohair@286: import com.sun.xml.internal.ws.api.pipe.Tube; ohair@286: ohair@286: import javax.xml.namespace.QName; ohair@286: import javax.xml.ws.Binding; ohair@286: import javax.xml.ws.WebServiceFeature; ohair@286: import javax.xml.ws.handler.Handler; ohair@286: import java.util.List; ohair@286: import java.util.Set; ohair@286: ohair@286: /** ohair@286: * JAX-WS implementation of {@link Binding}. ohair@286: * ohair@286: *
ohair@286: * This object can be created by {@link BindingID#createBinding()}. ohair@286: * ohair@286: *
ohair@286: * Binding conceptually includes the on-the-wire format of the message, ohair@286: * this this object owns {@link Codec}. ohair@286: * ohair@286: * @author Kohsuke Kawaguchi ohair@286: */ ohair@286: public interface WSBinding extends Binding { ohair@286: /** ohair@286: * Gets the SOAP version of this binding. ohair@286: * ohair@286: * TODO: clarify what to do with XML/HTTP binding ohair@286: * ohair@286: *
ohair@286: * This is just a short-cut for {@code getBindingID().getSOAPVersion()} ohair@286: * ohair@286: * @return ohair@286: * If the binding is using SOAP, this method returns ohair@286: * a {@link SOAPVersion} constant. ohair@286: * ohair@286: * If the binding is not based on SOAP, this method ohair@286: * returns null. See {@link Message} for how a non-SOAP ohair@286: * binding shall be handled by {@link Tube}s. ohair@286: */ ohair@286: SOAPVersion getSOAPVersion(); ohair@286: /** ohair@286: * Gets the WS-Addressing version of this binding. ohair@286: *
ohair@286: * TODO: clarify what to do with XML/HTTP binding ohair@286: * ohair@286: * @return If the binding is using SOAP and WS-Addressing is enabled, ohair@286: * this method returns a {@link AddressingVersion} constant. ohair@286: * If binding is not using SOAP or WS-Addressing is not enabled, ohair@286: * this method returns null. ohair@286: * ohair@286: * This might be little slow as it has to go over all the features on binding. ohair@286: * Its advisable to cache the addressingVersion wherever possible and reuse it. ohair@286: */ ohair@286: AddressingVersion getAddressingVersion(); ohair@286: ohair@286: /** ohair@286: * Gets the binding ID, which uniquely identifies the binding. ohair@286: * ohair@286: *
ohair@286: * The relevant specs define the binding IDs and what they mean.
ohair@286: * The ID is used in many places to identify the kind of binding
ohair@286: * (such as SOAP1.1, SOAP1.2, REST, ...)
ohair@286: *
ohair@286: * @return
ohair@286: * Always non-null same value.
ohair@286: */
ohair@286: @NotNull BindingID getBindingId();
ohair@286:
ohair@286: @NotNull List