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
,CamelContextAware
,Endpoint
,IsSingleton
,Service
,ShutdownableService
,HasId
,StatefulService
,SuspendableService
,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 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
ConstructorDescriptionMllpEndpoint
(ComponentType mllpComponent, org.apache.camel.component.netty.NettyEndpoint wrappedEndpoint, ConfigType config) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureProperties
(Map options) createExchange
(ExchangePattern pattern) doCreateConsumer
(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)
.Returns the original camel-netty producer which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createProducer()
.boolean
protected ConfigType
org.apache.camel.component.netty.NettyConfiguration
String[]
Returns transaction configuration.getHost()
protected ComponentType
Returns transaction-specific ACK and NAK factory.int
getPort()
long
int
Returns threshold for segment fragmentation.long
protected org.apache.camel.component.netty.NettyEndpoint
int
hashCode()
boolean
boolean
boolean
Returnstrue
if this endpoint supports segment fragmentation.void
setCamelContext
(CamelContext camelContext) void
void
setExchangePattern
(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, setProperties
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.apache.camel.Endpoint
configureExchange, createAsyncProducer, getEndpointBaseUri, isSingletonProducer
Methods inherited from interface org.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint
createConsumer, createInitialConsumerInterceptorChain, createInitialProducerInterceptorChain, 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
-
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:
getInterceptableComponent
in interfaceInterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,
AuditDatasetType extends MllpAuditDataset> - Returns:
- the component for this endpoint
-
getInterceptableConfiguration
- Specified by:
getInterceptableConfiguration
in interfaceInterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,
AuditDatasetType extends MllpAuditDataset> - Returns:
- the configuration for this endpoint
-
doCreateProducer
Returns the original camel-netty producer which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createProducer()
.- Specified by:
doCreateProducer
in interfaceInterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,
AuditDatasetType extends MllpAuditDataset> - Returns:
- the actual producer without any interceptors configured
- Throws:
Exception
-
doCreateConsumer
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:
doCreateConsumer
in interfaceInterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,
AuditDatasetType extends MllpAuditDataset> - Parameters:
processor
- The original consumer processor.- Returns:
- the actual consumer without any interceptors configured
- Throws:
Exception
-
getHl7v2TransactionConfiguration
Returns transaction configuration.- Specified by:
getHl7v2TransactionConfiguration
in interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
getNakFactory
Returns transaction-specific ACK and NAK factory.- Specified by:
getNakFactory
in interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
getInteractionId
- Specified by:
getInteractionId
in interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
isSupportSegmentFragmentation
@ManagedAttribute(description="Support Segment Fragmentation Enabled") public boolean isSupportSegmentFragmentation()Returnstrue
if 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
- Returns:
- the customInterceptorFactories
-
getDispatcher
-
getCustomInterceptorFactoryList
@ManagedAttribute(description="Custom Interceptor Factories") public String[] getCustomInterceptorFactoryList()- Returns:
- the customInterceptors as array of string names
-
configureProperties
- Specified by:
configureProperties
in interfaceEndpoint
- Overrides:
configureProperties
in classorg.apache.camel.support.DefaultEndpoint
-
createExchange
- Specified by:
createExchange
in interfaceEndpoint
- Overrides:
createExchange
in classorg.apache.camel.support.DefaultEndpoint
-
createExchange
- Specified by:
createExchange
in interfaceEndpoint
- Overrides:
createExchange
in classorg.apache.camel.support.DefaultEndpoint
-
createPollingConsumer
- Specified by:
createPollingConsumer
in interfaceEndpoint
- Overrides:
createPollingConsumer
in classorg.apache.camel.support.DefaultEndpoint
- Throws:
Exception
-
equals
- Overrides:
equals
in classorg.apache.camel.support.DefaultEndpoint
-
getCamelContext
- Specified by:
getCamelContext
in interfaceCamelContextAware
- Specified by:
getCamelContext
in interfaceEndpoint
- Overrides:
getCamelContext
in classorg.apache.camel.support.DefaultEndpoint
-
getComponent
- Overrides:
getComponent
in classorg.apache.camel.support.DefaultEndpoint
-
getConfiguration
public org.apache.camel.component.netty.NettyConfiguration getConfiguration() -
getEndpointKey
- Specified by:
getEndpointKey
in interfaceEndpoint
- Overrides:
getEndpointKey
in classorg.apache.camel.support.DefaultEndpoint
-
getEndpointUri
- Specified by:
getEndpointUri
in interfaceEndpoint
- Overrides:
getEndpointUri
in classorg.apache.camel.support.DefaultEndpoint
-
getExchangePattern
- Specified by:
getExchangePattern
in interfaceEndpoint
- Overrides:
getExchangePattern
in classorg.apache.camel.support.DefaultEndpoint
-
hashCode
public int hashCode()- Overrides:
hashCode
in classorg.apache.camel.support.DefaultEndpoint
-
isLenientProperties
public boolean isLenientProperties()- Specified by:
isLenientProperties
in interfaceEndpoint
- Overrides:
isLenientProperties
in classorg.apache.camel.support.DefaultEndpoint
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceIsSingleton
- Overrides:
isSingleton
in classorg.apache.camel.support.DefaultEndpoint
-
setCamelContext
- Specified by:
setCamelContext
in interfaceCamelContextAware
- Specified by:
setCamelContext
in interfaceEndpoint
- Overrides:
setCamelContext
in classorg.apache.camel.support.DefaultEndpoint
-
setEndpointUriIfNotSpecified
- Overrides:
setEndpointUriIfNotSpecified
in classorg.apache.camel.support.DefaultEndpoint
-
setExchangePattern
- Overrides:
setExchangePattern
in classorg.apache.camel.support.DefaultEndpoint
-
toString
- Overrides:
toString
in classorg.apache.camel.support.DefaultEndpoint
-
getConfig
-
getMllpComponent
-
getWrappedEndpoint
protected org.apache.camel.component.netty.NettyEndpoint getWrappedEndpoint()
-