Package ca.uhn.hl7v2.protocol
Interface SafeStorage
- All Known Implementing Classes:
NullSafeStorage
public interface SafeStorage
Represents a persistent store for incoming messages. Messages
may be stored here before an accept ACK is returned. The local
side of the interface then takes on responsibility for delivering
the message to the application.
- Version:
- $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:38 $ by $Author: jamesagnew $
- Author:
- Bryan Tripp
-
Method Summary
Modifier and TypeMethodDescriptionvoiddiscard(Transportable theMessage) If the given message exists in the store, it is removed.restore()Returns all messages that have been stored.voidstore(Transportable theMessage) Stores a message so that it can be reliably retrieved and sent to the proper application, even if this service is restarted in the mean time.
-
Method Details
-
store
Stores a message so that it can be reliably retrieved and sent to the proper application, even if this service is restarted in the mean time.- Parameters:
theMessage- the message to store- Throws:
HL7Exception- if there is some problem accessing the store
-
discard
If the given message exists in the store, it is removed.- Parameters:
theMessage- the message to discard
-
restore
Transportable[] restore()Returns all messages that have been stored. The store retains a copy of each one until discard() is called. This method would be called after the HL7 server is restarted.- Returns:
- all messages in the store
-