Package org.apache.cxf.endpoint
Interface Client
- 
- All Superinterfaces:
- AutoCloseable,- ConduitSelectorHolder,- InterceptorProvider,- MessageObserver
 - All Known Implementing Classes:
- ClientImpl
 
 public interface Client extends InterceptorProvider, MessageObserver, ConduitSelectorHolder, AutoCloseable 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceClient.ContextsWrappers the contexts in a way that allows the contexts to be cleared and released in an try-with-resources block
 - 
Field SummaryFields Modifier and Type Field Description static StringKEEP_CONDUIT_ALIVEstatic StringREQUEST_CONTEXTstatic StringRESPONSE_CONTEXT
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddestroy()Indicates that the client is no longer needed and that any resources it holds can now be freed.BusgetBus()Retrieves the Bus that was used to create the ClientConduitgetConduit()Get the Conduit that messages for this client will be sent on.ConduitSelectorgetConduitSelector()Get the ConduitSelector responsible for retreiving the Conduit.default Client.ContextsgetContexts()EndpointgetEndpoint()Map<String,Object>getRequestContext()Gets the request context used for future invocationsMap<String,Object>getResponseContext()Gets the response context from the last invocation on this threadObject[]invoke(String operationName, Object... params)Invokes an operation synchronouslyObject[]invoke(QName operationName, Object... params)Invokes an operation synchronouslyvoidinvoke(ClientCallback callback, String operationName, Object... params)Invokes an operation asynchronouslyvoidinvoke(ClientCallback callback, QName operationName, Object... params)Invokes an operation asynchronouslyvoidinvoke(ClientCallback callback, BindingOperationInfo oi, Object... params)Invokes an operation asynchronouslyvoidinvoke(ClientCallback callback, BindingOperationInfo oi, Object[] params, Map<String,Object> context)Invokes an operation asynchronouslyvoidinvoke(ClientCallback callback, BindingOperationInfo oi, Object[] params, Map<String,Object> context, Exchange exchange)Invokes an operation asynchronouslyvoidinvoke(ClientCallback callback, BindingOperationInfo oi, Object[] params, Exchange exchange)Invokes an operation asynchronouslyObject[]invoke(BindingOperationInfo oi, Object... params)Invokes an operation synchronouslyObject[]invoke(BindingOperationInfo oi, Object[] params, Map<String,Object> context)Invokes an operation synchronouslyObject[]invoke(BindingOperationInfo oi, Object[] params, Map<String,Object> context, Exchange exchange)Invokes an operation synchronouslyObject[]invokeWrapped(String operationName, Object... params)Invokes an operation synchronouslyObject[]invokeWrapped(QName operationName, Object... params)Invokes an operation synchronouslyvoidinvokeWrapped(ClientCallback callback, String operationName, Object... params)Invokes an operation asynchronouslyvoidinvokeWrapped(ClientCallback callback, QName operationName, Object... params)Invokes an operation asynchronouslybooleanisThreadLocalRequestContext()Checks if the Request context is thread local or global.voidsetConduitSelector(ConduitSelector selector)Set the ConduitSelector responsible for retreiving the Conduit.voidsetExecutor(Executor executor)Sets the executor which is used to process Asynchronous responses.voidsetThreadLocalRequestContext(boolean b)Sets whether the request context is thread local or global to this client.- 
Methods inherited from interface java.lang.AutoCloseableclose
 - 
Methods inherited from interface org.apache.cxf.interceptor.InterceptorProvidergetInFaultInterceptors, getInInterceptors, getOutFaultInterceptors, getOutInterceptors
 - 
Methods inherited from interface org.apache.cxf.transport.MessageObserveronMessage
 
- 
 
- 
- 
- 
Field Detail- 
REQUEST_CONTEXTstatic final String REQUEST_CONTEXT - See Also:
- Constant Field Values
 
 - 
RESPONSE_CONTEXTstatic final String RESPONSE_CONTEXT - See Also:
- Constant Field Values
 
 - 
KEEP_CONDUIT_ALIVEstatic final String KEEP_CONDUIT_ALIVE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
invokeObject[] invoke(String operationName, Object... params) throws Exception Invokes an operation synchronously- 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:
- Exception
 
 - 
invokeObject[] invoke(QName operationName, Object... params) throws Exception Invokes an operation synchronously- 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:
- Exception
 
 - 
invokeWrappedObject[] invokeWrapped(String operationName, Object... params) throws Exception Invokes an operation synchronously- 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:
- Exception
 
 - 
