uk.ac.man.bioinf.module
Class Module

java.lang.Object
  |
  +--uk.ac.man.bioinf.module.Module
Direct Known Subclasses:
CinemaCoreGui, CinemaDebug, CinemaDebug, CinemaInvoker, CinemaSharedQuitExit, CinemaSystemEvents, XMLBootModule, XMLModule

public abstract class Module
extends Object

Module.java Represents a module, the main constituent of a modular architectured program. It is associated with the module identifier and context classes. Created: Wed Apr 19 14:17:05 2000

Version:
$Id: Module.java,v 1.10 2001/04/11 17:04:43 lord Exp $
Author:
J Selley

Constructor Summary
Module()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 void destroy()
          The method called, from an external source, to remove this module and prepare it for garbage collection.
 void finalize()
           
protected  void firePropertyChange(PropertyChangeEvent event)
           
protected  void firePropertyChange(String propertyName, int oldValue, int newValue)
           
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
           
 ModuleContext getContext()
          Returns the modules context.
 ModuleIdentifier getIdentifier()
          Returns a module identifier for this module.
 ModuleIdentifierList getRequiredIdentifiers()
          Returns the module identifiers for the required modules.
 Module getRequiredModule(ModuleIdentifier ident)
           
 ModuleList getRequiredModules()
          Returns the required modules for this module (ie: the modules that are necessary in order for this module to function).
abstract  String getVersion()
          Returns the version of this module.
 boolean hasListeners(String propertyName)
           
 boolean isDestroyed()
           
 boolean isStarted()
          Returns whether the module has been started (ie: the start method run).
 void load()
          The method called for the load of this module.
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 void runStart()
           
 void setContext(ModuleContext context)
           
 void start()
          The method called externally to initiate the modules function.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Module

public Module()
Method Detail

getIdentifier

public ModuleIdentifier getIdentifier()
Returns a module identifier for this module. Simply performs a delegation to the module context.

Returns:
this modules identifier

getRequiredModules

public ModuleList getRequiredModules()
Returns the required modules for this module (ie: the modules that are necessary in order for this module to function). Simple delegation to the module context.

Returns:
the required modules

getRequiredModule

public Module getRequiredModule(ModuleIdentifier ident)

getRequiredIdentifiers

public ModuleIdentifierList getRequiredIdentifiers()
Returns the module identifiers for the required modules. This places a call on getRequiredModules, which is delegated to the module context. It may require over-riding inorder to improve the efficiency of the method.

Returns:
the required module identifiers

getContext

public final ModuleContext getContext()
Returns the modules context.

Returns:
the modules context

setContext

public final void setContext(ModuleContext context)

getVersion

public abstract String getVersion()
Returns the version of this module.

Returns:
the version

load

public void load()
          throws ModuleException
The method called for the load of this module.

Throws:
ModuleLoadException - if a loading error occurs
ModuleException

start

public void start()
The method called externally to initiate the modules function.


runStart

public void runStart()

isStarted

public final boolean isStarted()
Returns whether the module has been started (ie: the start method run).

Returns:
T/F status of call on start() method

isDestroyed

public boolean isDestroyed()

destroy

public void destroy()
The method called, from an external source, to remove this module and prepare it for garbage collection.


finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throwable

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  int oldValue,
                                  int newValue)

firePropertyChange

protected void firePropertyChange(PropertyChangeEvent event)

hasListeners

public boolean hasListeners(String propertyName)