Class MllpComponent<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset>
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultComponent
org.apache.camel.component.netty.NettyComponent
org.openehealth.ipf.platform.camel.ihe.mllp.core.MllpComponent<ConfigType,AuditDatasetType>
- All Implemented Interfaces:
AutoCloseable,CamelContextAware,Component,Service,ShutdownableService,HasCamelContext,SSLContextParametersAware,StatefulService,SuspendableService,InterceptableComponent,Hl7v2ConfigurationHolder<AuditDatasetType>
- Direct Known Subclasses:
MllpDispatchComponent,MllpTransactionComponent
public abstract class MllpComponent<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset>
extends org.apache.camel.component.netty.NettyComponent
implements InterceptableComponent, Hl7v2ConfigurationHolder<AuditDatasetType>
Generic Camel component for MLLP.
- Author:
- Dmytro Rud
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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
ConstructorsModifierConstructorDescriptionprotectedprotectedMllpComponent(CamelContext camelContext) Camel context-based constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ConfigTypecreateConfig(String uri, Map<String, Object> parameters) Creates a configuration object.protected EndpointCreates and configures the endpoint.protected abstract MllpEndpoint<?, ?, ?> createEndpoint(org.apache.camel.component.netty.NettyEndpoint wrappedEndpoint, ConfigType config) Creates an endpoint object.protected org.apache.camel.component.netty.NettyConfigurationparseConfiguration(org.apache.camel.component.netty.NettyConfiguration configuration, String remaining, Map<String, Object> parameters) Called when the NettyEndpoint is created.Methods inherited from class org.apache.camel.component.netty.NettyComponent
doStart, doStop, getConfiguration, getExecutorService, getMaximumPoolSize, isUseGlobalSslContextParameters, setConfiguration, setExecutorService, setMaximumPoolSize, setUseGlobalSslContextParametersMethods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, 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, 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, getExtension, getSupportedExtensions, isAutowiredEnabled, useRawUriMethods inherited from interface org.apache.camel.spi.HasCamelContext
getCamelContextMethods inherited from interface org.openehealth.ipf.platform.camel.ihe.hl7v2.Hl7v2ConfigurationHolder
getHl7v2TransactionConfiguration, getInteractionId, getNakFactoryMethods 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.SSLContextParametersAware
retrieveGlobalSslContextParametersMethods 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
-
ACK_TYPE_CODE_HEADER
- See Also:
-
DEFAULT_HL7_DECODER_FACTORY_BEAN_NAME
- See Also:
-
DEFAULT_HL7_ENCODER_FACTORY_BEAN_NAME
- See Also:
-
DEFAULT_HL7_CORRELATION_BEAN_NAME
- See Also:
-
-
Constructor Details
-
MllpComponent
protected MllpComponent() -
MllpComponent
Camel context-based constructor.- Parameters:
camelContext- camel context
-
-
Method Details
-
createConfig
protected abstract ConfigType createConfig(String uri, Map<String, Object> parameters) throws ExceptionCreates a configuration object.- Parameters:
uri- endpoint URIparameters- URL parameters.- Returns:
- configuration object filled with values from the provided parameter map.
- Throws:
Exception
-
createEndpoint
protected abstract MllpEndpoint<?,?, createEndpoint?> (org.apache.camel.component.netty.NettyEndpoint wrappedEndpoint, ConfigType config) Creates an endpoint object.- Parameters:
wrappedEndpoint- standard Camel Netty endpoint instance.config- endpoint configuration.- Returns:
- configured MLLP endpoint instance which wraps the Netty one.
-
parseConfiguration
protected org.apache.camel.component.netty.NettyConfiguration parseConfiguration(org.apache.camel.component.netty.NettyConfiguration configuration, String remaining, Map<String, Object> parameters) throws ExceptionCalled when the NettyEndpoint is created. We overwrite a few parameters.- Overrides:
parseConfigurationin classorg.apache.camel.component.netty.NettyComponent- Throws:
Exception
-
createEndpoint
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws ExceptionCreates and configures the endpoint.- Overrides:
createEndpointin classorg.apache.camel.component.netty.NettyComponent- Throws:
Exception
-
getEndpointPropertyConfigurer
- Specified by:
getEndpointPropertyConfigurerin interfaceComponent- Overrides:
getEndpointPropertyConfigurerin classorg.apache.camel.support.DefaultComponent
-