autohit.universe
Class UniverseFactory

java.lang.Object
  extended byautohit.universe.UniverseFactory

public class UniverseFactory
extends java.lang.Object

Universe factory. This builds universe services. All the functions are thread-safe, however it will not keep one thread from destroying another thread's universe. This is *NOT* a singleton. There are four types of universes: UNI_LOCAL Local file system UNI_MASTER NOT IMPLIMENTED! UNI_MIRROR NOT IMPLIMENTED! UNI_REMOTE NOT IMPLIMENTED! Regardless of what kind of universe, there must be a local property file that describes the universe. The factory will use it to build a server for that universe.

Version:
1.0 Version History EPG - New - 23Apr03
Author:
Erich P. Gatejen

Constructor Summary
UniverseFactory()
          Constructor.
 
Method Summary
 Universe create(java.lang.String handle, java.io.InputStream prop)
          Create a valid, working universe service
 Universe create(java.lang.String handle, java.lang.String prop)
          Create a valid, working universe service
 void destroy(java.lang.String name)
          Destroy a universe server
 boolean exists(java.lang.String name)
          Returns true if the named universe service exists.
 Universe reference(java.lang.String name)
          Get a reference to a valid, working universe service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniverseFactory

public UniverseFactory()
Constructor. Not a singleton, so build the services.

Method Detail

exists

public boolean exists(java.lang.String name)
               throws UniverseException
Returns true if the named universe service exists. It will only throw an Exception on a software detected fault.

Parameters:
name - universe name
Returns:
true if the universe service is valid
Throws:
UniverseException

reference

public Universe reference(java.lang.String name)
                   throws UniverseException
Get a reference to a valid, working universe service.

Parameters:
name - universe name
Returns:
reference to a universe service
Throws:
UniverseException

destroy

public void destroy(java.lang.String name)
             throws UniverseException
Destroy a universe server

Parameters:
name - universe name
Throws:
UniverseException

create

public Universe create(java.lang.String handle,
                       java.lang.String prop)
                throws UniverseException
Create a valid, working universe service

Parameters:
handle - handle to the universe. non-unique handle will overwrite a refernce to an existing universe service.
prop - a path to the local universe property file
Returns:
reference to a universe service
Throws:
UniverseException

create

public Universe create(java.lang.String handle,
                       java.io.InputStream prop)
                throws UniverseException
Create a valid, working universe service

Parameters:
handle - handle to the universe. non-unique handle will overwrite a refernce to an existing universe service.
prop - a path to the local universe property file
Returns:
reference to a universe service
Throws:
UniverseException


Test.