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,HasCamelContext,StatefulService,SuspendableService,AuditableComponent<AuditDatasetType>,InterceptableComponent
- Direct Known Subclasses:
ChPpq3Component,ChPpq4Component,ChPpq5Component,CustomFhirComponent,FhirComponentWithOptions,Iti105Component,Iti119Component,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
ConstructorsConstructorDescriptionFhirComponent(CamelContext context, FhirInteractionId<AuditDatasetType> fhirInteractionId) FhirComponent(FhirInteractionId<AuditDatasetType> fhirInteractionId) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(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 Endpointvoiddisconnect(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.booleanisCompatibleContext(FhirContext fhirContext) voidsetFhirInteractionId(FhirInteractionId<AuditDatasetType> fhirInteractionId) Sets the FHIR interactionID.Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, 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, validateURIMethods inherited from class org.apache.camel.support.service.BaseService
build, 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.CamelContextAware
setCamelContextMethods inherited from interface org.apache.camel.Component
createEndpoint, createEndpoint, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, isAutowiredEnabled, useRawUriMethods inherited from interface org.apache.camel.spi.HasCamelContext
getCamelContextMethods inherited from interface org.openehealth.ipf.platform.camel.ihe.core.InterceptableComponent
getAdditionalConsumerInterceptors, getAdditionalProducerInterceptorsMethods 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
-
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
Disconnects the URL specified on the endpoint from the specified processor.- Parameters:
consumer- the consumer
-
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:
createEndpointin 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:AuditableComponentReturns server-side audit strategy instance.- Specified by:
getServerAuditStrategyin interfaceAuditableComponent<AuditDatasetType extends FhirAuditDataset>- Returns:
- server-side audit strategy instance
-
getClientAuditStrategy
Description copied from interface:AuditableComponentReturns client-side audit strategy instance.- Specified by:
getClientAuditStrategyin interfaceAuditableComponent<AuditDatasetType extends FhirAuditDataset>- Returns:
- client-side audit strategy instance
-
getInteractionId
-
setFhirInteractionId
Sets the FHIR interactionID.- Parameters:
fhirInteractionId- interactionID
-