Package com.sun.xml.ws.binding
Class BindingImpl
java.lang.Object
com.sun.xml.ws.binding.BindingImpl
- All Implemented Interfaces:
WSBinding,javax.xml.ws.Binding
- Direct Known Subclasses:
HTTPBindingImpl,SOAPBindingImpl
Instances are created by the service, which then
sets the handler chain on the binding impl.
This class is made abstract as we don't see a situation when a BindingImpl has much meaning without binding id. IOW, for a specific binding there will be a class extending BindingImpl, for example SOAPBindingImpl.
The spi Binding interface extends Binding.
- Author:
- WS Development Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classExperimental: Identify messages based on the name of the message and the operation that uses this message. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final javax.xml.ws.WebServiceFeature[]protected final Map<BindingImpl.MessageKey,WebServiceFeatureList> protected final WebServiceFeatureListprotected final Map<QName,WebServiceFeatureList> protected MessageContextFactoryprotected final Map<QName,WebServiceFeatureList> protected final Map<QName,WebServiceFeatureList> protected javax.xml.ws.Service.Mode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBindingImpl(BindingID bindingId, javax.xml.ws.WebServiceFeature... features) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddKnownHeader(QName headerQName) Adds header QName to set known to be supported by this bindingstatic BindingImplstatic BindingImplfinal CodecGets the WS-Addressing version of this binding.Gets the binding ID, which uniquely identifies the binding.static WSBindinggetFaultMessageFeatures(QName operationName, QName messageName) Experimental: Returns a list of features associated withWSBindingthat apply to one of the fault messages of an operation.<F extends javax.xml.ws.WebServiceFeature>
FgetFeature(Class<F> featureType) Gets aWebServiceFeatureof the specific type.Returns a list of features associated withWSBinding.List<javax.xml.ws.handler.Handler>getInputMessageFeatures(QName operationName) Experimental: Returns a list of features associated withWSBindingthat apply to the input message of an operation.Returns set of header QNames known to be supported by this binding.<F extends javax.xml.ws.WebServiceFeature>
FgetOperationFeature(Class<F> featureType, QName operationName) Experimental: Gets aWebServiceFeatureof the specific type that applies to an operation.getOperationFeatures(QName operationName) Experimental: Returns a list of features associated withWSBindingthat apply to a particular operation.getOutputMessageFeatures(QName operationName) Experimental: Returns a list of features associated withWSBindingthat apply to the output message of an operation.final SOAPVersionGets the SOAP version of this binding.static voidbooleanisFeatureEnabled(Class<? extends javax.xml.ws.WebServiceFeature> feature) Checks if a particularWebServiceFeatureis enabled.booleanisOperationFeatureEnabled(Class<? extends javax.xml.ws.WebServiceFeature> featureType, QName operationName) Experimental: Checks if a particularWebServiceFeatureon an operation is enabled.voidsetFaultMessageFeatures(QName operationName, QName messageName, javax.xml.ws.WebServiceFeature... newFeatures) protected voidsetHandlerConfig(HandlerConfiguration handlerConfig) voidsetInputMessageFeatures(QName operationName, javax.xml.ws.WebServiceFeature... newFeatures) voidsetMode(javax.xml.ws.Service.Mode mode) voidsetOperationFeatures(QName operationName, javax.xml.ws.WebServiceFeature... newFeatures) voidsetOutputMessageFeatures(QName operationName, javax.xml.ws.WebServiceFeature... newFeatures) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.xml.ws.Binding
setHandlerChain
-
Field Details
-
EMPTY_FEATURES
protected static final javax.xml.ws.WebServiceFeature[] EMPTY_FEATURES -
features
-
operationFeatures
-
inputMessageFeatures
-
outputMessageFeatures
-
faultMessageFeatures
-
serviceMode
protected javax.xml.ws.Service.Mode serviceMode -
messageContextFactory
-
-
Constructor Details
-
BindingImpl
-
-
Method Details
-
getHandlerChain
- Specified by:
getHandlerChainin interfacejavax.xml.ws.Binding- Specified by:
getHandlerChainin interfaceWSBinding
-
getHandlerConfig
-
setHandlerConfig
-
setMode
-
getKnownHeaders
Description copied from interface:WSBindingReturns set of header QNames known to be supported by this binding.- Specified by:
getKnownHeadersin interfaceWSBinding- Returns:
- Set of known QNames
-
addKnownHeader
Description copied from interface:WSBindingAdds header QName to set known to be supported by this binding- Specified by:
addKnownHeaderin interfaceWSBinding- Parameters:
headerQName- Known header QName- Returns:
- true, if new entry was added; false, if known header QName was already known
-
getBindingId
Description copied from interface:WSBindingGets the binding ID, which uniquely identifies the binding.The relevant specs define the binding IDs and what they mean. The ID is used in many places to identify the kind of binding (such as SOAP1.1, SOAP1.2, REST, ...)
- Specified by:
getBindingIdin interfaceWSBinding- Returns:
- Always non-null same value.
-
getSOAPVersion
Description copied from interface:WSBindingGets the SOAP version of this binding. TODO: clarify what to do with XML/HTTP bindingThis is just a short-cut for
getBindingID().getSOAPVersion()- Specified by:
getSOAPVersionin interfaceWSBinding- Returns:
- If the binding is using SOAP, this method returns
a
SOAPVersionconstant. If the binding is not based on SOAP, this method returns null. SeeMessagefor how a non-SOAP binding shall be handled byTubes.
-
getAddressingVersion
Description copied from interface:WSBindingGets the WS-Addressing version of this binding.
TODO: clarify what to do with XML/HTTP binding- Specified by:
getAddressingVersionin interfaceWSBinding- Returns:
- If the binding is using SOAP and WS-Addressing is enabled,
this method returns a
AddressingVersionconstant. If binding is not using SOAP or WS-Addressing is not enabled, this method returns null. This might be little slow as it has to go over all the features on binding. Its advisable to cache the addressingVersion wherever possible and reuse it.
-
createCodec
-
initializeJavaActivationHandlers
public static void initializeJavaActivationHandlers() -
create
-
create
public static BindingImpl create(@NotNull BindingID bindingId, javax.xml.ws.WebServiceFeature[] features) -
getDefaultBinding
-
getBindingID
- Specified by:
getBindingIDin interfacejavax.xml.ws.Binding
-
getFeature
@Nullable public <F extends javax.xml.ws.WebServiceFeature> F getFeature(@NotNull Class<F> featureType) Description copied from interface:WSBindingGets aWebServiceFeatureof the specific type.- Specified by:
getFeaturein interfaceWSBinding- Parameters:
featureType- The type of the feature to retrieve.- Returns:
- If the feature is present and enabled, return a non-null instance. Otherwise null.
-
getOperationFeature
@Nullable public <F extends javax.xml.ws.WebServiceFeature> F getOperationFeature(@NotNull Class<F> featureType, @NotNull QName operationName) Description copied from interface:WSBindingExperimental: Gets aWebServiceFeatureof the specific type that applies to an operation.- Specified by:
getOperationFeaturein interfaceWSBinding- Parameters:
featureType- The type of the feature to retrieve.operationName- The WSDL name of the operation.- Returns:
- If the feature is present and enabled, return a non-null instance. Otherwise null.
-
isFeatureEnabled
Description copied from interface:WSBindingChecks if a particularWebServiceFeatureis enabled.- Specified by:
isFeatureEnabledin interfaceWSBinding- Returns:
- true if enabled.
-
isOperationFeatureEnabled
public boolean isOperationFeatureEnabled(@NotNull Class<? extends javax.xml.ws.WebServiceFeature> featureType, @NotNull QName operationName) Description copied from interface:WSBindingExperimental: Checks if a particularWebServiceFeatureon an operation is enabled.- Specified by:
isOperationFeatureEnabledin interfaceWSBindingoperationName- The WSDL name of the operation.- Returns:
- true if enabled.
-
getFeatures
Description copied from interface:WSBindingReturns a list of features associated withWSBinding.- Specified by:
getFeaturesin interfaceWSBinding
-
getOperationFeatures
Description copied from interface:WSBindingExperimental: Returns a list of features associated withWSBindingthat apply to a particular operation.- Specified by:
getOperationFeaturesin interfaceWSBinding- Parameters:
operationName- The WSDL name of the operation.
-
getInputMessageFeatures
Description copied from interface:WSBindingExperimental: Returns a list of features associated withWSBindingthat apply to the input message of an operation.- Specified by:
getInputMessageFeaturesin interfaceWSBinding- Parameters:
operationName- The WSDL name of the operation.
-
getOutputMessageFeatures
Description copied from interface:WSBindingExperimental: Returns a list of features associated withWSBindingthat apply to the output message of an operation.- Specified by:
getOutputMessageFeaturesin interfaceWSBinding- Parameters:
operationName- The WSDL name of the operation.
-
getFaultMessageFeatures
@NotNull public WebServiceFeatureList getFaultMessageFeatures(@NotNull QName operationName, @NotNull QName messageName) Description copied from interface:WSBindingExperimental: Returns a list of features associated withWSBindingthat apply to one of the fault messages of an operation.- Specified by:
getFaultMessageFeaturesin interfaceWSBinding- Parameters:
operationName- The WSDL name of the operation.messageName- The WSDL name of the fault message.
-
setOperationFeatures
-
setInputMessageFeatures
-
setOutputMessageFeatures
-
setFaultMessageFeatures
-
getMessageContextFactory
- Specified by:
getMessageContextFactoryin interfaceWSBinding- Returns:
- A MessageContextFactory configured according to the binding's features.
-