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
,CamelContextAware
,Endpoint
,IsSingleton
,Service
,ShutdownableService
,HasId
,StatefulService
,SuspendableService
,AuditableEndpoint<AuditDatasetType>
,InterceptableEndpoint<FhirEndpointConfiguration<AuditDatasetType>,
ComponentType>
- Direct Known Subclasses:
CustomFhirEndpoint
,Iti105Endpoint
,Iti65Endpoint
,Iti66Endpoint
,Iti67Endpoint
,Iti78Endpoint
,Iti81Endpoint
,Iti83Endpoint
,Pcc44Endpoint
,Pharm5Endpoint
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
-
Field Summary
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
ConstructorDescriptionFhirEndpoint
(String uri, ComponentType fhirComponent, FhirEndpointConfiguration<AuditDatasetType> config) -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(FhirConsumer<AuditDatasetType> consumer) Called when aFhirConsumer
is started.Returns a list of interceptors that are default for FHIR consumers.Returns a list of interceptors that are default for FHIR producers.void
disconnect
(FhirConsumer<AuditDatasetType> consumer) Called when aFhirConsumer
is stopped.doCreateConsumer
(Processor processor) Returns client-side audit strategy instance.Returns server-side audit strategy instance.boolean
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, 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, isPollingConsumerCopy, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, 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
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isSingletonProducer, setCamelContext
Methods inherited from interface org.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint
createConsumer, createProducer, getCustomInterceptors
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
FhirEndpoint
public FhirEndpoint(String uri, ComponentType fhirComponent, FhirEndpointConfiguration<AuditDatasetType> config)
-
-
Method Details
-
getInterceptableComponent
- Specified by:
getInterceptableComponent
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,
ComponentType extends FhirComponent<AuditDatasetType>> - Returns:
- the component for this endpoint
-
doCreateProducer
- Specified by:
doCreateProducer
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,
ComponentType extends FhirComponent<AuditDatasetType>> - Returns:
- the actual producer without any interceptors configured
-
connect
Called when aFhirConsumer
is started. Registers the resource provider- Parameters:
consumer
- FhirConsumer
-
disconnect
Called when aFhirConsumer
is stopped. Unregisters the resource provider- Parameters:
consumer
- FhirConsumer- Throws:
Exception
- if resource provider could not be unregistered
-
getContext
-
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
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 interfaceIsSingleton
- Overrides:
isSingleton
in classorg.apache.camel.support.DefaultEndpoint
-
getInterceptableConfiguration
- Specified by:
getInterceptableConfiguration
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,
ComponentType extends FhirComponent<AuditDatasetType>> - Returns:
- the configuration for this endpoint
-
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
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
- Specified by:
getAuditContext
in interfaceAuditableEndpoint<AuditDatasetType extends FhirAuditDataset>
- Returns:
- audit context to be used for this endpoint
-
doCreateConsumer
- Specified by:
doCreateConsumer
in interfaceInterceptableEndpoint<AuditDatasetType extends FhirAuditDataset,
ComponentType extends FhirComponent<AuditDatasetType>> - Returns:
- the actual consumer without any interceptors configured
-
getClientRequestFactory
-
getConsumerSelector
-