public abstract class SyncServiceClientFactoryCxf extends Object implements SyncServiceClientFactory
SyncServiceClientFactory for service clients using Apache CXF.| Constructor and Description |
|---|
SyncServiceClientFactoryCxf() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract <S> void |
applyAspects(ServiceContext<S> context,
S serviceClient,
String serviceName)
Implementations should call the following methods:
applyInterceptors(ServiceContext, InterceptorProvider, String)
applyClientPolicy(ServiceContext, HTTPConduit)
applyHeaders(ServiceContext, Object)
|
protected void |
applyClientPolicy(ServiceContext<?> context,
org.apache.cxf.transport.http.HTTPConduit conduit) |
protected abstract void |
applyHeaders(ServiceContext<?> context,
Object serviceClient)
Applies headers to the given
serviceClient. |
protected void |
applyInterceptors(ServiceContext<?> context,
org.apache.cxf.interceptor.InterceptorProvider client,
String serviceName)
Applies CXF interceptors to the given
serviceClient. |
<S> S |
create(ServiceContext<S> context) |
protected org.apache.cxf.transports.http.configuration.HTTPClientPolicy |
createClientPolicy(ServiceContext<?> context) |
protected abstract <S> S |
createService(ServiceContext<S> context,
String url,
String serviceName) |
protected String |
createServiceName(ServiceContext<?> context) |
protected abstract String |
getServiceTypeFolderName() |
protected String |
getUrl(ServiceContext<?> context) |
protected abstract boolean |
isResponsibleForService(ServiceContext<?> context) |
public <S> S create(ServiceContext<S> context)
create in interface SyncServiceClientFactoryprotected abstract <S> S createService(ServiceContext<S> context, String url, String serviceName)
S - the generic type of the service API.context - the ServiceContext.url - the resolved end-point URL of the service to invoke.serviceName - the service name.create(ServiceContext) for further details.protected String getUrl(ServiceContext<?> context)
context - the ServiceContext.URL with additional post-processing such as resolving variables.protected abstract <S> void applyAspects(ServiceContext<S> context, S serviceClient, String serviceName)
S - the generic type of the service API.context - the ServiceContext.serviceClient - the created service client stub.serviceName - the service name.protected abstract String getServiceTypeFolderName()
ServiceConstants.VARIABLE_TYPE such as e.g.
ServiceConstants.URL_FOLDER_REST.protected org.apache.cxf.transports.http.configuration.HTTPClientPolicy createClientPolicy(ServiceContext<?> context)
context - the ServiceContext.HTTPClientPolicy for the configuration or null to
use defaults.protected String createServiceName(ServiceContext<?> context)
context - the ServiceContext.protected void applyInterceptors(ServiceContext<?> context, org.apache.cxf.interceptor.InterceptorProvider client, String serviceName)
serviceClient.context - the ServiceContext.client - the InterceptorProvider.serviceName - the service name.protected void applyClientPolicy(ServiceContext<?> context, org.apache.cxf.transport.http.HTTPConduit conduit)
context - the ServiceContext.conduit - the HTTPConduit where to apply the HTTPClientPolicy to.protected abstract void applyHeaders(ServiceContext<?> context, Object serviceClient)
serviceClient.context - the ServiceContext.serviceClient - the service client instance.protected abstract boolean isResponsibleForService(ServiceContext<?> context)
context - the ServiceContext.true if this implementation is responsibe for creating a service client corresponding to the given
ServiceContext, false otherwise.Copyright © 2014–2019 devon4j-Team. All rights reserved.