org.norther.tammi.core.startup
Class StaticStartup

java.lang.Object
  extended by org.norther.tammi.core.startup.StaticStartup

public abstract class StaticStartup
extends Object

A convenience class to startup and shutdown statically e.g. from native code.

Version:
$Id: StaticStartup.java,v 1.13 2009/09/28 17:56:48 cvsimp Exp $
Author:
Ilkka Priha

Field Summary
static String DEFAULT_DOMAIN
          The default domain.
 
Constructor Summary
StaticStartup()
           
 
Method Summary
static String getDefaultDomain(String[] args)
          Gets the default startup domain.
static MBeanServer getMBeanServer(String[] args)
          Gets a new startup MBean server.
static String getStartupClassName()
          Gets the startup class name.
static void main(String[] args)
          The main method for running the server as a standalone application.
static Startup registerInServer(MBeanServer server, long delay)
          A static registration method in the specified server.
static Startup registerInServer(String[] args, MBeanServer server, long delay)
          A static registration method in the specified server with arguments.
static void setStartupClassName(String className)
          Sets the startup class name.
static void shutdown()
          A static shutdown method in the default server.
static void shutdown(MBeanServer server)
          A static shutdown method in the specified server.
static boolean startup()
          A static startup method in the default server.
static boolean startup(String[] args)
          A static startup method in the default server with arguments.
static int startupAndWait()
          A static startup method in the default server.
static int startupAndWait(String[] args)
          A static startup method in the default server with arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DOMAIN

public static final String DEFAULT_DOMAIN
The default domain.

See Also:
Constant Field Values
Constructor Detail

StaticStartup

public StaticStartup()
Method Detail

getStartupClassName

public static String getStartupClassName()
Gets the startup class name.

Returns:
the startup class name.

setStartupClassName

public static void setStartupClassName(String className)
Sets the startup class name.

Parameters:
className - the startup class name.

startup

public static boolean startup()
A static startup method in the default server.

Returns:
the true if succesful, otherwise false.

startup

public static boolean startup(String[] args)
A static startup method in the default server with arguments.

Parameters:
args - an array of startup arguments.
Returns:
the true if succesful, otherwise false.

startupAndWait

public static int startupAndWait()
A static startup method in the default server.

Returns:
the restart delay in secs, 0 if no restart or -1 on error.

startupAndWait

public static int startupAndWait(String[] args)
A static startup method in the default server with arguments.

Parameters:
args - an array of startup arguments.
Returns:
the restart delay in secs, 0 if no restart or -1 on error.

shutdown

public static void shutdown()
A static shutdown method in the default server.


shutdown

public static void shutdown(MBeanServer server)
A static shutdown method in the specified server.

Parameters:
server - the server of the startup.

registerInServer

public static Startup registerInServer(MBeanServer server,
                                       long delay)
A static registration method in the specified server.

Parameters:
server - the MBean server.
delay - the shutdown delay.
Returns:
the startup instance if succesful, otherwise null.

registerInServer

public static Startup registerInServer(String[] args,
                                       MBeanServer server,
                                       long delay)
A static registration method in the specified server with arguments.

Parameters:
args - an array of startup arguments.
server - the MBean server.
delay - the shutdown delay.
Returns:
the startup instance if succesful, otherwise null.

getDefaultDomain

public static String getDefaultDomain(String[] args)
Gets the default startup domain.

Parameters:
args - an array of startup arguments.
Returns:
the startup MBean server.

getMBeanServer

public static MBeanServer getMBeanServer(String[] args)
Gets a new startup MBean server.

Parameters:
args - an array of startup arguments.
Returns:
the startup MBean server.

main

public static void main(String[] args)
The main method for running the server as a standalone application.

Parameters:
args - an array of startup arguments.


Copyright © 2004 The Norther Organization. All rights reserved.