Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## configuration
Interface ComponentConfigurator

All Known Implementing Classes:
  SimpleConfigurator

public abstract interface ComponentConfigurator

An interface for objects representing the dependencies among components. For more information on the ComponentConfigurator concept and ideas related to it, visit the ComponentConfigurator pages.

See Also:
  `DependencySpecification`

Method Summary
`void` | `addHook(java.lang.String hookName, DependencyAttributes attributes)` Adds a hook to the configurator.
`void` | `deleteHook(java.lang.String hookName)` Deletes a hook from the configurator.
`void` | `destroyComponentConfigurator()` Deletes the references to all internal data structures.
`void` | `eventOnClient(ComponentConfigurator client, ComponentEvent e)` This implementation simply prints the event to the standard output.
`void` | `eventOnHookedComponent(ComponentConfigurator hookedComponent, ComponentEvent e)` This implementation simply prints the event to the standard output.
`ComponentConfigurator` | `getHookedComponent(java.lang.String hookName)` Provides a reference to the component attached to the given hook.
`void` | `hook(java.lang.String hookName, ComponentConfigurator cc)` Attaches a ComponentConfigurator to the given hook.
`void` | `hook(java.lang.String hookName, ComponentConfigurator cc, DependencyAttributes attributes)` Attaches a ComponentConfigurator to the given hook changing the attributes associated with the hook.
`java.lang.Object` | `implementation()` Accessor for getting the component implementation.
`void` | `implementation(java.lang.Object implementation)` Sets the component implementation.
`java.lang.String` | `info()` Accessor for the component information string.
`void` | `info(java.lang.String s)` Sets the information string for this component.
`java.util.Vector` | `listClients()` Provides a list of the clients of this component.
`java.util.Vector` | `listHooks()` Provides a list of the hooks in this component.
`java.lang.String` | `name()` Accessor for the component name.
`void` | `name(java.lang.String s)` Sets the name of this component.
`int` | `numberOfClients()`
`void` | `printClients(java.io.PrintStream out)` Dumps information about the clients this Component to an output stream.
`void` | `printHooks(java.io.PrintStream out)` Dumps information about the hooks of this Configurator to an output stream.
`void` | `registerClient(ComponentConfigurator client, java.lang.String hookNameInClient, DependencyAttributes attributes)` Adds a new component to the list of clients.
`void` | `unhook(java.lang.String hookName)` Detaches a ComponentConfigurator from the given hook.
`void` | `unregisterClient(ComponentConfigurator client, java.lang.String hookNameInClient)` Removes a pair (client, hook) from the list of clients.

Method Detail

### destroyComponentConfigurator

    public void destroyComponentConfigurator()

  Deletes the references to all internal data structures.

### addHook

    public void addHook(java.lang.String hookName,
                        DependencyAttributes attributes)
                 throws ElementExists

  Adds a hook to the configurator.
  Parameters:
    `hookName` - the name of the hook to be added.
    `attributes` - a vector of attributes (may be null).
  Throws:
    ElementExists - if the hook already exists.

### deleteHook

    public void deleteHook(java.lang.String hookName)
                    throws NotFound

  Deletes a hook from the configurator.
  Parameters:
    `hookName` - the name of the hook to be deleted.
  Throws:
    NotFound - if the hook is not found.

### hook

    public void hook(java.lang.String hookName,
                     ComponentConfigurator cc,
                     DependencyAttributes attributes)
              throws HookBusy,
                     NotFound

  Attaches a ComponentConfigurator to the given hook changing the attributes associated with the hook.
  Parameters:
    `hookName` - the name of the hook.
    `cc` - the ComponentConfigurator to be attached to the hook.
    `attributes` - a vector of attributes (may be null).
  Throws:
    HookBusy - if there is already a component attached to the hook.
    NotFound - if the hook does not exist.

