org.apache.cxf.endpoint
Class ClientImpl

java.lang.Object
  extended by org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
      extended by org.apache.cxf.endpoint.ClientImpl
All Implemented Interfaces:
Client, Retryable, InterceptorProvider, MessageObserver

public class ClientImpl
extends AbstractBasicInterceptorProvider
implements Client, Retryable, MessageObserver


Nested Class Summary
static class ClientImpl.EchoContext
           
 
Field Summary
protected  Bus bus
           
protected  ConduitSelector conduitSelector
           
protected  java.util.Map<java.lang.String,java.lang.Object> currentRequestContext
           
protected  java.util.concurrent.Executor executor
           
static java.lang.String FINISHED
           
protected  PhaseChainCache inboundChainCache
           
protected  PhaseChainCache outboundChainCache
           
protected  ClientOutFaultObserver outFaultObserver
           
protected  java.util.Map<java.lang.Thread,ClientImpl.EchoContext> requestContext
           
protected  java.util.Map<java.lang.Thread,java.util.Map<java.lang.String,java.lang.Object>> responseContext
           
protected  int synchronousTimeout
           
static java.lang.String THREAD_LOCAL_REQUEST_CONTEXT
           
 
Fields inherited from interface org.apache.cxf.endpoint.Client
KEEP_CONDUIT_ALIVE, REQUEST_CONTEXT, RESPONSE_CONTEXT
 
Constructor Summary
ClientImpl(Bus b, Endpoint e)
           
ClientImpl(Bus b, Endpoint e, Conduit c)
           
ClientImpl(Bus b, Endpoint e, ConduitSelector sc)
           
ClientImpl(Bus bus, java.net.URL wsdlUrl, javax.xml.namespace.QName service, javax.xml.namespace.QName port)
          Create a Client that uses the default EndpointImpl.
ClientImpl(Bus bus, java.net.URL wsdlUrl, javax.xml.namespace.QName service, javax.xml.namespace.QName port, EndpointImplFactory endpointImplFactory)
          Create a Client that uses a specific EndpointImpl.
ClientImpl(java.net.URL wsdlUrl)
           
ClientImpl(java.net.URL wsdlUrl, javax.xml.namespace.QName port)
           
 
Method Summary
 void destroy()
           
 Conduit getConduit()
           
 ConduitSelector getConduitSelector()
           
protected  ConduitSelector getConduitSelector(ConduitSelector override)
           
 Endpoint getEndpoint()
           
protected  java.lang.Exception getException(Exchange exchange)
           
 java.util.Map<java.lang.String,java.lang.Object> getRequestContext()
           
 java.util.Map<java.lang.String,java.lang.Object> getResponseContext()
           
 int getSynchronousTimeout()
           
 java.lang.Object[] invoke(BindingOperationInfo oi, java.lang.Object... params)
           
 java.lang.Object[] invoke(BindingOperationInfo oi, java.lang.Object[] params, Exchange exchange)
           
 java.lang.Object[] invoke(BindingOperationInfo oi, java.lang.Object[] params, java.util.Map<java.lang.String,java.lang.Object> context)
           
 java.lang.Object[] invoke(BindingOperationInfo oi, java.lang.Object[] params, java.util.Map<java.lang.String,java.lang.Object> context, Exchange exchange)
           
 void invoke(ClientCallback callback, BindingOperationInfo oi, java.lang.Object... params)
           
 void invoke(ClientCallback callback, javax.xml.namespace.QName operationName, java.lang.Object... params)
           
 void invoke(ClientCallback callback, java.lang.String operationName, java.lang.Object... params)
           
 java.lang.Object[] invoke(javax.xml.namespace.QName operationName, java.lang.Object... params)
           
 java.lang.Object[] invoke(java.lang.String operationName, java.lang.Object... params)
           
 void invokeWrapped(ClientCallback callback, javax.xml.namespace.QName operationName, java.lang.Object... params)
           
 void invokeWrapped(ClientCallback callback, java.lang.String operationName, java.lang.Object... params)
           
 java.lang.Object[] invokeWrapped(javax.xml.namespace.QName operationName, java.lang.Object... params)
           
 java.lang.Object[] invokeWrapped(java.lang.String operationName, java.lang.Object... params)
           
 boolean isThreadLocalRequestContext()
           
protected  void modifyChain(InterceptorChain chain, java.util.Map<java.lang.String,java.lang.Object> ctx)
           
 void onMessage(Message message)
           
protected  void prepareConduitSelector(Message message)
           
