Class AbstractWsEndpoint<AuditDatasetType extends WsAuditDataset,ConfigType extends WsTransactionConfiguration<AuditDatasetType>>
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.openehealth.ipf.platform.camel.ihe.ws.AbstractWsEndpoint<AuditDatasetType,ConfigType>
- All Implemented Interfaces:
AutoCloseable,CamelContextAware,ComponentAware,Endpoint,IsSingleton,Service,ShutdownableService,HasCamelContext,HasId,StatefulService,SuspendableService,AuditableEndpoint<AuditDatasetType>
- Direct Known Subclasses:
Hl7v3AsyncResponseEndpoint,Hl7v3Endpoint,HpdEndpoint,SimpleHl7v2WsEndpoint,Xacml20Endpoint,XdsAsyncResponseEndpoint,XdsEndpoint
@ManagedResource(description="Managed IPF eHealth Web Service Endpoint")
public abstract class AbstractWsEndpoint<AuditDatasetType extends WsAuditDataset,ConfigType extends WsTransactionConfiguration<AuditDatasetType>>
extends org.apache.camel.support.DefaultEndpoint
implements AuditableEndpoint<AuditDatasetType>
Camel endpoint used to create producers and consumers based on webservice calls.
- Author:
- Jens Riemschneider, Dmytro Rud
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of Camel message header where the user should store the optional correlation key.static final StringName of Camel message header where incoming HTTP headers will be stored as aMap<String, String>.static final Stringstatic final StringName of Camel message header from where additional user-defined HTTP headers will be taken as aMap<String, String>.static final Stringstatic final StringName of incoming Camel header where the user should store the URL of asynchronous response endpoint (WS-Addressing header "ReplyTo").Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractWsEndpoint(String endpointUri, String address, AbstractWsComponent<AuditDatasetType, ConfigType, ? extends WsInteractionId<ConfigType>> component, Map<String, Object> parameters, Class<? extends AbstractWebService> serviceClass) protectedAbstractWsEndpoint(String endpointUri, String address, AbstractWsComponent<AuditDatasetType, ConfigType, ? extends WsInteractionId<ConfigType>> component, AuditContext auditContext, InterceptorProvider customInterceptors, List<AbstractFeature> features, List<String> schemaLocations, Map<String, Object> properties, org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy, Class<? extends AbstractWebService> serviceClass) Constructs the endpoint. -
Method Summary
Modifier and TypeMethodDescriptioncreateConsumer(Processor processor) Returns client-side audit strategy instance.Returns the correlator.Returns custom interceptors configured for this endpoint.protected AbstractWebServiceReturns a new instance of a service class.org.apache.cxf.transports.http.configuration.HTTPClientPolicyabstract JaxWsClientFactory<AuditDatasetType> abstract JaxWsServiceFactory<AuditDatasetType> abstract AbstractWsProducer<AuditDatasetType, ConfigType, ?, ?> getProducer(AbstractWsEndpoint<AuditDatasetType, ConfigType> endpoint, JaxWsClientFactory<AuditDatasetType> clientFactory) Constructs and returns a transaction-specific Camel producer instanceReturns server-side audit strategy instance.Returns the address of the service.Constructs and returns a transaction-specific service class instance for the given endpoint.Returns the URL of the service.booleanbooleanisAudit()booleanisMtom()booleanisSecure()booleanbooleanvoidsetAuditContext(AuditContext auditContext) voidsetCorrelator(AsynchronyCorrelator<AuditDatasetType> correlator) Configures the asynchrony correlator for this endpoint.voidsetHomeCommunityId(String homeCommunityId) Configures homeCommunityId for this endpoint.voidsetHomeCommunityId(URN urn) Configures homeCommunityId for this endpoint.voidsetHostnameVerifier(HostnameVerifier hostnameVerifier) voidsetHttpClientPolicy(org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy) voidsetPassword(String password) voidsetRejectionHandlingStrategy(WsRejectionHandlingStrategy rejectionHandlingStrategy) voidsetSecure(boolean secure) voidsetSslContextParameters(SSLContextParameters sslContextParameters) voidsetUsername(String username) Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponent, setComponentMethods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isRemote, isSingletonProducer, setCamelContextMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
WSA_REPLYTO_HEADER_NAME
Name of incoming Camel header where the user should store the URL of asynchronous response endpoint (WS-Addressing header "ReplyTo"). -
CORRELATION_KEY_HEADER_NAME
Name of Camel message header where the user should store the optional correlation key. -
INCOMING_HTTP_HEADERS
Name of Camel message header where incoming HTTP headers will be stored as aMap<String, String>. -
OUTGOING_HTTP_HEADERS
Name of Camel message header from where additional user-defined HTTP headers will be taken as aMap<String, String>. -
INCOMING_SOAP_HEADERS
-
OUTGOING_SOAP_HEADERS
-
-
Constructor Details
-
AbstractWsEndpoint
protected AbstractWsEndpoint(String endpointUri, String address, AbstractWsComponent<AuditDatasetType, ConfigType, ? extends WsInteractionId<ConfigType>> component, Map<String, Object> parameters, Class<? extends AbstractWebService> serviceClass) -
AbstractWsEndpoint
protected AbstractWsEndpoint(String endpointUri, String address, AbstractWsComponent<AuditDatasetType, ConfigType, ? extends WsInteractionId<ConfigType>> component, AuditContext auditContext, InterceptorProvider customInterceptors, List<AbstractFeature> features, List<String> schemaLocations, Map<String, Object> properties, org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy, Class<? extends AbstractWebService> serviceClass) Constructs the endpoint.- Parameters:
endpointUri- the URI of the endpoint.address- the endpoint address from the URI.component- the component creating this endpoint.auditContext- the audit contextcustomInterceptors- user-defined set of additional CXF interceptors.features- user-defined list of CXF features.
-
-
Method Details
-
getServiceInstance
Constructs and returns a transaction-specific service class instance for the given endpoint.- Returns:
- service class instance for the given endpoint.
-
getCustomServiceInstance
protected AbstractWebService getCustomServiceInstance(AbstractWsEndpoint<AuditDatasetType, ConfigType> endpoint) Returns a new instance of a service class. Overwrite this method if a simple call toConstructor.newInstance(Object...)is not sufficient.- Parameters:
endpoint- this endpoint as parameter- Returns:
- service class instance
-
getClientAuditStrategy
Description copied from interface:AuditableEndpointReturns client-side audit strategy instance.- Specified by:
getClientAuditStrategyin interfaceAuditableEndpoint<AuditDatasetType extends WsAuditDataset>- Returns:
- client-side audit strategy instance
-
getServerAuditStrategy
Description copied from interface:AuditableEndpointReturns server-side audit strategy instance.- Specified by:
getServerAuditStrategyin interfaceAuditableEndpoint<AuditDatasetType extends WsAuditDataset>- Returns:
- server-side audit strategy instance
-
isSingleton
@ManagedAttribute public boolean isSingleton()- Specified by:
isSingletonin interfaceIsSingleton- Overrides:
isSingletonin classorg.apache.camel.support.DefaultEndpoint
-
getServiceUrl
Returns the URL of the service. The URL is derived from the endpoint URI defined in the constructor. If the URI does not represent a producer, this method throws an exception.- Returns:
- the service URL.
-
getServiceAddress
Returns the address of the service. The address is derived from the endpoint URI defined in the constructor. If the URI does not represent a consumer, this method throws an exception.- Returns:
- the service address.
-
isAudit
@ManagedAttribute(description="Audit Enabled") public boolean isAudit()- Specified by:
isAuditin interfaceAuditableEndpoint<AuditDatasetType extends WsAuditDataset>- Returns:
trueif auditing is turned on.trueby default.
-
getAuditContext
- Specified by:
getAuditContextin interfaceAuditableEndpoint<AuditDatasetType extends WsAuditDataset>- Returns:
- audit context to be used for this endpoint
-
setAuditContext
-
isSecure
@ManagedAttribute(description="Security Enabled") public boolean isSecure()- Returns:
trueif https should be used instead of http. Defaults tofalse.
-
setSecure
public void setSecure(boolean secure) - Parameters:
secure-trueif https should be used instead of http.
-
getUsername
-
setUsername
@ManagedAttribute(description="Basic Authentication Username") public void setUsername(String username) -
getPassword
-
setPassword
-
getSslContextParameters
-
setSslContextParameters
-
getHostnameVerifier
-
setHostnameVerifier
-
setCorrelator
Configures the asynchrony correlator for this endpoint. -
getCorrelator
Returns the correlator. -
getCustomCxfInterceptors
Returns custom interceptors configured for this endpoint. -
getHomeCommunityId
- Returns:
- homeCommunityId of this endpoint.
-
setHomeCommunityId
Configures homeCommunityId for this endpoint.- Parameters:
homeCommunityId- homeCommunityId in format "urn:oid:1.2.3.4.5".
-
setHomeCommunityId
Configures homeCommunityId for this endpoint.- Parameters:
urn- homeCommunityId in format "urn:oid:1.2.3.4.5".
-
getRejectionHandlingStrategy
- Returns:
- rejection handling strategy, if any configured.
-
setRejectionHandlingStrategy
- Parameters:
rejectionHandlingStrategy- a rejection handling strategy instance.
-
getFeatures
- Returns:
- CXF features configured for this endpoint.
-
getSchemaLocations
- Returns:
- CXF schema locations configured for this endpoint.
-
getProperties
- Returns:
- CXF schema locations configured for this endpoint.
-
setHttpClientPolicy
public void setHttpClientPolicy(org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy) -
getHttpClientPolicy
public org.apache.cxf.transports.http.configuration.HTTPClientPolicy getHttpClientPolicy() -
getComponent
- Specified by:
getComponentin interfaceComponentAware- Overrides:
getComponentin classorg.apache.camel.support.DefaultEndpoint
-
getJaxWsClientFactory
- Returns:
- JAX-WS client object factory.
-
getJaxWsServiceFactory
- Returns:
- JAX-WS service object factory.
-
createConsumer
- Specified by:
createConsumerin interfaceEndpoint
-
createProducer
- Specified by:
createProducerin interfaceEndpoint
-
getProducer
public abstract AbstractWsProducer<AuditDatasetType,ConfigType, getProducer?, ?> (AbstractWsEndpoint<AuditDatasetType, ConfigType> endpoint, JaxWsClientFactory<AuditDatasetType> clientFactory) Constructs and returns a transaction-specific Camel producer instance- Parameters:
clientFactory- JAX-WS client factory instance.- Returns:
- Camel producer instance.
- Since:
- 3.1
-
isAddressing
@ManagedAttribute(description="Addressing Enabled") public boolean isAddressing()- Returns:
trueif WS-Addressing enabled.
-
isMtom
@ManagedAttribute(description="Mtom Enabled") public boolean isMtom()- Returns:
trueif MTOM enabled.
-
isSwaOutSupport
@ManagedAttribute(description="SOAP With Attachments Output Enabled") public boolean isSwaOutSupport()- Returns:
trueif SOAP With Attachments Output enabled.
-
getSecurityInformation
-