Class FhirComponent<AuditDatasetType extends FhirAuditDataset>
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultComponent
org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent<AuditDatasetType>
- All Implemented Interfaces:
AutoCloseable
,CamelContextAware
,Component
,Service
,ShutdownableService
,StatefulService
,SuspendableService
,AuditableComponent<AuditDatasetType>
,InterceptableComponent
- Direct Known Subclasses:
CustomFhirComponent
,FhirComponentWithOptions
,Iti105Component
,Iti65Component
,Iti78Component
,Iti81Component
,Iti83Component
,Pharm5Component
public abstract class FhirComponent<AuditDatasetType extends FhirAuditDataset>
extends org.apache.camel.support.DefaultComponent
implements AuditableComponent<AuditDatasetType>, InterceptableComponent
Abstract FHIR Camel component
- 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
ConstructorDescriptionFhirComponent
(CamelContext context, FhirInteractionId<AuditDatasetType> fhirInteractionId) FhirComponent
(FhirInteractionId<AuditDatasetType> fhirInteractionId) -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(FhirConsumer<AuditDatasetType> consumer, FhirProvider resourceProvider) Connects the URL specified on the endpoint to the specified processor.protected FhirEndpointConfiguration<AuditDatasetType>
createConfig
(String remaining, Map<String, Object> parameters) protected Endpoint
void
disconnect
(FhirConsumer<AuditDatasetType> consumer, FhirProvider resourceProvider) Disconnects the URL specified on the endpoint from the specified processor.protected abstract FhirEndpoint<?,
?> doCreateEndpoint
(String uri, FhirEndpointConfiguration<AuditDatasetType> config) Returns a new endpoint instanceReturns client-side audit strategy instance.Returns server-side audit strategy instance.Initializes a default FHIR context for this component.boolean
isCompatibleContext
(FhirContext fhirContext) void
setFhirInteractionId
(FhirInteractionId<AuditDatasetType> fhirInteractionId) Sets the FHIR interactionID.Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
Methods inherited from class org.apache.camel.support.service.BaseService
build, 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.CamelContextAware
getCamelContext, setCamelContext
Methods inherited from interface org.apache.camel.Component
createEndpoint, createEndpoint, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, isAutowiredEnabled, useRawUri
Methods inherited from interface org.openehealth.ipf.platform.camel.ihe.core.InterceptableComponent
getAdditionalConsumerInterceptors, getAdditionalProducerInterceptors
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
-
FhirComponent
-
FhirComponent
-
-
Method Details
-
connect
Connects the URL specified on the endpoint to the specified processor.- Parameters:
consumer
- the consumerresourceProvider
- the resource provider
-
disconnect
public void disconnect(FhirConsumer<AuditDatasetType> consumer, FhirProvider resourceProvider) throws Exception Disconnects the URL specified on the endpoint from the specified processor.- Parameters:
consumer
- the consumer- Throws:
Exception
- can be thrown
-
initializeDefaultFhirContext
Initializes a default FHIR context for this component. Only called if the endpoint does not define its own.- Returns:
- initialized default FHIR context
-
isCompatibleContext
-
createConfig
protected FhirEndpointConfiguration<AuditDatasetType> createConfig(String remaining, Map<String, Object> parameters) throws Exception- Throws:
Exception
-
createEndpoint
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception- Specified by:
createEndpoint
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
doCreateEndpoint
protected abstract FhirEndpoint<?,?> doCreateEndpoint(String uri, FhirEndpointConfiguration<AuditDatasetType> config) Returns a new endpoint instance- Parameters:
uri
- the endpoint URIconfig
- FhirEndpointConfiguration- Returns:
- a new endpoint instance
-
getFhirTransactionConfiguration
- Returns:
- component-specific configuration
-
getServerAuditStrategy
Description copied from interface:AuditableComponent
Returns server-side audit strategy instance.- Specified by:
getServerAuditStrategy
in interfaceAuditableComponent<AuditDatasetType extends FhirAuditDataset>
- Returns:
- server-side audit strategy instance
-
getClientAuditStrategy
Description copied from interface:AuditableComponent
Returns client-side audit strategy instance.- Specified by:
getClientAuditStrategy
in interfaceAuditableComponent<AuditDatasetType extends FhirAuditDataset>
- Returns:
- client-side audit strategy instance
-
getInteractionId
-
setFhirInteractionId
Sets the FHIR interactionID.- Parameters:
fhirInteractionId
- interactionID
-