Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## things.universe.server
Class UniverseRegistry_Simple

    java.lang.Object
      things.universe.server.UniverseRegistry_Simple

All Implemented Interfaces:
  Verbose, UniverseRegistry

    public class UniverseRegistry_Simple

extends java.lang.Object
implements UniverseRegistry

A simple universe registry. It'll manage a properties based registry. The configuration will snapshot'd when the registry starts. It will never save.

REGISTRY DATA for ALL:
CONFIG_LIST list=u1,u2 List of names. Names may not have whitespace.
CONFIG_ROOT root=u1

REGISTRY DATA for UNIVERSE_LOCAL:
u1.id=
u1.type=local
u1.path=

Version:
  1.0

  Version History

      EPG - Initial - 18 MAY 04

Author:
  Erich P. Gatejen

Field Summary

Fields inherited from interface things.universe.UniverseRegistry
`UNIVERSE_INVALID, UNIVERSE_LOCAL, UNIVERSE_LOCAL_name`

Constructor Summary
`UniverseRegistry_Simple()`

Method Summary
`Universe` | `getAccessor(java.lang.String name)` Get an accessor to a universe by local name.
`Universe` | `getAccessor(UniverseID theUniverse)` Manufacture an accessor to a universe.
`Clearance` | `getClearance(java.lang.String name)` Get an clearance for a universe by localName
`Clearance` | `getClearance(UniverseID theUniverse)` Get an clearance for a universe by id.
`boolean` | `isVerbose()` Is it set to verbose?
`void` | `loadRegistry(ThingsPropertyView config)` Load a registry from a configuration node.
`void` | `register(int type, ThingsPropertyView config)` Register a universe.
`void` | `safetyTheRegistry()` Safety the Registry.
`void` | `screech(java.lang.String message)` Post a verbose message if verbose mode is on.
`void` | `verboseOff()` Turn it off
`void` | `verboseOn(StringPoster poster)` Turn on.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UniverseRegistry_Simple

    public UniverseRegistry_Simple()

Method Detail

### getAccessor

    public Universe getAccessor(UniverseID theUniverse)
                         throws UniverseException

  Manufacture an accessor to a universe.

  Specified by:
    `getAccessor` in interface `UniverseRegistry`
  Parameters:
    `theUniverse` - ID for the universe to access
  Returns:
    a Universe or null if the universe doesn't exist ( or isn't loaded ).
  Throws:
    `UniverseException`

### getAccessor

    public Universe getAccessor(java.lang.String name)
                         throws UniverseException

  Get an accessor to a universe by local name.

  Specified by:
    `getAccessor` in interface `UniverseRegistry`
  Parameters:
    `name` - the name
  Returns:
    a Universe or null if the universe doesn't exist ( or isn't loaded ).
  Throws:
    `UniverseException`

### getClearance

    public Clearance getClearance(UniverseID theUniverse)
                           throws UniverseException

  Get an clearance for a universe by id.

  Specified by:
    `getClearance` in interface `UniverseRegistry`
  Parameters:
    `theUniverse` - ID for the universe to access
  Returns:
    a Universe or null if the universe doesn't exist ( or isn't loaded ).
  Throws:
    `UniverseException`

### getClearance

    public Clearance getClearance(java.lang.String name)
                           throws UniverseException

  Get an clearance for a universe by localName

  Specified by:
    `getClearance` in interface `UniverseRegistry`
  Parameters:
    `name` - the local name
  Returns:
    a Universe or null if the universe doesn't exist ( or isn't loaded ).
  Throws:
    `UniverseException`

### register

    public void register(int type,
                         ThingsPropertyView config)
                  throws UniverseException

  Register a universe.

  Specified by:
    `register` in interface `UniverseRegistry`
  Parameters:
    `type` - numeric as specific in this class
    `config` - information
  Throws:
    `UniverseException`

### loadRegistry

    public void loadRegistry(ThingsPropertyView config)
                      throws UniverseException

  Load a registry from a configuration node. See documentation above for expected properties.

  Specified by:
    `loadRegistry` in interface `UniverseRegistry`
  Parameters:
    `config` - a configuration node
  Throws:
    `UniverseException`
  See Also:
    `ThingsPropertyView`

### safetyTheRegistry

    public void safetyTheRegistry()
                           throws UniverseException

  Safety the Registry. If the confiration node supports it, the registry will be checkpointed and/or saved. This effectively sets the last known good configuration.

  Specified by:
    `safetyTheRegistry` in interface `UniverseRegistry`
  Throws:
    `UniverseException`

### verboseOn

    public void verboseOn(StringPoster poster)
                   throws ThingsException

  Turn on. It will test the poster and will throw a ThingsException if it has a problem.

  Specified by:
    `verboseOn` in interface `Verbose`
  Parameters:
    `poster` - StringPoster where to put the debug info
  Throws:
    `ThingsException`

### verboseOff

    public void verboseOff()

  Turn it off

  Specified by:
    `verboseOff` in interface `Verbose`

### screech

    public void screech(java.lang.String message)

  Post a verbose message if verbose mode is on. It will never throw an exception. The implementation may find a way to report exceptions.

  Specified by:
    `screech` in interface `Verbose`
  Parameters:
    `message` - The message.

### isVerbose

    public boolean isVerbose()

  Is it set to verbose?

  Specified by:
    `isVerbose` in interface `Verbose`
  Returns:
    true if it is verbose, otherwise false.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Things.