Class MllpConfiguration

  • All Implemented Interfaces:
    Cloneable

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

      • MllpConfiguration

        public MllpConfiguration()
    • Method Detail

      • 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.
        Parameters:
        bridgeErrorHandler -
      • 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.
        Parameters:
        exchangePattern -
      • isSynchronous

        public boolean isSynchronous()
      • setSynchronous

        public void setSynchronous​(boolean synchronous)
        Sets whether synchronous processing should be strictly used (this component only supports synchronous operations).
        Parameters:
        synchronous -
      • hasCharsetName

        public boolean hasCharsetName()
      • getCharsetName

        public String getCharsetName()
      • getCharset

        public Charset getCharset()
      • getCharset

        public Charset getCharset​(org.apache.camel.Exchange exchange)
      • getCharset

        public Charset getCharset​(org.apache.camel.Exchange exchange,
                                  byte[] hl7Bytes)
      • setCharsetName

        public void setCharsetName​(String charsetName)
        Set the CamelCharsetName property on the exchange
        Parameters:
        charsetName - the charset
      • 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
      • hasMaxReceiveTimeouts

        @Deprecated
        public boolean hasMaxReceiveTimeouts()
        Deprecated.
        Use the idleTimeout URI parameter
        Determine if the maxReceiveTimeouts URI parameter has been set
        Returns:
        true if the parameter has been set; false otherwise
      • getMaxReceiveTimeouts

        @Deprecated
        public Integer getMaxReceiveTimeouts()
        Deprecated.
        Use the idleTimeout URI parameter
        Retrieve the value of the maxReceiveTimeouts URI parameter.
        Returns:
        the maximum number of receive timeouts before the TCP Socket is reset
      • setMaxReceiveTimeouts

        @Deprecated
        public void setMaxReceiveTimeouts​(Integer maxReceiveTimeouts)
        Deprecated.
        Use the idleTimeout URI parameter. For backward compibility, setting this parameter will result in an idle timeout of maxReceiveTimeouts * receiveTimeout. If idleTimeout is also specified, this parameter will be ignored.
        The maximum number of timeouts (specified by receiveTimeout) allowed before the TCP Connection will be reset.
        Parameters:
        maxReceiveTimeouts - maximum number of receiveTimeouts
      • 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
      • isBufferWrites

        public boolean isBufferWrites()
      • setBufferWrites

        @Deprecated
        public void setBufferWrites​(boolean bufferWrites)
        Deprecated.
        the parameter will be ignored
        Enable/Disable the buffering of HL7 payloads before writing to the socket.
        Parameters:
        bufferWrites - enabled if true, otherwise disabled
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object