protected  java.lang.Object[] processResult(Message message, Exchange exchange, BindingOperationInfo oi, java.util.Map<java.lang.String,java.lang.Object> resContext)
           
 void setConduitSelector(ConduitSelector selector)
           
protected  void setContext(java.util.Map<java.lang.String,java.lang.Object> ctx, Message message)
           
protected  void setEndpoint(Endpoint e)
           
protected  void setExchangeProperties(Exchange exchange, Endpoint endpoint, BindingOperationInfo boi)
           
 void setExecutor(java.util.concurrent.Executor executor)
           
protected  void setOutMessageProperties(Message message, BindingOperationInfo boi)
           
protected  void setParameters(java.lang.Object[] params, Message message)
           
 void setSynchronousTimeout(int synchronousTimeout)
           
 void setThreadLocalRequestContext(boolean b)
           
protected  PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint)
           
protected  void waitResponse(Exchange exchange)
           
 
Methods inherited from class org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
getInFaultInterceptors, getInInterceptors, getOutFaultInterceptors, getOutInterceptors, setInFaultInterceptors, setInInterceptors, setOutFaultInterceptors, setOutInterceptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cxf.interceptor.InterceptorProvider
getInFaultInterceptors, getInInterceptors, getOutFaultInterceptors, getOutInterceptors
 

Field Detail

THREAD_LOCAL_REQUEST_CONTEXT

public static final java.lang.String THREAD_LOCAL_REQUEST_CONTEXT
See Also:
Constant Field Values

FINISHED

public static final java.lang.String FINISHED
See Also:
Constant Field Values

bus

protected Bus bus

conduitSelector

protected ConduitSelector conduitSelector

outFaultObserver

protected ClientOutFaultObserver outFaultObserver

synchronousTimeout

protected int synchronousTimeout

outboundChainCache

protected PhaseChainCache outboundChainCache

inboundChainCache

protected PhaseChainCache inboundChainCache

currentRequestContext

protected java.util.Map<java.lang.String,java.lang.Object> currentRequestContext

requestContext

protected java.util.Map<java.lang.Thread,ClientImpl.EchoContext> requestContext

responseContext

protected java.util.Map<java.lang.Thread,java.util.Map<java.lang.String,java.lang.Object>> responseContext

executor

protected java.util.concurrent.Executor executor
Constructor Detail

ClientImpl

public ClientImpl(Bus b,
                  Endpoint e)

ClientImpl

public ClientImpl(Bus b,
                  Endpoint e,
                  Conduit c)

ClientImpl

public ClientImpl(Bus b,
                  Endpoint e,
                  ConduitSelector sc)

ClientImpl

public ClientImpl(java.net.URL wsdlUrl)

ClientImpl

public ClientImpl(java.net.URL wsdlUrl,
                  javax.xml.namespace.QName port)

ClientImpl

public ClientImpl(Bus bus,
                  java.net.URL wsdlUrl,
                  javax.xml.namespace.QName service,
                  javax.xml.namespace.QName port)
Create a Client that uses the default EndpointImpl.

Parameters:
bus -
wsdlUrl -
service -
port -

ClientImpl

public ClientImpl(Bus bus,
                  java.net.URL wsdlUrl,
                  javax.xml.namespace.QName service,
                  javax.xml.namespace.QName port,
                  EndpointImplFactory endpointImplFactory)
Create a Client that uses a specific EndpointImpl.

Parameters:
bus -
wsdlUrl -
service -
port -
endpointImplFactory -
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface Client

getEndpoint

public Endpoint getEndpoint()
Specified by:
getEndpoint in interface Client

getRequestContext

public java.util.Map<java.lang.String,java.lang.Object> getRequestContext()
Specified by:
getRequestContext in interface Client

getResponseContext

public java.util.Map<java.lang.String,java.lang.Object> getResponseContext()
Specified by:
getResponseContext in interface Client

isThreadLocalRequestContext

public boolean isThreadLocalRequestContext()
Specified by:
isThreadLocalRequestContext in interface Client

setThreadLocalRequestContext

public void setThreadLocalRequestContext(boolean b)
Specified by:
setThreadLocalRequestContext in interface Client

invoke

public java.lang.Object[] invoke(BindingOperationInfo oi,
                                 java.lang.Object... params)
                          throws java.lang.Exception
Specified by:
invoke in interface Client
Throws:
java.lang.Exception

invoke

public java.lang.Object[] invoke(java.lang.String operationName,
                                 java.lang.Object... params)
                          throws java.lang.Exception
Specified by:
invoke in interface Client
Throws:
java.lang.Exception

invoke

public java.lang.Object[] invoke(javax.xml.namespace.QName operationName,
                                 java.lang.Object... params)
                          throws java.lang.Exception
