org.openhealthexchange.openpixpdq.ihe.impl_v2.hl7
Class HL7Channel

java.lang.Object
  extended by org.openhealthexchange.openpixpdq.ihe.impl_v2.hl7.HL7Channel

public class HL7Channel
extends java.lang.Object

This class represents a communication channel with an HL7 server.

Version:
2.0 - Nov 20, 2005
Author:
Jim Firby

Constructor Summary
HL7Channel(com.misyshealthcare.connect.net.IConnectionDescription connection)
          Creates a new HL7 communication channel to the server described in the connection description.
 
Method Summary
 void close()
          Closes any connections being held open by this channel
 boolean isOpen()
          Sees if this channel is holding open any connections.
 ca.uhn.hl7v2.model.Message sendMessage(ca.uhn.hl7v2.model.Message message)
          Sends an HL7 message over this channel to the server and return the response.
 ca.uhn.hl7v2.model.Message sendMessage(ca.uhn.hl7v2.model.Message message, boolean keepOpen)
          Sends an HL7 message over this channel to the server and return the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HL7Channel

public HL7Channel(com.misyshealthcare.connect.net.IConnectionDescription connection)
Creates a new HL7 communication channel to the server described in the connection description.

Parameters:
connection - the connection description
Method Detail

sendMessage

public ca.uhn.hl7v2.model.Message sendMessage(ca.uhn.hl7v2.model.Message message)
                                       throws java.io.IOException
Sends an HL7 message over this channel to the server and return the response.

Parameters:
message - the HL7 message to be sent
Returns:
the HL7 message that came back as a response
Throws:
java.io.IOException

sendMessage

public ca.uhn.hl7v2.model.Message sendMessage(ca.uhn.hl7v2.model.Message message,
                                              boolean keepOpen)
                                       throws java.io.IOException
Sends an HL7 message over this channel to the server and return the response.

Parameters:
message - the HL7 message to be sent
keepOpen - True if the connection used for this message should be kept open
Returns:
the HL7 message that came back as a response
Throws:
java.io.IOException - When there is a problem communicating with the server

close

public void close()
Closes any connections being held open by this channel


isOpen

public boolean isOpen()
Sees if this channel is holding open any connections.

Returns:
True if this channel holds an open connection