org.norther.tammi.core.startup
Interface Startup

All Superinterfaces:
Configurable, Startable
All Known Implementing Classes:
DefaultStartup

public interface Startup
extends Configurable, Startable

An interface to startups.

Author:
Ilkka Priha

Field Summary
static String GROUP_ID_PROPERTY
          The property for defining the effective group id.
static String SCRIPT_ENGINE_PROPERTY
          The property for defining the script engines.
static String SCRIPT_LANGUAGE_PROPERTY
          The property for defining the script language.
static String USER_ID_PROPERTY
          The property for defining the effective user id.
 
Method Summary
 int getRestartDelay()
          Gets the restart delay.
 long getShutdownDelay()
          Gets the shutdown delay.
 void register(String[] args)
          Registers the startup without starting.
 void restart(int delay)
          Restarts after a delay.
 void setShutdownDelay(long delay)
          Sets the shutdown delay forcing a shutdown after running all shutdown scripts.
 void start()
          Starts up if registered.
 void stop()
          Shuts down.
 void unregister()
          Unregisters and shuts down the startup.
 
Methods inherited from interface org.norther.tammi.core.config.Configurable
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, storeProperties
 
Methods inherited from interface org.norther.tammi.core.base.Startable
isStarted
 

Field Detail

GROUP_ID_PROPERTY

static final String GROUP_ID_PROPERTY
The property for defining the effective group id.

See Also:
Constant Field Values

USER_ID_PROPERTY

static final String USER_ID_PROPERTY
The property for defining the effective user id.

See Also:
Constant Field Values

SCRIPT_ENGINE_PROPERTY

static final String SCRIPT_ENGINE_PROPERTY
The property for defining the script engines.

See Also:
Constant Field Values

SCRIPT_LANGUAGE_PROPERTY

static final String SCRIPT_LANGUAGE_PROPERTY
The property for defining the script language.

See Also:
Constant Field Values
Method Detail

register

void register(String[] args)
              throws Exception
Registers the startup without starting.

Parameters:
args - the startup arguments.
Throws:
Exception - if registration fails.

unregister

void unregister()
Unregisters and shuts down the startup.


start

void start()
           throws Exception
Starts up if registered.

Specified by:
start in interface Startable
Throws:
Exception - if startup fails.

stop

void stop()
Shuts down.

Specified by:
stop in interface Startable

restart

void restart(int delay)
Restarts after a delay.

Parameters:
delay - the restart delay in secs.

getRestartDelay

int getRestartDelay()
Gets the restart delay.

Returns:
the restart delay in secs.

getShutdownDelay

long getShutdownDelay()
Gets the shutdown delay.

Returns:
the shutdown delay in msecs.

setShutdownDelay

void setShutdownDelay(long delay)
Sets the shutdown delay forcing a shutdown after running all shutdown scripts.

Parameters:
delay - the shutdown delay in msecs (-1 = never).


Copyright © 2004 The Norther Organization. All rights reserved.