Interface ComponentConfigurator
- public interface ComponentConfigurator
An interface for representing the dependencies between Java Objects.
- Version:
- 0.1
- Author:
- Fabio Kon
- See Also:
- HookSpecification
-
addHook(String)
- Adds a hook to the configurator.
-
deleteHook(String)
- Deletes a hook from the configurator.
-
destroyComponentConfigurator()
- Deletes the references to all internal data structures.
-
eventOnClient(ComponentConfigurator, ComponentEvent)
- This implementation simply prints the event to the standard output.
-
eventOnHookedComponent(ComponentConfigurator, ComponentEvent)
- This implementation simply prints the event to the standard output.
-
hook(String, ComponentConfigurator)
- Attaches a ComponentConfigurator to the given hook.
-
info()
- Accessor for the component information string.
-
info(String)
- Sets the information string for this component.
-
listClients()
- Provides a list of the clients of this component.
-
listHooks()
- Provides a list of the hooks in this component.
-
name()
- Accessor for the component name.
-
name(String)
- Sets the name of this component.
-
registerClient(ComponentConfigurator, String)
- Adds a new component to the list of clients.
-
unhook(String)
- Detaches a ComponentConfigurator from the given hook.
-
unregisterClient(ComponentConfigurator, String)
- Removes a pair (client, hook) from the list of clients.
destroyComponentConfigurator
public abstract void destroyComponentConfigurator()
- Deletes the references to all internal data structures.
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.
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.
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.
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.
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.
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.
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.
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.
name
public abstract String name()
- Accessor for the component name.
- Returns:
- a string containing the component name.
info
public abstract String info()
- Accessor for the component information string.
- Returns:
- a string containing component information.
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
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
name
public abstract void name(String s)
- Sets the name of this component.
info
public abstract void info(String s)
- Sets the information string for this component.