Class SyncServiceClientFactoryCxf
- java.lang.Object
-
- com.devonfw.module.service.common.base.client.PartialServiceClientFactory
-
- com.devonfw.module.service.common.base.client.AbstractSyncServiceClientFactory
-
- com.devonfw.module.cxf.common.impl.client.SyncServiceClientFactoryCxf
-
- All Implemented Interfaces:
SyncServiceClientFactory
public abstract class SyncServiceClientFactoryCxf extends AbstractSyncServiceClientFactory
Abstract base implementation ofAbstractSyncServiceClientFactoryfor service clients using Apache CXF.- Since:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description SyncServiceClientFactoryCxf()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract <S> voidapplyAspects(ServiceContext<S> context, S serviceClient)Implementations should call the following methods:applyInterceptors(ServiceContext, InterceptorProvider)applyClientPolicy(ServiceContext, HTTPConduit)applyHeaders(ServiceContext, Object)protected voidapplyClientPolicy(ServiceContext<?> context, org.apache.cxf.transport.http.HTTPConduit conduit)protected abstract voidapplyHeaders(ServiceContext<?> context, Object serviceClient)Applies headers to the givenserviceClient.protected voidapplyInterceptors(ServiceContext<?> context, org.apache.cxf.interceptor.InterceptorProvider client)Applies CXF interceptors to the givenserviceClient.protected org.apache.cxf.transports.http.configuration.HTTPClientPolicycreateClientPolicy(ServiceContext<?> context)ServiceClientErrorFactorygetErrorFactory()voidsetErrorFactory(ServiceClientErrorFactory errorFactory)-
Methods inherited from class com.devonfw.module.service.common.base.client.AbstractSyncServiceClientFactory
create, createService
-
Methods inherited from class com.devonfw.module.service.common.base.client.PartialServiceClientFactory
getTypeHandler
-
-
-
-
Method Detail
-
getErrorFactory
public ServiceClientErrorFactory getErrorFactory()
- Returns:
- the
ServiceClientErrorFactory.
-
setErrorFactory
@Inject public void setErrorFactory(ServiceClientErrorFactory errorFactory)
- Parameters:
errorFactory- new value oferrorFactorytoInject.
-
createClientPolicy
protected org.apache.cxf.transports.http.configuration.HTTPClientPolicy createClientPolicy(ServiceContext<?> context)
- Parameters:
context- theServiceContext.- Returns:
- the
HTTPClientPolicyfor theconfigurationornullto use defaults.
-
applyInterceptors
protected void applyInterceptors(ServiceContext<?> context, org.apache.cxf.interceptor.InterceptorProvider client)
Applies CXF interceptors to the givenserviceClient.- Parameters:
context- theServiceContext.client- theInterceptorProvider.
-
applyClientPolicy
protected void applyClientPolicy(ServiceContext<?> context, org.apache.cxf.transport.http.HTTPConduit conduit)
- Parameters:
context- theServiceContext.conduit- theHTTPConduitwhere to apply theHTTPClientPolicyto.
-
applyAspects
protected abstract <S> void applyAspects(ServiceContext<S> context, S serviceClient)
Implementations should call the following methods:- Type Parameters:
S- the generic type of theservice API.- Parameters:
context- theServiceContext.serviceClient- thecreated service client stub.
-
applyHeaders
protected abstract void applyHeaders(ServiceContext<?> context, Object serviceClient)
Applies headers to the givenserviceClient.- Parameters:
context- theServiceContext.serviceClient- the service client instance.
-
-