### hook

    public void hook(java.lang.String hookName,
                     ComponentConfigurator cc)
              throws HookBusy,
                     NotFound

  Attaches a ComponentConfigurator to the given hook. It does not change the attributes associated with this hook.
  Parameters:
    `hookName` - the name of the hook.
    `cc` - the ComponentConfigurator to be attached to the hook.
  Throws:
    HookBusy - if there is already a component attached to the hook.
    NotFound - if the hook does not exist.

### unhook

    public void unhook(java.lang.String hookName)
                throws HookVacant,
                       NotFound

  Detaches a ComponentConfigurator from the given hook.
  Parameters:
    `hookName` - the name of the hook.
    `cc` - the ComponentConfigurator to be detached.
  Throws:
    HookVacant - if there are no components attached to the hook.
    NotFound - if the hook does not exist.

### registerClient

    public void registerClient(ComponentConfigurator client,
                               java.lang.String hookNameInClient,
                               DependencyAttributes attributes)
                        throws ElementExists

  Adds a new component to the list of clients.
  Parameters:
    `client` - the ComponentConfigurator representing the new client.
    `hookNameInClient` - the name of the hook to which this component is attached.
    `attributes` - a vector of attributes (may be null).
  Throws:
    ElementExists - if the given pair (client, hookNameInClient) is already present in the client list.

### unregisterClient

    public void unregisterClient(ComponentConfigurator client,
                                 java.lang.String hookNameInClient)
                          throws NotFound

  Removes a pair (client, hook) from the list of clients.
  Parameters:
    `client` - the ComponentConfigurator representing the new client.
    `hookNameInClient` - the name of the hook to which this component is attached.
  Throws:
    NotFound - if the given pair (client, hookNameInClient) is not present in the client list.

### eventOnHookedComponent

    public void eventOnHookedComponent(ComponentConfigurator hookedComponent,
                                       ComponentEvent e)

  This implementation simply prints the event to the standard output.
  Parameters:
    `hookedComponent` - the ComponentConfigurator that generated the event.
    `e` - the event that was generated.

### eventOnClient

    public void eventOnClient(ComponentConfigurator client,
                              ComponentEvent e)

  This implementation simply prints the event to the standard output.
  Parameters:
    `client` - the ComponentConfigurator that generated the event.
    `e` - the event that was generated.

### listHooks

    public java.util.Vector listHooks()

  Provides a list of the hooks in this component.
  Returns:
    a vector of DependencySpecifications.
  See Also:
    `DependencySpecification`, `Vector`

### getHookedComponent

    public ComponentConfigurator getHookedComponent(java.lang.String hookName)
                                             throws NotFound

  Provides a reference to the component attached to the given hook.
  Returns:
    a reference to the ComponentConfigurator.
  Throws:
    NotFound - if the hook does not exist.

### numberOfClients

    public int numberOfClients()

  Returns:
    the number of clients registered with this component.

### listClients

    public java.util.Vector listClients()

  Provides a list of the clients of this component.
  Returns:
    a vector of DependencySpecifications.
  See Also:
    `DependencySpecification`, `Vector`

### name

    public void name(java.lang.String s)

  Sets the name of this component.

### name

    public java.lang.String name()

  Accessor for the component name.
  Returns:
    a string containing the component name.

### info

    public void info(java.lang.String s)

  Sets the information string for this component.

### info

    public java.lang.String info()

  Accessor for the component information string.
  Returns:
    a string containing component information.

### implementation

    public java.lang.Object implementation()

  Accessor for getting the component implementation.
  Returns:
    the object implementation.

### implementation

    public void implementation(java.lang.Object implementation)

  Sets the component implementation.

### printHooks

    public void printHooks(java.io.PrintStream out)

  Dumps information about the hooks of this Configurator to an output stream.
  Parameters:
    `out` - an output PrintStream in which the information is printed.

### printClients

    public void printClients(java.io.PrintStream out)

  Dumps information about the clients this Component to an output stream.
  Parameters:
    `out` - an output PrintStream in which the information is printed.

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD