Apache CXF API

org.apache.cxf.jaxrs.client
Class ClientConfiguration

java.lang.Object
  extended by org.apache.cxf.jaxrs.client.ClientConfiguration
All Implemented Interfaces:
ConduitSelectorHolder, InterceptorProvider

public class ClientConfiguration
extends Object
implements InterceptorProvider, ConduitSelectorHolder

Represents the configuration of the current proxy or WebClient. Given an instance with the name 'client', one can access its configuration using a WebClient.getConfig(client) call.


Constructor Summary
ClientConfiguration()
           
 
Method Summary
 Bus getBus()
          Gets the bus
 Conduit getConduit()
          Gets the conduit responsible for a transport-level communication with the remote service.
 ConduitSelector getConduitSelector()
          Gets the conduit selector
 Endpoint getEndpoint()
           
 HTTPConduit getHttpConduit()
          Gets the HTTP conduit responsible for a transport-level communication with the remote service.
 List<Interceptor<? extends Message>> getInFaultInterceptors()
          Returns the list of interceptors attached to the incoming fault interceptor chain of the object.
 List<Interceptor<? extends Message>> getInInterceptors()
          Returns the list of interceptors attached to the incoming interceptor chain of the object.
 List<Interceptor<? extends Message>> getOutFaultInterceptors()
          Returns the list of interceptors attached to the outgoing fault interceptor chain of the object.
 List<Interceptor<? extends Message>> getOutInterceptors()
          Returns the list of interceptors attached to the outgoing interceptor chain of the object.
 Map<String,Object> getRequestContext()
          Get the map of properties which affect the requests only.
 Map<String,Object> getResponseContext()
          Get the map of properties which affect the responses only.
 long getSynchronousTimeout()
           
 boolean isResponseExpectedForOneway()
          Indicates if Response may still be expected for oneway requests.
 void setBus(Bus bus)
          Sets the bus
 void setConduitSelector(ConduitSelector cs)
          Sets the conduit selector
 void setInFaultInterceptors(List<Interceptor<? extends Message>> interceptors)
          Sets the list of in fault interceptors which will deal with the HTTP faults; the client code may choose to catch WebApplicationException exceptions instead.
 void setInInterceptors(List<Interceptor<? extends Message>> interceptors)
          Sets the list of in interceptors which pre-process the responses from remote services.
 void setOutFaultInterceptors(List<Interceptor<? extends Message>> interceptors)
          Sets the list of out fault interceptors which will deal with the client-side faults; the client code may choose to catch ClientException exceptions instead.
 void setOutInterceptors(List<Interceptor<? extends Message>> interceptors)
          Sets the list of out interceptors which post-process the requests to the remote services.
 void setSynchronousTimeout(long synchronousTimeout)
          Sets the synchronous timeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientConfiguration

public ClientConfiguration()
Method Detail

getSynchronousTimeout

public long getSynchronousTimeout()

setSynchronousTimeout

public void setSynchronousTimeout(long synchronousTimeout)
Sets the synchronous timeout

Parameters:
synchronousTimeout -

isResponseExpectedForOneway

public boolean isResponseExpectedForOneway()
Indicates if Response may still be expected for oneway requests. For example, 202 in case of HTTP

Returns:
true if the response can be expected

setConduitSelector

public void setConduitSelector(ConduitSelector cs)
Sets the conduit selector

Specified by:
setConduitSelector in interface ConduitSelectorHolder
Parameters:
cs - the selector

getConduitSelector

public ConduitSelector getConduitSelector()
Gets the conduit selector

Specified by:
getConduitSelector in interface ConduitSelectorHolder
Returns:
the conduit the selector

setBus

public void setBus(Bus bus)
Sets the bus

Parameters:
bus - the bus

getBus

public Bus getBus()
Gets the bus

Returns:
the bus

getInFaultInterceptors

public List<Interceptor<? extends Message>> getInFaultInterceptors()
Description copied from interface: InterceptorProvider
Returns the list of interceptors attached to the incoming fault interceptor chain of the object.

Specified by:
getInFaultInterceptors in interface InterceptorProvider
Returns:
List incoming fault interceptor chain

getInInterceptors

public List<Interceptor<? extends Message>> getInInterceptors()
Description copied from interface: InterceptorProvider
Returns the list of interceptors attached to the incoming interceptor chain of the object.

Specified by:
getInInterceptors in interface InterceptorProvider
Returns:
List incoming interceptor chain

getOutFaultInterceptors

public List<Interceptor<? extends Message>> getOutFaultInterceptors()
Description copied from interface: InterceptorProvider
Returns the list of interceptors attached to the outgoing fault interceptor chain of the object.

Specified by:
getOutFaultInterceptors in interface InterceptorProvider
Returns:
List outgoing fault interceptor chain

getOutInterceptors

public List<Interceptor<? extends Message>> getOutInterceptors()
Description copied from interface: InterceptorProvider
Returns the list of interceptors attached to the outgoing interceptor chain of the object.

Specified by:
getOutInterceptors in interface InterceptorProvider
Returns:
List outgoing interceptor chain

setInInterceptors

public void setInInterceptors(List<Interceptor<? extends Message>> interceptors)
Sets the list of in interceptors which pre-process the responses from remote services.

Parameters:
interceptors - in interceptors

setOutInterceptors

public void setOutInterceptors(List<Interceptor<? extends Message>> interceptors)
Sets the list of out interceptors which post-process the requests to the remote services.

Parameters:
interceptors - out interceptors

setInFaultInterceptors

public void setInFaultInterceptors(List<Interceptor<? extends Message>> interceptors)
Sets the list of in fault interceptors which will deal with the HTTP faults; the client code may choose to catch WebApplicationException exceptions instead.

Parameters:
interceptors - in fault interceptors

setOutFaultInterceptors

public void setOutFaultInterceptors(List<Interceptor<? extends Message>> interceptors)
Sets the list of out fault interceptors which will deal with the client-side faults; the client code may choose to catch ClientException exceptions instead.

Parameters:
interceptors - out fault interceptors

getConduit

public Conduit getConduit()
Gets the conduit responsible for a transport-level communication with the remote service.

Returns:
the conduit

getHttpConduit

public HTTPConduit getHttpConduit()
Gets the HTTP conduit responsible for a transport-level communication with the remote service.

Returns:
the HTTP conduit

getResponseContext

public Map<String,Object> getResponseContext()
Get the map of properties which affect the responses only. These additional properties may be optionally set after a proxy or WebClient has been created.

Returns:
the response context properties

getRequestContext

public Map<String,Object> getRequestContext()
Get the map of properties which affect the requests only. These additional properties may be optionally set after a proxy or WebClient has been created.

Returns:
the request context properties

getEndpoint

public Endpoint getEndpoint()

Apache CXF API

Apache CXF