Class FhirEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<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.fhir.core.FhirEndpoint<AuditDatasetType,ComponentType>
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
,AuditableEndpoint<AuditDatasetType>
,InterceptableEndpoint<FhirEndpointConfiguration<AuditDatasetType>,ComponentType>
- Direct Known Subclasses:
CustomFhirEndpoint
,Iti65Endpoint
,Iti66Endpoint
,Iti67Endpoint
,Iti78Endpoint
,Iti81Endpoint
,Iti83Endpoint
,Pcc44Endpoint
public abstract class FhirEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<AuditDatasetType>> extends org.apache.camel.support.DefaultEndpoint implements InterceptableEndpoint<FhirEndpointConfiguration<AuditDatasetType>,ComponentType>, AuditableEndpoint<AuditDatasetType>
Generic FHIR endpoint- Since:
- 3.1
- Author:
- Christian Ohr
-
-
Constructor Summary
Constructors Constructor Description FhirEndpoint(String uri, ComponentType fhirComponent, FhirEndpointConfiguration<AuditDatasetType> config)
-
Method Summary
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openehealth.ipf.platform.camel.ihe.atna.AuditableEndpoint
isAudit
-
Methods inherited from interface org.apache.camel.Endpoint
configureProperties, createAsyncProducer, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, isLenientProperties, isSingletonProducer, setCamelContext
-
Methods inherited from interface org.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint
createConsumer, createProducer, getCustomInterceptors
-
-
-
-
Constructor Detail
-
FhirEndpoint
public FhirEndpoint(String uri, ComponentType fhirComponent, FhirEndpointConfiguration<AuditDatasetType> config)
-
-
Method Detail
-
getInterceptableComponent
public ComponentType getInterceptableComponent()
- Specified by:
getInterceptableComponent
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<AuditDatasetType>>
- Returns:
- the component for this endpoint
-
doCreateProducer
public org.apache.camel.Producer doCreateProducer()
- Specified by:
doCreateProducer
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<AuditDatasetType>>
- Returns:
- the actual producer without any interceptors configured
-
connect
public void connect(FhirConsumer<AuditDatasetType> consumer)
Called when aFhirConsumer
is started. Registers the resource provider- Parameters:
consumer
- FhirConsumer
-
disconnect
public void disconnect(FhirConsumer<AuditDatasetType> consumer) throws Exception
Called when aFhirConsumer
is stopped. Unregisters the resource provider- Parameters:
consumer
- FhirConsumer- Throws:
Exception
- if resource provider could not be unregistered
-
getContext
public FhirContext getContext()
-
createInitialConsumerInterceptorChain
public List<Interceptor> createInitialConsumerInterceptorChain()
Returns a list of interceptors that are default for FHIR consumers. Subclasses can add additional interceptors that are required for a concrete FHIR endpoint.- Specified by:
createInitialConsumerInterceptorChain
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<AuditDatasetType>>
- Returns:
- list of default interceptors
-
createInitialProducerInterceptorChain
public List<Interceptor> createInitialProducerInterceptorChain()
Returns a list of interceptors that are default for FHIR producers. Subclasses can add additional interceptors that are required for a concrete FHIR endpoint.- Specified by:
createInitialProducerInterceptorChain
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<AuditDatasetType>>
- Returns:
- list of default interceptors
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interfaceorg.apache.camel.IsSingleton
- Overrides:
isSingleton
in classorg.apache.camel.support.DefaultEndpoint
-
getInterceptableConfiguration
public FhirEndpointConfiguration<AuditDatasetType> getInterceptableConfiguration()
- Specified by:
getInterceptableConfiguration
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<AuditDatasetType>>
- Returns:
- the configuration for this endpoint
-
getClientAuditStrategy
public AuditStrategy<AuditDatasetType> getClientAuditStrategy()
Description copied from interface:AuditableEndpoint
Returns client-side audit strategy instance.- Specified by:
getClientAuditStrategy
in interfaceAuditableEndpoint<AuditDatasetType extends FhirAuditDataset>
- Returns:
- client-side audit strategy instance
-
getServerAuditStrategy
public AuditStrategy<AuditDatasetType> getServerAuditStrategy()
Description copied from interface:AuditableEndpoint
Returns server-side audit strategy instance.- Specified by:
getServerAuditStrategy
in interfaceAuditableEndpoint<AuditDatasetType extends FhirAuditDataset>
- Returns:
- server-side audit strategy instance
-
getAuditContext
public AuditContext getAuditContext()
- Specified by:
getAuditContext
in interfaceAuditableEndpoint<AuditDatasetType extends FhirAuditDataset>
- Returns:
- audit context to be used for this endpoint
-
doCreateConsumer
public org.apache.camel.Consumer doCreateConsumer(org.apache.camel.Processor processor)
- Specified by:
doCreateConsumer
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,ComponentType extends FhirComponent<AuditDatasetType>>
- Returns:
- the actual consumer without any interceptors configured
-
getClientRequestFactory
public ClientRequestFactory<?> getClientRequestFactory()
-
getConsumerSelector
public Predicate<RequestDetails> getConsumerSelector()
-
-