Interface Store

All Known Implementing Classes:
FileStore

public interface Store
This interface contains a method to create a Input or Output stream associated with a document in the system. Three types of storage are envisioned. First, a persistent store has an indefinite lifetime. A session store lasts for the duration of a matching session with the match-maker. A temporary store is a staging area (or perhaps a simple pipe) between two components running in different threads and most often assigned to different security zones. The constructors take two arguments identifying the session a desired storage location, and a document type. If the sessionid is zero, then it is ignored and only the location argument is used. The doctype is a string that is typically the file extension associated with the document. N.b. the classes that implement this interface should be implemented in a thread safe manner.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  Store.StoreType  
  • Method Summary

    Modifier and Type Method Description
    void clear​(int sessionid, java.lang.String store_location, java.lang.String doctype)
    Determine if a data store already exists.
    boolean exists​(int sessionid, java.lang.String store_location, java.lang.String doctype)
    Determine if a data store already exists
    java.io.InputStream InputStoreStream​(int sessionid, java.lang.String store_location, java.lang.String doctype)
    Stream access to data in a data store
    java.io.OutputStream OutputStoreStream​(int sessionid, java.lang.String store_location, java.lang.String doctype)
    A writer has access to data in a data store
  • Method Details

    • InputStoreStream

      java.io.InputStream InputStoreStream​(int sessionid, java.lang.String store_location, java.lang.String doctype) throws DocumentStoreNotFound
      Stream access to data in a data store
      Parameters:
      sessionid - The identity number of the session to which the data document belongs.
      store_location - A string identifying where the storage should be located.
      Returns:
      An object conforming to the Reader interface in java.io
      Throws:
      DocumentStoreNotFound
    • exists

      boolean exists​(int sessionid, java.lang.String store_location, java.lang.String doctype)
      Determine if a data store already exists
      Parameters:
      sessionid - The identity number of the session to which the data document belongs.
      store_location - A string identifying where the storage should be located.
      Returns:
      true if the Store object exists and false otherwise.
    • clear

      void clear​(int sessionid, java.lang.String store_location, java.lang.String doctype) throws DocumentStoreNotFound
      Determine if a data store already exists. If it does, clear the content; otherwise, do nothing.
      Parameters:
      sessionid - The identity number of the session to which the data document belongs.
      store_location - A string identifying where the storage should be located.
      Throws:
      DocumentStoreNotFound
    • OutputStoreStream

      java.io.OutputStream OutputStoreStream​(int sessionid, java.lang.String store_location, java.lang.String doctype) throws DocumentStoreNotFound
      A writer has access to data in a data store
      Parameters:
      sessionid - The identity number of the session to which the data document belongs.
      store_location - A string identifying where the storage should be located.
      Returns:
      An object conforming to the Reader interface in java.io
      Throws:
      DocumentStoreNotFound