Package org.apache.cxf.jaxrs.client
Class ClientConfiguration
java.lang.Object
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBus()Gets the busGets the conduit responsible for a transport-level communication with the remote service.Gets the conduit selectorGets the HTTP conduit responsible for a transport-level communication with the remote service.List<Interceptor<? extends Message>>Returns the list of interceptors attached to the incoming fault interceptor chain of the object.List<Interceptor<? extends Message>>Returns the list of interceptors attached to the incoming interceptor chain of the object.List<Interceptor<? extends Message>>Returns the list of interceptors attached to the outgoing fault interceptor chain of the object.List<Interceptor<? extends Message>>Returns the list of interceptors attached to the outgoing interceptor chain of the object.Get the map of properties which affect the requests only.Get the map of properties which affect the responses only.longbooleanbooleanIndicates if Response may still be expected for oneway requests.booleanvoidSets the busvoidSets the conduit selectorvoidsetInFaultInterceptors(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 catchWebApplicationExceptionexceptions instead.voidsetInInterceptors(List<Interceptor<? extends Message>> interceptors) Sets the list of in interceptors which pre-process the responses from remote services.voidsetOutFaultInterceptors(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 catchClientExceptionexceptions instead.voidsetOutInterceptors(List<Interceptor<? extends Message>> interceptors) Sets the list of out interceptors which post-process the requests to the remote services.voidsetResetThreadLocalStateImmediately(boolean reset) voidsetShutdownBusOnClose(boolean shutdownBusOnClose) voidsetSynchronousTimeout(long synchronousTimeout) Sets the synchronous timeout
-
Constructor Details
-
ClientConfiguration
public ClientConfiguration()
-
-
Method Details
-
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
Sets the conduit selector- Specified by:
setConduitSelectorin interfaceConduitSelectorHolder- Parameters:
cs- the selector
-
getConduitSelector
Gets the conduit selector- Specified by:
getConduitSelectorin interfaceConduitSelectorHolder- Returns:
- the conduit the selector
-
setBus
Sets the bus- Parameters:
bus- the bus
-
getBus
Gets the bus- Returns:
- the bus
-
getInFaultInterceptors
Description copied from interface:InterceptorProviderReturns the list of interceptors attached to the incoming fault interceptor chain of the object.- Specified by:
getInFaultInterceptorsin interfaceInterceptorProvider- Returns:
Listincoming fault interceptor chain
-
getInInterceptors
Description copied from interface:InterceptorProviderReturns the list of interceptors attached to the incoming interceptor chain of the object.- Specified by:
getInInterceptorsin interfaceInterceptorProvider- Returns:
Listincoming interceptor chain
-
getOutFaultInterceptors
Description copied from interface:InterceptorProviderReturns the list of interceptors attached to the outgoing fault interceptor chain of the object.- Specified by:
getOutFaultInterceptorsin interfaceInterceptorProvider- Returns:
Listoutgoing fault interceptor chain
-
getOutInterceptors
Description copied from interface:InterceptorProviderReturns the list of interceptors attached to the outgoing interceptor chain of the object.- Specified by:
getOutInterceptorsin interfaceInterceptorProvider- Returns:
Listoutgoing interceptor chain
-
setInInterceptors
Sets the list of in interceptors which pre-process the responses from remote services.- Parameters:
interceptors- in interceptors
-
setOutInterceptors
Sets the list of out interceptors which post-process the requests to the remote services.- Parameters:
interceptors- out interceptors
-
setInFaultInterceptors
Sets the list of in fault interceptors which will deal with the HTTP faults; the client code may choose to catchWebApplicationExceptionexceptions instead.- Parameters:
interceptors- in fault interceptors
-
setOutFaultInterceptors
Sets the list of out fault interceptors which will deal with the client-side faults; the client code may choose to catchClientExceptionexceptions instead.- Parameters:
interceptors- out fault interceptors
-
getConduit
Gets the conduit responsible for a transport-level communication with the remote service.- Returns:
- the conduit
-
getHttpConduit
Gets the HTTP conduit responsible for a transport-level communication with the remote service.- Returns:
- the HTTP conduit
-
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
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
-
isShutdownBusOnClose
public boolean isShutdownBusOnClose() -
setShutdownBusOnClose
public void setShutdownBusOnClose(boolean shutdownBusOnClose) -
isResetThreadLocalStateImmediately
public boolean isResetThreadLocalStateImmediately() -
setResetThreadLocalStateImmediately
public void setResetThreadLocalStateImmediately(boolean reset)
-