View Javadoc

1   /*
2    * Created on 19-Apr-2004
3    */
4   package ca.uhn.hl7v2.protocol.impl;
5   
6   import ca.uhn.hl7v2.HL7Exception;
7   import ca.uhn.hl7v2.protocol.SafeStorage;
8   import ca.uhn.hl7v2.protocol.Transportable;
9   
10  /**
11   * A non-functional implementation of <code>SafeStorage</code>.  This is 
12   * intended as a placeholder pending release of UHN's Simple Record Store
13   * project.   
14   * 
15   * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
16   * @version $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:26 $ by $Author: jamesagnew $
17   */
18  public class NullSafeStorage implements SafeStorage {
19  
20      /** 
21       * Does nothing. 
22       */
23      public void store(Transportable theMessage) throws HL7Exception {
24      }
25  
26      /** 
27       * Does nothing. 
28       */
29      public void discard(Transportable theMessage) throws HL7Exception {
30       }
31  
32      /** 
33       * Returns an empty array. 
34       */
35      public Transportable[] restore() throws HL7Exception {
36          return new Transportable[0];
37      }
38  
39  }