org.oddjob.monitor
Class OddjobExplorer

java.lang.Object
  extended by org.oddjob.framework.BaseComponent
      extended by org.oddjob.framework.BasePrimary
          extended by org.oddjob.framework.SimpleJob
              extended by org.oddjob.framework.SerializableJob
                  extended by org.oddjob.monitor.OddjobExplorer
All Implemented Interfaces:
Serializable, Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful, Stoppable

public class OddjobExplorer
extends SerializableJob
implements Stoppable

Description

Runs Oddjob Explorer.

In the log panel the log level shown is set to be that of the rootLogger in the log4j.properties file in the opt/classes directory. By default it is set to INFO so you will not see DEBUG messages in the log panel. For more information on configuring the file see http://logging.apache.org/log4j

See Also:
Serialized Form
Author:
Rob Gordon

Field Summary
static String DEFAULT_TITLE
           
static String ODDJOB_PROPERTY
           
protected  VetoableChangeSupport vetoableChangeSupport
           
 
Fields inherited from class org.oddjob.framework.SimpleJob
stateHandler, stop
 
Fields inherited from class org.oddjob.framework.BaseComponent
iconHelper
 
Constructor Summary
OddjobExplorer()
          Constructor to be used to create a single instance of this explorer.
OddjobExplorer(MultiViewController controller, ScreenPresence screen, FileHistory sharedFileHistory)
          Constructor when this explorer is being created as one of many.
 
Method Summary
protected  int execute()
          Execute this job.
 File getDir()
           
protected  ExplorerComponent getExplorerComponent()
           
 File getFile()
           
 int getFileHistorySize()
           
 String getLogFormat()
           
 Oddjob getOddjob()
           
 long getPollingInterval()
           
 ScreenPresence getScreen()
           
 String getTitle()
           
 void onStop()
          Allow sub classes to do something on stop.
 void setArooaSession(ArooaSession session)
          Here for the tests...
 void setDir(File dir)
           
 void setFile(File file)
           
 void setFileHistorySize(int fileHistorySize)
           
 void setLogFormat(String logFormat)
           
 void setOddjob(Oddjob oddjob)
          Setter for Oddjob.
 void setOddjobServices(OddjobServices oddjobServices)
          Capture services from the containing Oddjob.
 void setPollingInterval(long pollingInterval)
           
 void show()
           
 
Methods inherited from class org.oddjob.framework.SimpleJob
fireDestroyedState, force, getStateChanger, hardReset, onDestroy, onReset, run, sleep, softReset, stateHandler, stop
 
Methods inherited from class org.oddjob.framework.BasePrimary
configure, getName, logger, logger, loggerName, save, setName, toString
 
Methods inherited from class org.oddjob.framework.BaseComponent
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.oddjob.Stoppable
stop
 
Methods inherited from interface org.oddjob.Stateful
addStateListener, lastStateEvent, removeStateListener
 

Field Detail

ODDJOB_PROPERTY

public static final String ODDJOB_PROPERTY
See Also:
Constant Field Values

DEFAULT_TITLE

public static final String DEFAULT_TITLE
See Also:
Constant Field Values

vetoableChangeSupport

protected transient VetoableChangeSupport vetoableChangeSupport
Constructor Detail

OddjobExplorer

public OddjobExplorer()
Constructor to be used to create a single instance of this explorer. Typically used from code to aid debugging an Oddjob.


OddjobExplorer

public OddjobExplorer(MultiViewController controller,
                      ScreenPresence screen,
                      FileHistory sharedFileHistory)
Constructor when this explorer is being created as one of many.

Parameters:
controller -
screen -
sharedFileHistory -
Method Detail

getExplorerComponent

protected ExplorerComponent getExplorerComponent()

setOddjobServices

@Inject
public void setOddjobServices(OddjobServices oddjobServices)
Capture services from the containing Oddjob.

Parameters:
oddjobServices -

setArooaSession

public void setArooaSession(ArooaSession session)
Description copied from class: BaseComponent
Here for the tests...

Specified by:
setArooaSession in interface ArooaSessionAware
Overrides:
setArooaSession in class BaseComponent

setOddjob

public void setOddjob(Oddjob oddjob)
               throws PropertyVetoException
Setter for Oddjob. This will change the Oddjob being monitored.

Parameters:
oddjob - The new Oddjob or null to just close.
Throws:
PropertyVetoException - If the exsiting Oddjob can't be closed.

getOddjob

public Oddjob getOddjob()

setDir

public void setDir(File dir)

getDir

public File getDir()

getTitle

public String getTitle()

Property: title

Description: The Explorer frame's title.

Returns:
The title.

show

public void show()

execute

protected int execute()
               throws Exception
Description copied from class: SimpleJob
Execute this job.

Specified by:
execute in class SimpleJob
Returns:
0 if the job is complete, anything else otherwise.
Throws:
Exception - If the unexpected occurs.

onStop

public void onStop()
            throws FailedToStopException
Description copied from class: SimpleJob
Allow sub classes to do something on stop.

Overrides:
onStop in class SimpleJob
Throws:
FailedToStopException

getPollingInterval

public long getPollingInterval()
Returns:
Returns the pollingInterval.

setPollingInterval

public void setPollingInterval(long pollingInterval)
Parameters:
pollingInterval - The pollingInterval to set.

getFileHistorySize

public int getFileHistorySize()

setFileHistorySize

public void setFileHistorySize(int fileHistorySize)

Property:

Description: How many lines to keep in file history.

Required: No.


getScreen

public ScreenPresence getScreen()

getLogFormat

public String getLogFormat()

setLogFormat

public void setLogFormat(String logFormat)

getFile

public File getFile()

setFile

public void setFile(File file)