Class MllpConfiguration

java.lang.Object
org.apache.camel.component.mllp.MllpConfiguration
All Implemented Interfaces:
Cloneable

@UriParams public class MllpConfiguration extends Object implements Cloneable
The MLLP Component configuration.
  • Constructor Details

    • MllpConfiguration

      public MllpConfiguration()
  • Method Details

    • copy

      public static void copy(MllpConfiguration source, MllpConfiguration target)
    • copy

      public MllpConfiguration copy()
    • copy

      public void copy(MllpConfiguration source)
    • isBridgeErrorHandler

      public boolean isBridgeErrorHandler()
    • setBridgeErrorHandler

      public void setBridgeErrorHandler(boolean bridgeErrorHandler)
      Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to receive incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. If disabled, the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions by logging them at WARN or ERROR level and ignored.
    • getExchangePattern

      public org.apache.camel.ExchangePattern getExchangePattern()
    • setExchangePattern

      public void setExchangePattern(org.apache.camel.ExchangePattern exchangePattern)
      Sets the exchange pattern when the consumer creates an exchange.
    • hasCharsetName

      public boolean hasCharsetName()
    • getCharsetName

      public String getCharsetName()
    • setCharsetName

      public void setCharsetName(String charsetName)
      Sets the default charset to use
    • hasBacklog

      public boolean hasBacklog()
    • getBacklog

      public Integer getBacklog()
    • setBacklog

      public void setBacklog(Integer backlog)
      The maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused.
    • getBindTimeout

      public int getBindTimeout()
    • setBindTimeout

      public void setBindTimeout(int bindTimeout)
      TCP Server Only - The number of milliseconds to retry binding to a server port
    • getBindRetryInterval

      public int getBindRetryInterval()
    • setBindRetryInterval

      public void setBindRetryInterval(int bindRetryInterval)
      TCP Server Only - The number of milliseconds to wait between bind attempts
    • getAcceptTimeout

      public int getAcceptTimeout()
    • isLenientBind

      public boolean isLenientBind()
    • setLenientBind

      public void setLenientBind(boolean lenientBind)
      TCP Server Only - Allow the endpoint to start before the TCP ServerSocket is bound. In some environments, it may be desirable to allow the endpoint to start before the TCP ServerSocket is bound.
      Parameters:
      lenientBind - if true, the ServerSocket will be bound asynchronously; otherwise the ServerSocket will be bound synchronously.
    • setAcceptTimeout

      public void setAcceptTimeout(int acceptTimeout)
      Timeout (in milliseconds) while waiting for a TCP connection

      TCP Server Only

      Parameters:
      acceptTimeout - timeout in milliseconds
    • getConnectTimeout

      public int getConnectTimeout()
    • setConnectTimeout

      public void setConnectTimeout(int connectTimeout)
      Timeout (in milliseconds) for establishing for a TCP connection

      TCP Client only

      Parameters:
      connectTimeout - timeout in milliseconds
    • getReceiveTimeout

      public int getReceiveTimeout()
    • setReceiveTimeout

      public void setReceiveTimeout(int receiveTimeout)
      The SO_TIMEOUT value (in milliseconds) used when waiting for the start of an MLLP frame
      Parameters:
      receiveTimeout - timeout in milliseconds
    • getMaxConcurrentConsumers

      public int getMaxConcurrentConsumers()
    • setMaxConcurrentConsumers

      public void setMaxConcurrentConsumers(int maxConcurrentConsumers)
      The maximum number of concurrent MLLP Consumer connections that will be allowed. If a new connection is received and the maximum is number are already established, the new connection will be reset immediately.
      Parameters:
      maxConcurrentConsumers - the maximum number of concurrent consumer connections allowed
    • hasIdleTimeout

      public boolean hasIdleTimeout()
    • getIdleTimeout

      public Integer getIdleTimeout()
    • setIdleTimeout

      public void setIdleTimeout(Integer idleTimeout)
      The approximate idle time allowed before the Client TCP Connection will be reset. A null value or a value less than or equal to zero will disable the idle timeout.
      Parameters:
      idleTimeout - timeout in milliseconds
    • getReadTimeout

      public int getReadTimeout()
    • setReadTimeout

      public void setReadTimeout(int readTimeout)
      The SO_TIMEOUT value (in milliseconds) used after the start of an MLLP frame has been received
      Parameters:
      readTimeout - timeout in milliseconds
    • hasKeepAlive

      public boolean hasKeepAlive()
    • getKeepAlive

      public Boolean getKeepAlive()
    • setKeepAlive

      public void setKeepAlive(Boolean keepAlive)
      Enable/disable the SO_KEEPALIVE socket option.
      Parameters:
      keepAlive - enable SO_KEEPALIVE when true; disable SO_KEEPALIVE when false; use system default when null
    • hasTcpNoDelay

      public boolean hasTcpNoDelay()
    • getTcpNoDelay

      public Boolean getTcpNoDelay()
    • setTcpNoDelay

      public void setTcpNoDelay(Boolean tcpNoDelay)
      Enable/disable the TCP_NODELAY socket option.
      Parameters:
      tcpNoDelay - enable TCP_NODELAY when true; disable TCP_NODELAY when false; use system default when null
    • hasReuseAddress

      public boolean hasReuseAddress()
    • getReuseAddress

      public Boolean getReuseAddress()
    • setReuseAddress

      public void setReuseAddress(Boolean reuseAddress)
      Enable/disable the SO_REUSEADDR socket option.
      Parameters:
      reuseAddress - enable SO_REUSEADDR when true; disable SO_REUSEADDR when false; use system default when null
    • hasReceiveBufferSize

      public boolean hasReceiveBufferSize()
    • getReceiveBufferSize

      public int getReceiveBufferSize()
    • setReceiveBufferSize

      public void setReceiveBufferSize(Integer receiveBufferSize)
      Sets the SO_RCVBUF option to the specified value (in bytes)
      Parameters:
      receiveBufferSize - the SO_RCVBUF option value. If null, the system default is used
    • hasSendBufferSize

      public boolean hasSendBufferSize()
    • getSendBufferSize

      public int getSendBufferSize()
    • setSendBufferSize

      public void setSendBufferSize(Integer sendBufferSize)
      Sets the SO_SNDBUF option to the specified value (in bytes)
      Parameters:
      sendBufferSize - the SO_SNDBUF option value. If null, the system default is used
    • isAutoAck

      public boolean isAutoAck()
    • setAutoAck

      public void setAutoAck(boolean autoAck)
      Enable/Disable the automatic generation of a MLLP Acknowledgement MLLP Consumers only
      Parameters:
      autoAck - enabled if true, otherwise disabled
    • isHl7Headers

      public boolean isHl7Headers()
    • getHl7Headers

      public boolean getHl7Headers()
    • setHl7Headers

      public void setHl7Headers(boolean hl7Headers)
      Enable/Disable the automatic generation of message headers from the HL7 Message MLLP Consumers only
      Parameters:
      hl7Headers - enabled if true, otherwise disabled
    • isRequireEndOfData

      public boolean isRequireEndOfData()
    • setRequireEndOfData

      public void setRequireEndOfData(boolean requireEndOfData)
      Enable/Disable strict compliance to the MLLP standard. The MLLP standard specifies [START_OF_BLOCK]hl7 payload[END_OF_BLOCK][END_OF_DATA], however, some systems do not send the final END_OF_DATA byte. This setting controls whether or not the final END_OF_DATA byte is required or optional.
      Parameters:
      requireEndOfData - the trailing END_OF_DATA byte is required if true; optional otherwise
    • isStringPayload

      public boolean isStringPayload()
    • setStringPayload

      public void setStringPayload(boolean stringPayload)
      Enable/Disable converting the payload to a String. If enabled, HL7 Payloads received from external systems will be validated converted to a String. If the charsetName property is set, that character set will be used for the conversion. If the charsetName property is not set, the value of MSH-18 will be used to determine th appropriate character set. If MSH-18 is not set, then the default ISO-8859-1 character set will be use.
      Parameters:
      stringPayload - enabled if true, otherwise disabled
    • isValidatePayload

      public boolean isValidatePayload()
    • setValidatePayload

      public void setValidatePayload(boolean validatePayload)
      Enable/Disable the validation of HL7 Payloads If enabled, HL7 Payloads received from external systems will be validated (see Hl7Util.generateInvalidPayloadExceptionMessage for details on the validation). If and invalid payload is detected, a MllpInvalidMessageException (for consumers) or a MllpInvalidAcknowledgementException will be thrown.
      Parameters:
      validatePayload - enabled if true, otherwise disabled
    • getIdleTimeoutStrategy

      public MllpIdleTimeoutStrategy getIdleTimeoutStrategy()
    • setIdleTimeoutStrategy

      public void setIdleTimeoutStrategy(MllpIdleTimeoutStrategy idleTimeoutStrategy)
      decide what action to take when idle timeout occurs. Possible values are : RESET: set SO_LINGER to 0 and reset the socket CLOSE: close the socket gracefully default is RESET.
      Parameters:
      idleTimeoutStrategy - the strategy to take if idle timeout occurs
    • getMinBufferSize

      public int getMinBufferSize()
    • setMinBufferSize

      public void setMinBufferSize(int minBufferSize)
      Minimum buffer size used when receiving or sending data over the wire.
    • getMaxBufferSize

      public int getMaxBufferSize()
      Maximum buffer size used when receiving or sending data over the wire.
    • setMaxBufferSize

      public void setMaxBufferSize(int maxBufferSize)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object