Specified by:
invoke in interface Client
Throws:
java.lang.Exception

invokeWrapped

public java.lang.Object[] invokeWrapped(java.lang.String operationName,
                                        java.lang.Object... params)
                                 throws java.lang.Exception
Specified by:
invokeWrapped in interface Client
Throws:
java.lang.Exception

invokeWrapped

public java.lang.Object[] invokeWrapped(javax.xml.namespace.QName operationName,
                                        java.lang.Object... params)
                                 throws java.lang.Exception
Specified by:
invokeWrapped in interface Client
Throws:
java.lang.Exception

invoke

public java.lang.Object[] invoke(BindingOperationInfo oi,
                                 java.lang.Object[] params,
                                 Exchange exchange)
                          throws java.lang.Exception
Throws:
java.lang.Exception

invoke

public java.lang.Object[] invoke(BindingOperationInfo oi,
                                 java.lang.Object[] params,
                                 java.util.Map<java.lang.String,java.lang.Object> context)
                          throws java.lang.Exception
Specified by:
invoke in interface Client
Throws:
java.lang.Exception

invoke

public void invoke(ClientCallback callback,
                   java.lang.String operationName,
                   java.lang.Object... params)
            throws java.lang.Exception
Specified by:
invoke in interface Client
Throws:
java.lang.Exception

invoke

public void invoke(ClientCallback callback,
                   javax.xml.namespace.QName operationName,
                   java.lang.Object... params)
            throws java.lang.Exception
Specified by:
invoke in interface Client
Throws:
java.lang.Exception

invokeWrapped

public void invokeWrapped(ClientCallback callback,
                          java.lang.String operationName,
                          java.lang.Object... params)
                   throws java.lang.Exception
Specified by:
invokeWrapped in interface Client
Throws:
java.lang.Exception

invokeWrapped

public void invokeWrapped(ClientCallback callback,
                          javax.xml.namespace.QName operationName,
                          java.lang.Object... params)
                   throws java.lang.Exception
Specified by:
invokeWrapped in interface Client
Throws:
java.lang.Exception

invoke

public void invoke(ClientCallback callback,
                   BindingOperationInfo oi,
                   java.lang.Object... params)
            throws java.lang.Exception
Specified by:
invoke in interface Client
Throws:
java.lang.Exception

invoke

public java.lang.Object[] invoke(BindingOperationInfo oi,
                                 java.lang.Object[] params,
                                 java.util.Map<java.lang.String,java.lang.Object> context,
                                 Exchange exchange)
                          throws java.lang.Exception
Specified by:
invoke in interface Client
Specified by:
invoke in interface Retryable
Throws:
java.lang.Exception

processResult

protected java.lang.Object[] processResult(Message message,
                                           Exchange exchange,
                                           BindingOperationInfo oi,
                                           java.util.Map<java.lang.String,java.lang.Object> resContext)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getException

protected java.lang.Exception getException(Exchange exchange)

setContext

protected void setContext(java.util.Map<java.lang.String,java.lang.Object> ctx,
                          Message message)

waitResponse

protected void waitResponse(Exchange exchange)

setParameters

protected void setParameters(java.lang.Object[] params,
                             Message message)

onMessage

public void onMessage(Message message)
Specified by:
onMessage in interface MessageObserver

getConduit

public Conduit getConduit()
Specified by:
getConduit in interface Client

prepareConduitSelector

protected void prepareConduitSelector(Message message)

setOutMessageProperties

protected void setOutMessageProperties(Message message,
                                       BindingOperationInfo boi)

setExchangeProperties

protected void setExchangeProperties(Exchange exchange,
                                     Endpoint endpoint,
                                     BindingOperationInfo boi)

setupInterceptorChain

protected PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint)

modifyChain

protected void modifyChain(InterceptorChain chain,
                           java.util.Map<java.lang.String,java.lang.Object> ctx)

setEndpoint

protected void setEndpoint(Endpoint e)

getSynchronousTimeout

public int getSynchronousTimeout()

setSynchronousTimeout

public void setSynchronousTimeout(int synchronousTimeout)

getConduitSelector

public final ConduitSelector getConduitSelector()
Specified by:
getConduitSelector in interface Client

getConduitSelector

protected final ConduitSelector getConduitSelector(ConduitSelector override)

setConduitSelector

public final void setConduitSelector(ConduitSelector selector)
Specified by:
setConduitSelector in interface Client

setExecutor

public void setExecutor(java.util.concurrent.Executor executor)
Specified by:
setExecutor in interface Client


Apache CXF