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
,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-mina endpoint which provides support for IHE PIX/PDQ-related extensions.- Author:
- Dmytro Rud
-
-
Constructor Summary
Constructors Constructor Description MllpEndpoint(ComponentType mllpComponent, org.apache.camel.component.mina.MinaEndpoint wrappedEndpoint, ConfigType config)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureProperties(Map options)
org.apache.camel.Exchange
createExchange()
org.apache.camel.Exchange
createExchange(org.apache.camel.ExchangePattern pattern)
org.apache.camel.PollingConsumer
createPollingConsumer()
org.apache.camel.Consumer
doCreateConsumer(org.apache.camel.Processor processor)
Returns the original starting point of the camel-mina route which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createConsumer(Processor)
.org.apache.camel.Producer
doCreateProducer()
Returns the original camel-mina producer which will be wrapped into a set of PIX/PDQ-specific interceptors inEndpoint.createProducer()
.boolean
equals(Object object)
org.apache.camel.CamelContext
getCamelContext()
String
getCharsetName()
ClientAuthType
getClientAuthType()
String
getClientAuthTypeClass()
org.apache.camel.Component
getComponent()
String
getComponentType()
protected ConfigType
getConfig()
org.apache.camel.component.mina.MinaConfiguration
getConfiguration()
List<InterceptorFactory>
getCustomInterceptorFactories()
String[]
getCustomInterceptorFactoryList()
ConsumerDispatchingInterceptor
getDispatcher()
String
getEndpointKey()
String
getEndpointUri()
org.apache.camel.ExchangePattern
getExchangePattern()
Hl7v2TransactionConfiguration<AuditDatasetType>
getHl7v2TransactionConfiguration()
Returns transaction configuration.String
getHost()
Hl7v2InteractionId<AuditDatasetType>
getInteractionId()
ComponentType
getInterceptableComponent()
ConfigType
getInterceptableConfiguration()
String[]
getIoFilters()
protected ComponentType
getMllpComponent()
NakFactory<AuditDatasetType>
getNakFactory()
Returns transaction-specific ACK and NAK factory.int
getPort()
int
getSegmentFragmentationThreshold()
Returns threshold for segment fragmentation.String[]
getSslCiphers()
SSLContext
getSslContext()
String[]
getSslProtocols()
long
getTimeout()
protected org.apache.camel.component.mina.MinaEndpoint
getWrappedEndpoint()
int
hashCode()
boolean
isLenientProperties()
boolean
isSingleton()
boolean
isSslSecure()
boolean
isSupportSegmentFragmentation()
Returnstrue
if this endpoint supports segment fragmentation.void
setCamelContext(org.apache.camel.CamelContext camelContext)
void
setEndpointUriIfNotSpecified(String value)
void
setExchangePattern(org.apache.camel.ExchangePattern exchangePattern)
String
toString()
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configurePollingConsumer, createAsyncProducer, createEndpointUri, doInit, doStart, doStop, getExceptionHandler, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setComponent, setEndpointUri, setExceptionHandler, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous
-
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
createAsyncProducer, getEndpointBaseUri, isSingletonProducer
-
Methods inherited from interface org.openehealth.ipf.platform.camel.ihe.core.InterceptableEndpoint
createConsumer, createInitialConsumerInterceptorChain, createInitialProducerInterceptorChain, createProducer, getCustomInterceptors
-
-
-
-
Constructor Detail
-
MllpEndpoint
public MllpEndpoint(ComponentType mllpComponent, org.apache.camel.component.mina.MinaEndpoint wrappedEndpoint, ConfigType config)
Constructor.- Parameters:
mllpComponent
- MLLP Component instance which is creating this endpoint.wrappedEndpoint
- The original camel-mina endpoint instance.config
- Configuration parameters.
-
-
Method Detail
-
getInterceptableComponent
public ComponentType getInterceptableComponent()
- Specified by:
getInterceptableComponent
in interfaceInterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset>
- Returns:
- the component for this endpoint
-
getInterceptableConfiguration
public ConfigType getInterceptableConfiguration()
- Specified by:
getInterceptableConfiguration
in interfaceInterceptableEndpoint<ConfigType extends MllpEndpointConfiguration,AuditDatasetType extends MllpAuditDataset>
- Returns:
- the configuration for this endpoint
-
doCreateProducer
public org.apache.camel.Producer doCreateProducer() throws Exception
Returns the original camel-mina 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
public org.apache.camel.Consumer doCreateConsumer(org.apache.camel.Processor processor) throws Exception
Returns the original starting point of the camel-mina 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
public Hl7v2TransactionConfiguration<AuditDatasetType> getHl7v2TransactionConfiguration()
Returns transaction configuration.- Specified by:
getHl7v2TransactionConfiguration
in interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
getNakFactory
public NakFactory<AuditDatasetType> getNakFactory()
Returns transaction-specific ACK and NAK factory.- Specified by:
getNakFactory
in interfaceHl7v2ConfigurationHolder<ConfigType extends MllpEndpointConfiguration>
-
getInteractionId
public Hl7v2InteractionId<AuditDatasetType> 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.
-
getSslContext
public SSLContext getSslContext()
- Returns:
- the sslContext
-
getSslProtocols
@ManagedAttribute(description="Defined SSL Protocols") public String[] getSslProtocols()
- Returns:
- the sslProtocols
-
getSslCiphers
@ManagedAttribute(description="Defined SSL Ciphers") public String[] getSslCiphers()
- Returns:
- the sslCiphers
-
getComponentType
@ManagedAttribute(description="Component Type Name") public String getComponentType()
-
getHost
@ManagedAttribute(description="Mina Host") public String getHost()
-
getPort
@ManagedAttribute(description="Mina Port") public int getPort()
-
getCharsetName
@ManagedAttribute(description="Mina Character Set") public String getCharsetName()
-
getTimeout
@ManagedAttribute(description="Mina Timeout") public long getTimeout()
-
getIoFilters
@ManagedAttribute(description="Mina Filters") public String[] getIoFilters()
-
isSslSecure
@ManagedAttribute(description="SSL Secure Enabled") public boolean isSslSecure()
-
getClientAuthType
public ClientAuthType getClientAuthType()
- Returns:
- the client authentication type.
-
getClientAuthTypeClass
@ManagedAttribute(description="Client Authentication Type") public String getClientAuthTypeClass()
-
getCustomInterceptorFactories
public List<InterceptorFactory> getCustomInterceptorFactories()
- Returns:
- the customInterceptorFactories
-
getDispatcher
public ConsumerDispatchingInterceptor getDispatcher()
-
getCustomInterceptorFactoryList
@ManagedAttribute(description="Custom Interceptor Factories") public String[] getCustomInterceptorFactoryList()
- Returns:
- the customInterceptors as array of string names
-
configureProperties
public void configureProperties(Map options)
- Specified by:
configureProperties
in interfaceorg.apache.camel.Endpoint
- Overrides:
configureProperties
in classorg.apache.camel.support.DefaultEndpoint
-
createExchange
public org.apache.camel.Exchange createExchange()
- Specified by:
createExchange
in interfaceorg.apache.camel.Endpoint
- Overrides:
createExchange
in classorg.apache.camel.support.DefaultEndpoint
-
createExchange
public org.apache.camel.Exchange createExchange(org.apache.camel.ExchangePattern pattern)
- Specified by:
createExchange
in interfaceorg.apache.camel.Endpoint
- Overrides:
createExchange
in classorg.apache.camel.support.DefaultEndpoint
-
createPollingConsumer
public org.apache.camel.PollingConsumer createPollingConsumer() throws Exception
- Specified by:
createPollingConsumer
in interfaceorg.apache.camel.Endpoint
- Overrides:
createPollingConsumer
in classorg.apache.camel.support.DefaultEndpoint
- Throws:
Exception
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classorg.apache.camel.support.DefaultEndpoint
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
- Specified by:
getCamelContext
in interfaceorg.apache.camel.CamelContextAware
- Specified by:
getCamelContext
in interfaceorg.apache.camel.Endpoint
- Overrides:
getCamelContext
in classorg.apache.camel.support.DefaultEndpoint
-
getComponent
public org.apache.camel.Component getComponent()
- Overrides:
getComponent
in classorg.apache.camel.support.DefaultEndpoint
-
getConfiguration
public org.apache.camel.component.mina.MinaConfiguration getConfiguration()
-
getEndpointKey
public String getEndpointKey()
- Specified by:
getEndpointKey
in interfaceorg.apache.camel.Endpoint
- Overrides:
getEndpointKey
in classorg.apache.camel.support.DefaultEndpoint
-
getEndpointUri
public String getEndpointUri()
- Specified by:
getEndpointUri
in interfaceorg.apache.camel.Endpoint
- Overrides:
getEndpointUri
in classorg.apache.camel.support.DefaultEndpoint
-
getExchangePattern
public org.apache.camel.ExchangePattern getExchangePattern()
- 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 interfaceorg.apache.camel.Endpoint
- Overrides:
isLenientProperties
in classorg.apache.camel.support.DefaultEndpoint
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interfaceorg.apache.camel.IsSingleton
- Overrides:
isSingleton
in classorg.apache.camel.support.DefaultEndpoint
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
- Specified by:
setCamelContext
in interfaceorg.apache.camel.Endpoint
- Overrides:
setCamelContext
in classorg.apache.camel.support.DefaultEndpoint
-
setEndpointUriIfNotSpecified
public void setEndpointUriIfNotSpecified(String value)
- Overrides:
setEndpointUriIfNotSpecified
in classorg.apache.camel.support.DefaultEndpoint
-
setExchangePattern
public void setExchangePattern(org.apache.camel.ExchangePattern exchangePattern)
- Overrides:
setExchangePattern
in classorg.apache.camel.support.DefaultEndpoint
-
toString
public String toString()
- Overrides:
toString
in classorg.apache.camel.support.DefaultEndpoint
-
getConfig
protected ConfigType getConfig()
-
getMllpComponent
protected ComponentType getMllpComponent()
-
getWrappedEndpoint
protected org.apache.camel.component.mina.MinaEndpoint getWrappedEndpoint()
-
-