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.thinger.kernel
Class ResourceCoordinator

    java.lang.Object
      things.thinger.kernel.ResourceCoordinator

    public class ResourceCoordinator

extends java.lang.Object

A resource coordinator. This is mostly a helper for the Kernel. This is where use of IDs went bad in this project. It would have taken a lot of work to fully abstract id operations, so we pretty much just use string representations.

Version:
  1.0

  Version History

      EPG - Initial - 12 FEB 06

Author:
  Erich P. Gatejen

Constructor Summary
`ResourceCoordinator(WhoAmI id)` Constructor.

Method Summary
`ResourceManager` | `getResource(java.lang.String name)` Get a resource by name.
`ResourceManager` | `getResource(WhoAmI id)` Get a resource by ID.
`boolean` | `isRegistered(java.lang.String name)` Check to see if the resource is registered.
`boolean` | `isRegistered(WhoAmI id)` Check to see if the resource is registered.
`ResourceManager` | `registerResource(ResourceInterface aResource, java.lang.String name)` Register a resource.

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

Constructor Detail

### ResourceCoordinator

    public ResourceCoordinator(WhoAmI id)
                        throws SystemException

  Constructor. Create the coordinator.

  Parameters:
    `id` - The ID of the ResourceCoordinator.
  Throws:
    `SystemException`
  See Also:
    `WhoAmI`

Method Detail

### registerResource

    public ResourceManager registerResource(ResourceInterface aResource,
                                            java.lang.String name)
                                     throws SystemException

  Register a resource. It will throw an exception for any error, including a duplicate registration.

  Parameters:
    `aResource` - The resource to register.
    `name` - The name of the resource. This can be unique to this registration.
  Returns:
    te resource manager.
  Throws:
    `SystemException`
  See Also:
    `WhoAmI`

### getResource

    public ResourceManager getResource(WhoAmI id)
                                throws SystemException

  Get a resource by ID.

  Parameters:
    `id` - The WhoAmI ID of the resource.
  Returns:
    the ResourceManager for the resouce.
  Throws:
    `SystemException`
  See Also:
    `ResourceManager`

### getResource

    public ResourceManager getResource(java.lang.String name)
                                throws SystemException

  Get a resource by name.

  Parameters:
    `name` - The name of the resource. This should be the name used to register it and not a WhoAmI string.
  Returns:
    the ResourceManager for the resouce.
  Throws:
    `SystemException`
  See Also:
    `ResourceManager`

### isRegistered

    public boolean isRegistered(WhoAmI id)
                         throws SystemException

  Check to see if the resource is registered.

  Parameters:
    `id` - The WhoAmI ID of the resource. This is the ID provided by the coordinator in the ResourceManager.
  Returns:
    true if it is registered, otherwise false.
  Throws:
    `SystemException`

### isRegistered

    public boolean isRegistered(java.lang.String name)
                         throws SystemException

  Check to see if the resource is registered. Use the name.

  Parameters:
    `name` - The name of the resource. This should be the name used to register it and not a WhoAmI string.
  Returns:
    true if it is registered, otherwise false.
  Throws:
    `SystemException`

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.