Interface ComponentConfigurator

public interface ComponentConfigurator
An interface for representing the dependencies between Java Objects.

Version:
0.1
Author:
Fabio Kon
See Also:
HookSpecification

Method Index

 o addHook(String)
Adds a hook to the configurator.
 o deleteHook(String)
Deletes a hook from the configurator.
 o destroyComponentConfigurator()
Deletes the references to all internal data structures.
 o eventOnClient(ComponentConfigurator, ComponentEvent)
This implementation simply prints the event to the standard output.
 o eventOnHookedComponent(ComponentConfigurator, ComponentEvent)
This implementation simply prints the event to the standard output.
 o hook(String, ComponentConfigurator)
Attaches a ComponentConfigurator to the given hook.
 o info()
Accessor for the component information string.
 o info(String)
Sets the information string for this component.
 o listClients()
Provides a list of the clients of this component.
 o listHooks()
Provides a list of the hooks in this component.
 o name()
Accessor for the component name.
 o name(String)
Sets the name of this component.
 o registerClient(ComponentConfigurator, String)
Adds a new component to the list of clients.
 o unhook(String)
Detaches a ComponentConfigurator from the given hook.
 o unregisterClient(ComponentConfigurator, String)
Removes a pair (client, hook) from the list of clients.

Methods

 o destroyComponentConfigurator
 public abstract void destroyComponentConfigurator()
Deletes the references to all internal data structures.

 o addHook
 public abstract void addHook(String hookName) throws ElementExists
Adds a hook to the configurator.

Parameters:
hookName - the name of the hook to be added.
Throws: ElementExists
if the hook already exists.
 o deleteHook
 public abstract void deleteHook(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.
 o hook
 public abstract void hook(String hookName,
                           ComponentConfigurator cc) throws HookBusy, NotFound
Attaches a ComponentConfigurator to the given 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.
Throws: NotFound
if the hook does not exist.
 o unhook
 public abstract void unhook(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.
Throws: NotFound
if the hook does not exist.
 o registerClient
 public abstract void registerClient(ComponentConfigurator client,
                                     String hookNameInClient) 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.
Throws: ElementExists
if the given pair (client, hookNameInClient) is already present in the client list.
 o unregisterClient
 public abstract void unregisterClient(ComponentConfigurator client,
                                       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.
 o eventOnHookedComponent
 public abstract 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.
 o eventOnClient
 public abstract 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.
 o name
 public abstract String name()
Accessor for the component name.

Returns:
a string containing the component name.
 o info
 public abstract String info()
Accessor for the component information string.

Returns:
a string containing component information.
 o listHooks
 public abstract Vector listHooks()
Provides a list of the hooks in this component.

Returns:
a vector of HookSpecifications. (MAYBE SHOULD RETURN JUST AN ITERATOR)
See Also:
HookSpecifications, Vector
 o listClients
 public abstract Vector listClients()
Provides a list of the clients of this component.

Returns:
a vector of HookSpecifications. (MAYBE SHOULD RETURN JUST AN ITERATOR)
See Also:
HookSpecifications, Vector
 o name
 public abstract void name(String s)
Sets the name of this component.

 o info
 public abstract void info(String s)
Sets the information string for this component.