com.sun.xml.ws.api.client
Class ServiceInterceptor

java.lang.Object
  extended by com.sun.xml.ws.api.client.ServiceInterceptor

public abstract class ServiceInterceptor
extends java.lang.Object

Interception point for inner working of WSService.

System-level code could hook an implementation of this to WSService to augument its behavior.

Since:
2.1 EA3
See Also:
ServiceInterceptorFactory

Constructor Summary
ServiceInterceptor()
           
 
Method Summary
static ServiceInterceptor aggregate(ServiceInterceptor... interceptors)
          Aggregates multiple interceptors into one facade.
 void postCreateDispatch(WSBindingProvider bp)
          A callback to notify that a Dispatch object is created.
 void postCreateProxy(WSBindingProvider bp, java.lang.Class<?> serviceEndpointInterface)
          A callback to notify the event of creation of proxy object for SEI endpoint.
 java.util.List<WebServiceFeature> preCreateBinding(WSPortInfo port, java.lang.Class<?> serviceEndpointInterface, WSFeatureList defaultFeatures)
          Called before WSBinding is created, to allow interceptors to add WebServiceFeatures to the created WSBinding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceInterceptor

public ServiceInterceptor()
Method Detail

preCreateBinding

public java.util.List<WebServiceFeature> preCreateBinding(@NotNull
                                                          WSPortInfo port,
                                                          @Nullable
                                                          java.lang.Class<?> serviceEndpointInterface,
                                                          @NotNull
                                                          WSFeatureList defaultFeatures)
Called before WSBinding is created, to allow interceptors to add WebServiceFeatures to the created WSBinding.

Parameters:
port - Information about the port for which dispatch/proxy will be created.
serviceEndpointInterface - Null if the created binding is for Dispatch. Otheriwse it represents the port interface of the proxy to be created.
defaultFeatures - The list of features that are currently scheduled to be set for the newly created WSBinding.
Returns:
A set of features to be added to the newly created WSBinding. Can be empty but never null. defaultFeatures will take precedence over what this method would return (because it includes user-specified ones which will take the at-most priority), but features you return from this method will take precedence over BindingID's implicit features.

postCreateProxy

public void postCreateProxy(@NotNull
                            WSBindingProvider bp,
                            @NotNull
                            java.lang.Class<?> serviceEndpointInterface)
A callback to notify the event of creation of proxy object for SEI endpoint. The callback could set some properties on the BindingProvider.

Parameters:
bp - created proxy instance
serviceEndpointInterface - SEI of the endpoint

postCreateDispatch

public void postCreateDispatch(@NotNull
                               WSBindingProvider bp)
A callback to notify that a Dispatch object is created. The callback could set some properties on the BindingProvider.

Parameters:
bp - BindingProvider of dispatch object

aggregate

public static ServiceInterceptor aggregate(ServiceInterceptor... interceptors)
Aggregates multiple interceptors into one facade.



Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.