invokeWrappedObject[] invokeWrapped(QName operationName, Object... params) throws Exception Invokes an operation synchronously- 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:
- Exception
 
 - 
invokeObject[] invoke(BindingOperationInfo oi, Object... params) throws Exception Invokes an operation synchronously- 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:
- Exception
 
 - 
invokeObject[] invoke(BindingOperationInfo oi, Object[] params, Map<String,Object> context) throws Exception Invokes an operation synchronously- 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:
- Exception
 
 - 
invokeObject[] invoke(BindingOperationInfo oi, Object[] params, Map<String,Object> context, Exchange exchange) throws Exception Invokes an operation synchronously- 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
- exchange- The Exchange to be used for the invocation
- Returns:
- The return values that matche the parts of the output message of the operation
- Throws:
- Exception
 
 - 
invokevoid invoke(ClientCallback callback, String operationName, Object... params) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- 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
- Throws:
- Exception
 
 - 
invokevoid invoke(ClientCallback callback, QName operationName, Object... params) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- 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
- Throws:
- Exception
 
 - 
invokeWrappedvoid invokeWrapped(ClientCallback callback, String operationName, Object... params) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- 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
- Throws:
- Exception
 
 - 
invokeWrappedvoid invokeWrapped(ClientCallback callback, QName operationName, Object... params) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- operationName- The name of the operation to be invoked
- params- The params that matches the parts of the input message of the operation
- Throws:
- Exception
 
 - 
invokevoid invoke(ClientCallback callback, BindingOperationInfo oi, Object... params) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- oi- The operation to be invoked
- params- The params that matches the parts of the input message of the operation
- Throws:
- Exception
 
 - 
invokevoid invoke(ClientCallback callback, BindingOperationInfo oi, Object[] params, Map<String,Object> context) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- oi- The operation to be invoked
- params- The params that matches the parts of the input message of the operation
- context- contextual information for the invocation
- Throws:
- Exception
 
 - 
invokevoid invoke(ClientCallback callback, BindingOperationInfo oi, Object[] params, Exchange exchange) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- oi- The operation to be invoked
- params- The params that matches the parts of the input message of the operation
- exchange- The Exchange to be used for the invocation
- Throws:
- Exception
 
 - 
invokevoid invoke(ClientCallback callback, BindingOperationInfo oi, Object[] params, Map<String,Object> context, Exchange exchange) throws Exception Invokes an operation asynchronously- Parameters:
- callback- The callback that is called when the response is ready
- 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
- exchange- Optional (can be null) The Exchange to be used for the invocation
- Throws:
- Exception
 
 - 
getRequestContextMap<String,Object> getRequestContext() Gets the request context used for future invocations- Returns:
- context The context
 
 - 
getResponseContextMap<String,Object> getResponseContext() Gets the response context from the last invocation on this thread- Returns:
- context The context
 
 - 
setThreadLocalRequestContextvoid setThreadLocalRequestContext(boolean b) Sets whether the request context is thread local or global to this client. By default, the request context is "global" in that any values set in the context are seen by all threads using this client. If set to true, the context is changed to be a ThreadLocal and values set are not seen by other threads.- Parameters:
- b-
 
 - 
isThreadLocalRequestContextboolean isThreadLocalRequestContext() Checks if the Request context is thread local or global.- Returns:
- true if the request context is a thread local
 
 - 
getContextsdefault Client.Contexts getContexts() 
 - 
getEndpointEndpoint getEndpoint() 
 - 
getConduitConduit getConduit() Get the Conduit that messages for this client will be sent on.- Returns:
- Conduit
 
 - 
getConduitSelectorConduitSelector getConduitSelector() Get the ConduitSelector responsible for retreiving the Conduit.- Specified by:
- getConduitSelectorin interface- ConduitSelectorHolder
- Returns:
- the current ConduitSelector
 
 - 
setConduitSelectorvoid setConduitSelector(ConduitSelector selector) Set the ConduitSelector responsible for retreiving the Conduit.- Specified by:
- setConduitSelectorin interface- ConduitSelectorHolder
- Parameters:
- selector- the ConduitSelector to use
 
 - 
destroyvoid destroy() Indicates that the client is no longer needed and that any resources it holds can now be freed.
 - 
setExecutorvoid setExecutor(Executor executor) Sets the executor which is used to process Asynchronous responses. The default is to use the threads provided by the transport. (example: the JMS listener threads)- Parameters:
- executor-
 
 - 
getBusBus getBus() Retrieves the Bus that was used to create the Client- Returns:
- the Bus
 
 
- 
 
-