Class JaxWsClientFactory<AuditDatasetType extends WsAuditDataset>
- java.lang.Object
-
- org.openehealth.ipf.commons.ihe.ws.JaxWsClientFactory<AuditDatasetType>
-
- Direct Known Subclasses:
JaxWsRequestClientFactory
public class JaxWsClientFactory<AuditDatasetType extends WsAuditDataset> extends Object
Factory for ITI Web Service stubs.- Author:
- Jens Riemschneider
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openehealth.ipf.commons.audit.AuditContextauditContextprotected AuditStrategy<AuditDatasetType>auditStrategyprotected org.vibur.objectpool.PoolService<Object>clientPoolprotected AsynchronyCorrelator<AuditDatasetType>correlatorprotected org.apache.cxf.interceptor.InterceptorProvidercustomInterceptorsprotected List<org.apache.cxf.feature.AbstractFeature>featuresprotected org.apache.cxf.transports.http.configuration.HTTPClientPolicyhttpClientPolicystatic StringPOOL_SIZE_PROPERTYprotected Map<String,Object>propertiesprotected WsSecurityInformationsecurityInformationprotected StringserviceUrlprotected WsTransactionConfiguration<AuditDatasetType>wsTransactionConfiguration
-
Constructor Summary
Constructors Constructor Description JaxWsClientFactory(WsTransactionConfiguration<AuditDatasetType> wsTransactionConfiguration, String serviceUrl, AuditStrategy<AuditDatasetType> auditStrategy, org.openehealth.ipf.commons.audit.AuditContext auditContext, org.apache.cxf.interceptor.InterceptorProvider customInterceptors, List<org.apache.cxf.feature.AbstractFeature> features, Map<String,Object> properties, AsynchronyCorrelator<AuditDatasetType> correlator, WsSecurityInformation securityInformation, org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy)Constructs the factory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureInterceptors(org.apache.cxf.endpoint.Client client)Configures SOAP interceptors for the given client.protected voidconfigureProperties(org.apache.cxf.endpoint.Client client)ObjectgetClient()Returns a client stub for the web-service.WsTransactionConfiguration<AuditDatasetType>getWsTransactionConfiguration()protected static voidinstallPayloadInterceptors(org.apache.cxf.endpoint.Client client)Helper method for installing of payload-collecting SOAP interceptors for the given Client.voidrestoreClient(Object client)Returns a client stub (previously gained viagetClient()) to the pool.
-
-
-
Field Detail
-
POOL_SIZE_PROPERTY
public static final String POOL_SIZE_PROPERTY
-
clientPool
protected final org.vibur.objectpool.PoolService<Object> clientPool
-
wsTransactionConfiguration
protected final WsTransactionConfiguration<AuditDatasetType extends WsAuditDataset> wsTransactionConfiguration
-
serviceUrl
protected final String serviceUrl
-
customInterceptors
protected final org.apache.cxf.interceptor.InterceptorProvider customInterceptors
-
features
protected final List<org.apache.cxf.feature.AbstractFeature> features
-
auditStrategy
protected final AuditStrategy<AuditDatasetType extends WsAuditDataset> auditStrategy
-
auditContext
protected final org.openehealth.ipf.commons.audit.AuditContext auditContext
-
correlator
protected final AsynchronyCorrelator<AuditDatasetType extends WsAuditDataset> correlator
-
securityInformation
protected final WsSecurityInformation securityInformation
-
httpClientPolicy
protected final org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy
-
-
Constructor Detail
-
JaxWsClientFactory
public JaxWsClientFactory(WsTransactionConfiguration<AuditDatasetType> wsTransactionConfiguration, String serviceUrl, AuditStrategy<AuditDatasetType> auditStrategy, org.openehealth.ipf.commons.audit.AuditContext auditContext, org.apache.cxf.interceptor.InterceptorProvider customInterceptors, List<org.apache.cxf.feature.AbstractFeature> features, Map<String,Object> properties, AsynchronyCorrelator<AuditDatasetType> correlator, WsSecurityInformation securityInformation, org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy)
Constructs the factory.- Parameters:
wsTransactionConfiguration- the info about the Web Service.serviceUrl- the URL of the Web Service.auditStrategy- client-side ATNA audit strategy.customInterceptors- user-defined custom CXF interceptors.correlator- optional asynchrony correlator.
-
-
Method Detail
-
getClient
public Object getClient()
Returns a client stub for the web-service.- Returns:
- the client stub
-
getWsTransactionConfiguration
public WsTransactionConfiguration<AuditDatasetType> getWsTransactionConfiguration()
- Returns:
- the service info of this factory.
-
configureInterceptors
protected void configureInterceptors(org.apache.cxf.endpoint.Client client)
Configures SOAP interceptors for the given client.
-
configureProperties
protected void configureProperties(org.apache.cxf.endpoint.Client client)
-
installPayloadInterceptors
protected static void installPayloadInterceptors(org.apache.cxf.endpoint.Client client)
Helper method for installing of payload-collecting SOAP interceptors for the given Client.
-
restoreClient
public void restoreClient(Object client)
Returns a client stub (previously gained viagetClient()) to the pool. This method MUST be called as soon as the use of the port stub is finished.- Parameters:
client- client stub,nullvalues are safe.
-
-