org.urhl7.spark
Class HL7MessageListenerListAdapter

java.lang.Object
  extended by org.urhl7.spark.HL7MessageListenerListAdapter
All Implemented Interfaces:
HL7MessageListener

public class HL7MessageListenerListAdapter
extends Object
implements HL7MessageListener

A simple adapter that will behave has a HL7MessageListener, receive the data, then allow you to access it in an List of HL7Structures.


Constructor Summary
HL7MessageListenerListAdapter()
           
 
Method Summary
 void clearList()
          Removes all elements from the list
 List<HL7Structure> getList()
          Retrieves the list that has been populated in this listener
 boolean messageReceived(HL7Structure message)
          Called whenever a message is parsed completely.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HL7MessageListenerListAdapter

public HL7MessageListenerListAdapter()
Method Detail

messageReceived

public boolean messageReceived(HL7Structure message)
Called whenever a message is parsed completely. This method adds the HL7Structure to an internal list that can be accessed when file parsing is complete, or periodically.

Specified by:
messageReceived in interface HL7MessageListener
Parameters:
message - the message recieved
Returns:
always returns true (as per general collection contract)

getList

public List<HL7Structure> getList()
Retrieves the list that has been populated in this listener

Returns:
the list

clearList

public void clearList()
Removes all elements from the list