org.apache.jetspeed.services.daemonfactory
Interface DaemonFactoryService

All Superinterfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Implementing Classes:
JetspeedDaemonFactoryService

public interface DaemonFactoryService
extends org.apache.turbine.services.Service

Version:
$Id: DaemonFactoryService.java,v 1.4 2004/02/23 03:29:24 jford Exp $
Author:
Kevin A. Burton

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 Daemon getDaemon(DaemonEntry entry)
          Allows a Daemon to define its Thread priority through a factory.
 Daemon getDaemon(java.lang.String classname)
          Get a daemon with the given classname.
 DaemonContext getDaemonContext()
           
 DaemonEntry[] getDaemonEntries()
          Get the current known DaemonEntries within the DaemonFactory
 DaemonEntry getDaemonEntry(java.lang.String name)
          Given the name of a DaemonEntry...
 java.lang.String getMessage(DaemonEntry entry)
          Get the last known message of the given DaemonEntry's processing
 int getResult(DaemonEntry entry)
          Get the last known result of the given DaemonEntry's processing
 int getStatus(DaemonEntry entry)
           
 void process(DaemonEntry entry)
          Kicks of processing of a Daemon.
 void start()
           Starts any daemons that need processing.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

start

public void start()

Starts any daemons that need processing.

This should be called right after init() so that any daemons that need to be started will be. If you need to do any per-daemon initialization then do so before calling start()


getDaemon

public Daemon getDaemon(DaemonEntry entry)
                 throws DaemonException
Allows a Daemon to define its Thread priority through a factory. The Thread that this object should return should be an implementation of itself.

Throws:
DaemonException

getDaemon

public Daemon getDaemon(java.lang.String classname)
                 throws DaemonException
Get a daemon with the given classname.

Throws:
DaemonException
See Also:
getDaemon( DaemonEntry entry )

getDaemonContext

public DaemonContext getDaemonContext()

process

public void process(DaemonEntry entry)
             throws DaemonException
Kicks of processing of a Daemon. Does the same thing as getDaemon() but also creates a thread and runs the daemon.

Throws:
DaemonException

getStatus

public int getStatus(DaemonEntry entry)

getResult

public int getResult(DaemonEntry entry)
Get the last known result of the given DaemonEntry's processing


getMessage

public java.lang.String getMessage(DaemonEntry entry)
Get the last known message of the given DaemonEntry's processing


getDaemonEntries

public DaemonEntry[] getDaemonEntries()
Get the current known DaemonEntries within the DaemonFactory


getDaemonEntry

public DaemonEntry getDaemonEntry(java.lang.String name)
                           throws DaemonNotFoundException
Given the name of a DaemonEntry... get it from the DaemonFactory

Throws:
DaemonNotFoundException


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.