raccoon.core.types
Class AbsConfigurableLoadable

java.lang.Object
  extended by raccoon.core.types.AbsComponent
      extended by raccoon.core.types.AbsLoadable
          extended by raccoon.core.types.AbsConfigurableLoadable
All Implemented Interfaces:
IBaseComponent, IConfigurable, ILoadable, ILogable
Direct Known Subclasses:
AbsComponentManager, AbsLogComponent, ConnectionDriver, DbHostStatus, FilePoller, FilePublisher, ServiceManager, StdConfig, StrConfig, TibrvAeParser, TibrvMsgParser, TibrvPlayer, TibrvPublisher, TibrvRecorder, TibrvSubscriber, UiTester, XmlParser

public abstract class AbsConfigurableLoadable
extends AbsLoadable
implements IConfigurable

A configurable component that has to be loaded before usage.

Since:
Raccoon v0.8
Version:
$Id: AbsConfigurableLoadable.java,v 1.1 2004/08/08 20:19:18 crouvrais Exp $
Author:
Cedric ROUVRAIS

Field Summary
protected  IConfigurableManager mConfigurableManager
          The configuration manager for this instance
 
Fields inherited from class raccoon.core.types.AbsLoadable
mIsLoaded
 
Fields inherited from class raccoon.core.types.AbsComponent
mIsInError
 
Constructor Summary
AbsConfigurableLoadable()
           
 
Method Summary
 void configureParameters()
          Configures the various parameters for this component.
 boolean isStable(boolean pThrowOnError)
          Checks if the component is correctly configured and loaded..
 void load()
          Loads or initializes the component.
 void setConfigurableManager(IConfigurableManager pManager)
          Defines the configurable manager that is to be used.
 void setLogger(ILogger pLogger)
          Assigns the logger to the component.
 
Methods inherited from class raccoon.core.types.AbsLoadable
getLog, isInError, isInitialised, isRunning, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mConfigurableManager

protected IConfigurableManager mConfigurableManager
The configuration manager for this instance

Constructor Detail

AbsConfigurableLoadable

public AbsConfigurableLoadable()
Method Detail

setConfigurableManager

public void setConfigurableManager(IConfigurableManager pManager)
Defines the configurable manager that is to be used.

Specified by:
setConfigurableManager in interface IConfigurable
Parameters:
pManager - the configuration manager.

configureParameters

public void configureParameters()
Configures the various parameters for this component. This method should configure the instance of IConfigurableManager provided during the invocation of setConfigurableManager(IConfigurableManager).

Specified by:
configureParameters in interface IConfigurable

setLogger

public void setLogger(ILogger pLogger)
               throws java.lang.IllegalStateException,
                      ResourceNotFoundException
Assigns the logger to the component.

Specified by:
setLogger in interface ILogable
Overrides:
setLogger in class AbsLoadable
Parameters:
pLogger - the logging instance to use.
Throws:
java.lang.IllegalStateException - if the component is already loaded, valid only if the component implements the ILoadable interface.
ResourceNotFoundException - if there is an internal configuration error related to Raccoon.

isStable

public boolean isStable(boolean pThrowOnError)
                 throws ServiceException
Checks if the component is correctly configured and loaded..

Parameters:
pThrowOnError - if the component is unstable should an exception be thrown?
Returns:
true if the component is in a stable state.
Throws:
ServiceException - if pThrowOnError is true and if the component is in an unstable state

load

public void load()
          throws java.lang.IllegalStateException,
                 LoadableException
Loads or initializes the component.

Specified by:
load in interface ILoadable
Overrides:
load in class AbsLoadable
Throws:
LoadableException - if the component couldn't load itself.
java.lang.IllegalStateException - if the component isn't in a state to load itself. for example it is already loaded.


Copyright null null. All Rights Reserved.