com.merge.HL7
Class HL7TransmitterConfiguration

java.lang.Object
  extended by com.merge.HL7.HL7SocketConfiguration
      extended by com.merge.HL7.HL7TransmitterConfiguration

public class HL7TransmitterConfiguration
extends HL7SocketConfiguration

Represents the configuration of a message transmitter service.

The fields of this class are initialized either from a configuration file, from a Properties object, from values directly passed to the constructors or from the toolkit properties.

Additionally to the base classes properties, the following properties are recognized:

See Also:
HL7Receiver

Field Summary
static int ACK
          This field represents the minimal level of acknowledgment checking in which, following transmittal, no checking of the message received is done.
 int ackLevel
          This field indicates the level of acknowledgment checking.
static int CODE
          This field represents a level of acknowledgment checking in which the Acknowledgment Code (MSA.1) indicates success according to whether the Accept Acknowledgment Type (MSH.15) was transmitted or not.
 int connectTimeout
          This field contains the connection timeout value in seconds.
static int CONTROL_ID
          This field represents the highest level of acknowledgment checking in which the Message Control ID in the MSA segment is checked against the MSH segment of the transmitted message.
 boolean keepOpen
          This field indicates whether to keep the connection alive after a message has been transmitted successfully.
 int retryInterval
          This field specifies the time interval, in seconds, between retries of a failed transmission.
 int retryTimes
          This field indicates how many times to re-try a failed transmission.
 
Fields inherited from class com.merge.HL7.HL7SocketConfiguration
autoSenseInterval, autoSenseReceiveEndSequence, characterEncoding, formatter, hostName, portNumber, receiveEndSequence, receiveTimeout, sendPacingInterval, sendTimeout, transmitEndSequence, transmitStartSequence
 
Constructor Summary
HL7TransmitterConfiguration(java.util.Properties props)
          Initializes a new transmitter configuration instance using values read from a Properties object.
HL7TransmitterConfiguration(java.lang.String configFile)
          Initializes a new transmitter configuration instance using values read from a configuration file.
HL7TransmitterConfiguration(java.lang.String hostName, int port)
          Initializes a new transmitter configuration instance for sending messages to the receiver at the specified host name and port number.
 
Method Summary
 java.lang.String toString()
          Provides the string representation of this transmitter configuration containing the value of all fields.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACK

public static final int ACK
This field represents the minimal level of acknowledgment checking in which, following transmittal, no checking of the message received is done.

See Also:
Constant Field Values

CODE

public static final int CODE
This field represents a level of acknowledgment checking in which the Acknowledgment Code (MSA.1) indicates success according to whether the Accept Acknowledgment Type (MSH.15) was transmitted or not.

See Also:
Constant Field Values

CONTROL_ID

public static final int CONTROL_ID
This field represents the highest level of acknowledgment checking in which the Message Control ID in the MSA segment is checked against the MSH segment of the transmitted message.

See Also:
Constant Field Values

keepOpen

public final boolean keepOpen
This field indicates whether to keep the connection alive after a message has been transmitted successfully. The default behavior is to keep the connection alive.


retryTimes

public final int retryTimes
This field indicates how many times to re-try a failed transmission. A value of zero indicates that the transmitter will not retry failed transmissions. A negative value indicates that the transmitter will retry failed transmissions forever. The default value of this field is 1 meaning that the transmitter will try to send a message for maximum two times.


retryInterval

public final int retryInterval
This field specifies the time interval, in seconds, between retries of a failed transmission. The default retry interval is one minute.


ackLevel

public final int ackLevel
This field indicates the level of acknowledgment checking. The value of this field is defined by one of the following constants in this class: ACK, CODE and CONTROL_ID. When initializing this value through a properties object the value of the TRANSMIT_ACK_LEVEL setting should be "ACK", "CODE" or "CONTROL_ID". The default acknowledgment checking is CONTROL_ID.


connectTimeout

public final int connectTimeout
This field contains the connection timeout value in seconds. If the transmitter can not establish a connection in the specified number of seconds it aborts the connection attempt. The default connection timeout is 30 seconds.

Constructor Detail

HL7TransmitterConfiguration

public HL7TransmitterConfiguration(java.lang.String hostName,
                                   int port)
Initializes a new transmitter configuration instance for sending messages to the receiver at the specified host name and port number. Other values are read from the toolkit properties. If a value is not specified in the toolkit properties, the default value is used instead.

Parameters:
hostName - The host name or IP address of the receiver.
port - the port number of the receiver.

HL7TransmitterConfiguration

public HL7TransmitterConfiguration(java.lang.String configFile)
Initializes a new transmitter configuration instance using values read from a configuration file. The configuration file is in the format required by the Properties class. Values that are not specified in the configuration file are read from the toolkit properties or if missing from the toolkit properties the default values are used.

See the class description for a list of property names.

Parameters:
configFile - The path to the configuration file.

HL7TransmitterConfiguration

public HL7TransmitterConfiguration(java.util.Properties props)
Initializes a new transmitter configuration instance using values read from a Properties object. Values that are not specified in the provided Properties object are read from the toolkit properties or if missing from the toolkit properties the default values are used.

See the class description for a list of property names.

Parameters:
props - A Properties object containing receiver configuration values.
Method Detail

toString

public java.lang.String toString()
Provides the string representation of this transmitter configuration containing the value of all fields.

Overrides:
toString in class HL7SocketConfiguration
Returns:
A string representation of this HL7SocketConfiguration.

Copyright © 2009 Merge Healthcare Inc. All Rights Reserved.