Class MllpEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset,ComponentType extends MllpComponent<ConfigType,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.mllp.core.MllpEndpoint<ConfigType,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,org.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint<ConfigType,,ComponentType> Hl7v2ConfigurationHolder<AuditDatasetType>,HL7v2Endpoint<AuditDatasetType>
- Direct Known Subclasses:
MllpDispatchEndpoint,MllpTransactionEndpoint
@ManagedResource(description="Managed IPF MLLP ITI Endpoint")
public abstract class MllpEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset,ComponentType extends MllpComponent<ConfigType,AuditDatasetType>>
extends org.apache.camel.support.DefaultEndpoint
implements org.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint<ConfigType,ComponentType>, HL7v2Endpoint<AuditDatasetType>
A wrapper for standard camel-netty endpoint
which provides support for IHE PIX/PDQ-related extensions.
- Author:
- Dmytro Rud
-
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
ConstructorsConstructorDescriptionMllpEndpoint(ComponentType mllpComponent, org.apache.camel.component.netty.NettyEndpoint wrappedEndpoint, ConfigType config) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureProperties(Map options) org.apache.camel.Exchangeorg.apache.camel.ExchangecreateExchange(org.apache.camel.ExchangePattern pattern) org.apache.camel.PollingConsumerorg.apache.camel.ConsumerdoCreateConsumer(org.apache.camel.Processor processor) Returns the original starting point of the camel-netty route which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createConsumer(Processor).org.apache.camel.ProducerReturns the original camel-netty producer which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createProducer().booleanorg.apache.camel.CamelContextorg.apache.camel.Componentprotected ConfigTypeorg.apache.camel.component.netty.NettyConfigurationList<org.openehealth.ipf.platform.camel.ihe.core.InterceptorFactory>String[]org.apache.camel.ExchangePatternReturns transaction configuration.getHost()protected ComponentTypeReturns transaction-specific ACK and NAK factory.intgetPort()longintReturns threshold for segment fragmentation.longprotected org.apache.camel.component.netty.NettyEndpointinthashCode()booleanbooleanbooleanReturnstrueif this endpoint supports segment fragmentation.voidsetCamelContext(org.apache.camel.CamelContext camelContext) voidvoidsetExchangePattern(org.apache.camel.ExchangePattern exchangePattern) toString()Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, doInit, doStart, doStop, getExceptionHandler, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, setAutowiredEnabled, setBridgeErrorHandler, setComponent, setEndpointUri, setExceptionHandler, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setPropertiesMethods 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, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.Endpoint
configureExchange, createAsyncProducer, getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint
createConsumer, createInitialConsumerInterceptorChain, createInitialProducerInterceptorChain, createProducer, getCustomInterceptorsMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods 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
-
MllpEndpoint
public MllpEndpoint(ComponentType mllpComponent, org.apache.camel.component.netty.NettyEndpoint wrappedEndpoint, ConfigType config) Constructor.- Parameters:
mllpComponent- MLLP Component instance which is creating this endpoint.wrappedEndpoint- The original camel-netty endpoint instance.config- Configuration parameters.
-
-
Method Details
-
getInterceptableComponent
- Specified by:
getInterceptableComponentin interfaceorg.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset>
-
getInterceptableConfiguration
- Specified by:
getInterceptableConfigurationin interfaceorg.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset>
-
doCreateProducer
Returns the original camel-netty producer which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createProducer().- Specified by:
doCreateProducerin interfaceorg.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset> - Throws:
Exception
-
doCreateConsumer
public org.apache.camel.Consumer doCreateConsumer(org.apache.camel.Processor processor) throws Exception Returns the original starting point of the camel-netty route which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createConsumer(Processor).- Specified by:
doCreateConsumerin interfaceorg.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset> - Parameters:
processor- The original consumer processor.- Throws:
Exception
-
getHl7v2TransactionConfiguration
Returns transaction configuration.- Specified by:
getHl7v2TransactionConfigurationin interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
getNakFactory
Returns transaction-specific ACK and NAK factory.- Specified by:
getNakFactoryin interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
getInteractionId
- Specified by:
getInteractionIdin interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
isSupportSegmentFragmentation
@ManagedAttribute(description="Support Segment Fragmentation Enabled") public boolean isSupportSegmentFragmentation()Returnstrueif this endpoint supports segment fragmentation. -
getSegmentFragmentationThreshold
@ManagedAttribute(description="Segment Fragmentation Threshold") public int getSegmentFragmentationThreshold()Returns threshold for segment fragmentation. -
getComponentType
-
getHost
-
getPort
@ManagedAttribute(description="Netty Port") public int getPort() -
getCharsetName
-
getRequestTimeout
@ManagedAttribute(description="Netty Request Timeout") public long getRequestTimeout() -
getTimeout
@ManagedAttribute(description="Netty Request Timeout") public long getTimeout() -
getCustomInterceptorFactories
public List<org.openehealth.ipf.platform.camel.ihe.core.InterceptorFactory> getCustomInterceptorFactories()- Returns:
- the customInterceptorFactories
-
getDispatcher
-
getCustomInterceptorFactoryList
@ManagedAttribute(description="Custom Interceptor Factories") public String[] getCustomInterceptorFactoryList()- Returns:
- the customInterceptors as array of string names
-
configureProperties
- Specified by:
configurePropertiesin interfaceorg.apache.camel.Endpoint- Overrides:
configurePropertiesin classorg.apache.camel.support.DefaultEndpoint
-
createExchange
public org.apache.camel.Exchange createExchange()- Specified by:
createExchangein interfaceorg.apache.camel.Endpoint- Overrides:
createExchangein classorg.apache.camel.support.DefaultEndpoint
-
createExchange
public org.apache.camel.Exchange createExchange(org.apache.camel.ExchangePattern pattern) - Specified by:
createExchangein interfaceorg.apache.camel.Endpoint- Overrides:
createExchangein classorg.apache.camel.support.DefaultEndpoint
-
createPollingConsumer
- Specified by:
createPollingConsumerin interfaceorg.apache.camel.Endpoint- Overrides:
createPollingConsumerin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-
equals
- Overrides:
equalsin classorg.apache.camel.support.DefaultEndpoint
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContextin interfaceorg.apache.camel.CamelContextAware- Specified by:
getCamelContextin interfaceorg.apache.camel.Endpoint- Overrides:
getCamelContextin classorg.apache.camel.support.DefaultEndpoint
-
getComponent
public org.apache.camel.Component getComponent()- Overrides:
getComponentin classorg.apache.camel.support.DefaultEndpoint
-
getConfiguration
public org.apache.camel.component.netty.NettyConfiguration getConfiguration() -
getEndpointKey
- Specified by:
getEndpointKeyin interfaceorg.apache.camel.Endpoint- Overrides:
getEndpointKeyin classorg.apache.camel.support.DefaultEndpoint
-
getEndpointUri
- Specified by:
getEndpointUriin interfaceorg.apache.camel.Endpoint- Overrides:
getEndpointUriin classorg.apache.camel.support.DefaultEndpoint
-
getExchangePattern
public org.apache.camel.ExchangePattern getExchangePattern()- Specified by:
getExchangePatternin interfaceorg.apache.camel.Endpoint- Overrides:
getExchangePatternin classorg.apache.camel.support.DefaultEndpoint
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.apache.camel.support.DefaultEndpoint
-
isLenientProperties
public boolean isLenientProperties()- Specified by:
isLenientPropertiesin interfaceorg.apache.camel.Endpoint- Overrides:
isLenientPropertiesin classorg.apache.camel.support.DefaultEndpoint
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.apache.camel.IsSingleton- Overrides:
isSingletonin classorg.apache.camel.support.DefaultEndpoint
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware- Specified by:
setCamelContextin interfaceorg.apache.camel.Endpoint- Overrides:
setCamelContextin classorg.apache.camel.support.DefaultEndpoint
-
setEndpointUriIfNotSpecified
- Overrides:
setEndpointUriIfNotSpecifiedin classorg.apache.camel.support.DefaultEndpoint
-
setExchangePattern
public void setExchangePattern(org.apache.camel.ExchangePattern exchangePattern) - Overrides:
setExchangePatternin classorg.apache.camel.support.DefaultEndpoint
-
toString
- Overrides:
toStringin classorg.apache.camel.support.DefaultEndpoint
-
getConfig
-
getMllpComponent
-
getWrappedEndpoint
protected org.apache.camel.component.netty.NettyEndpoint getWrappedEndpoint()
-