Apache CXF API

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


Field Summary
protected  Bus bus
           
protected  ConduitSelector conduitSelector
           
static java.lang.String FINISHED
           
protected  PhaseChainCache inboundChainCache
           
protected  PhaseChainCache outboundChainCache
           
protected  ClientOutFaultObserver outFaultObserver
           
protected  int synchronousTimeout
           
 
Fields inherited from interface org.apache.cxf.endpoint.Client
REQUEST_CONTEXT, REQUEST_METHOD, 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)
           
ClientImpl(java.net.URL wsdlUrl)
           
ClientImpl(java.net.URL wsdlUrl, javax.xml.namespace.QName port)
           
 
Method Summary
 void destroy()
          Indicates that the client is no longer needed and that any resources it holds can now be freed.
 Conduit getConduit()
          Get the Conduit that messages for this client will be sent on.
 ConduitSelector getConduitSelector()
          Get the ConduitSelector responsible for retreiving the Conduit.
protected  ConduitSelector getConduitSelector(ConduitSelector override)
           
 Endpoint getEndpoint()
           
protected  java.lang.Exception getException(Exchange exchange)
           
 int getSynchronousTimeout()
           
 java.lang.Object[] invoke(BindingOperationInfo oi, java.lang.Object... params)
          Invokes an operation syncronously
 java.lang.Object[] invoke(BindingOperationInfo oi, java.lang.Object[] params, java.util.Map<java.lang.String,java.lang.Object> context)
          Invokes an operation syncronously
 java.lang.Object[] invoke(BindingOperationInfo oi, java.lang.Object[] params, java.util.Map<java.lang.String,java.lang.Object> context, Exchange exchange)
           
 java.lang.Object[] invoke(javax.xml.namespace.QName operationName, java.lang.Object... params)
          Invokes an operation syncronously
 java.lang.Object[] invoke(java.lang.String operationName, java.lang.Object... params)
          Invokes an operation syncronously
 java.lang.Object[] invokeWrapped(javax.xml.namespace.QName operationName, java.lang.Object... params)
          Invokes an operation syncronously
 java.lang.Object[] invokeWrapped(java.lang.String operationName, java.lang.Object... params)
          Invokes an operation syncronously
protected  void modifyChain(InterceptorChain chain, java.util.Map<java.lang.String,java.lang.Object> ctx)
           
 void onMessage(Message message)
          Called for an incoming message, i.e.
protected  void prepareConduitSelector(Message message)
           
 void setConduitSelector(ConduitSelector selector)
          Set the ConduitSelector responsible for retreiving the Conduit.
protected  void setEndpoint(Endpoint e)
           
protected  void setExchangeProperties(Exchange exchange, Endpoint endpoint, BindingOperationInfo boi)
           
protected  void setOutMessageProperties(Message message, BindingOperationInfo boi)
           
 void setSynchronousTimeout(int synchronousTimeout)
           
protected  PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint)
           
 
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

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
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)
Method Detail

destroy

public void destroy()
Description copied from interface: Client
Indicates that the client is no longer needed and that any resources it holds can now be freed.

Specified by:
destroy in interface Client

getEndpoint

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

invoke

public java.lang.Object[] invoke(BindingOperationInfo oi,
                                 java.lang.Object... params)
                          throws java.lang.Exception
Description copied from interface: Client
Invokes an operation syncronously

Specified by:
invoke in interface Client
Parameters:
oi - The operation to be invoked
params - The params that matches the parts of the input message of the operation
Returns:
The return values that matche the parts of the output message of the operation
Throws:
java.lang.Exception

invoke

public java.lang.Object[] invoke(java.lang.String operationName,
                                 java.lang.Object... params)
                          throws java.lang.Exception
Description copied from interface: Client
Invokes an operation syncronously

Specified by:
invoke in interface Client
Parameters:
operationName - The name of the operation to be invoked. The service namespace will be used when looking up the BindingOperationInfo.
params - The params that matches the parts of the input message of the operation. If the BindingOperationInfo supports unwrapping, it assumes the params are in the "unwrapped" form. If params are in the wrapped form, use invokeWrapped
Returns:
The return values that matche the parts of the output message of the operation
Throws:
java.lang.Exception

invoke

public java.lang.Object[] invoke(javax.xml.namespace.QName operationName,
                                 java.lang.Object... params)
                          throws java.lang.Exception
Description copied from interface: Client
Invokes an operation syncronously

Specified by:
invoke in interface Client
Parameters:
operationName - The name of the operation to be invoked
params - The params that matches the parts of the input message of the operation. If the BindingOperationInfo supports unwrapping, it assumes the params are in the "unwrapped" form. If params are in the wrapped form, use invokeWrapped
Returns:
The return values that matche the parts of the output message of the operation
Throws:
java.lang.Exception

invokeWrapped

public java.lang.Object[] invokeWrapped(java.lang.String operationName,
                                        java.lang.Object... params)
                                 throws java.lang.Exception
Description copied from interface: Client
Invokes an operation syncronously

Specified by:
invokeWrapped in interface Client
Parameters:
operationName - The name of the operation to be invoked. The service namespace will be used when looking up the BindingOperationInfo.
params - The params that matches the parts of the input message of the operation
Returns:
The return values that matche the parts of the output message of the operation
Throws:
java.lang.Exception

invokeWrapped

public java.lang.Object[] invokeWrapped(javax.xml.namespace.QName operationName,
                                        java.lang.Object... params)
                                 throws java.lang.Exception
Description copied from interface: Client
Invokes an operation syncronously

Specified by:
invokeWrapped in interface Client
Parameters:
operationName - The name of the operation to be invoked
params - The params that matches the parts of the input message of the operation
Returns:
The return values that matche the parts of the output message of the operation
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
Description copied from interface: Client
Invokes an operation syncronously

Specified by:
invoke in interface Client
Parameters:
oi - The operation to be invoked
params - The params that matches the parts of the input message of the operation
context - Optional (can be null) contextual information for the invocation
Returns:
The return values that matche the parts of the output message of the operation
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 Retryable
Throws:
java.lang.Exception

getException

protected java.lang.Exception getException(Exchange exchange)

onMessage

public void onMessage(Message message)
Description copied from interface: MessageObserver
Called for an incoming message, i.e. where the content format(s) is/are source(s).

Specified by:
onMessage in interface MessageObserver

getConduit

public Conduit getConduit()
Description copied from interface: Client
Get the Conduit that messages for this client will be sent on.

Specified by:
getConduit in interface Client
Returns:
Conduit

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()
Description copied from interface: Client
Get the ConduitSelector responsible for retreiving the Conduit.

Specified by:
getConduitSelector in interface Client
Returns:
the current ConduitSelector

getConduitSelector

protected final ConduitSelector getConduitSelector(ConduitSelector override)

setConduitSelector

public final void setConduitSelector(ConduitSelector selector)
Description copied from interface: Client
Set the ConduitSelector responsible for retreiving the Conduit.

Specified by:
setConduitSelector in interface Client
Parameters:
selector - the ConduitSelector to use

Apache CXF API

Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.