edu.iris.Fissures.seed.mock
Class MockBEADImport

java.lang.Object
  extended by edu.iris.Fissures.seed.mock.MockBEADImport

public class MockBEADImport
extends java.lang.Object

Mock application to simulate BEAD (blockette string) formatted input to a container entity from an external tool. The BEAD format is the tentative name for the delimited string representation for SEED blockettes supported by JavaSeed. This is theorized as an effective means of decoupled tool interchange and data persistence.

Version:
01/02/09
Author:
Robert Casey, IRIS DMC

Method Summary
static void close()
          Signal the import consumer thread that we have completed our import of blockette strings.
static MockBEADImport getInstance()
          Generate and return a singleton instance of this class.
static void importFrom(java.io.InputStream inStream)
          Trigger import of blockette strings from the indicated input stream.
static void importFrom(java.lang.String fileName)
          Trigger import of blockette strings from the indicated file.
static void main(java.lang.String[] args)
          Just display a usage message here.
static void push(java.lang.String BEADstr)
          Push a single blockette string to the import consumer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MockBEADImport getInstance()
Generate and return a singleton instance of this class. Future calls will return the already present instance.

Returns:
a singleton intance of this class.

importFrom

public static void importFrom(java.lang.String fileName)
Trigger import of blockette strings from the indicated file.

Parameters:
fileName - the file containing blockette strings.

importFrom

public static void importFrom(java.io.InputStream inStream)
Trigger import of blockette strings from the indicated input stream.

Parameters:
inStream - an instance of InputStream providing blockette strings.

push

public static void push(java.lang.String BEADstr)
                 throws SeedException
Push a single blockette string to the import consumer.

Parameters:
BEADstr - a single blockette string
Throws:
SeedException

close

public static void close()
                  throws java.io.IOException,
                         SeedException
Signal the import consumer thread that we have completed our import of blockette strings. To close the queue means to accept no new additions to the queue until it has been flushed of all entries. The consumer thread will reopen the queue when it finds it to be empty.

Throws:
java.io.IOException
SeedException

main

public static void main(java.lang.String[] args)
Just display a usage message here.