/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.system.server;

/**
 * MBean interface.
 */
public interface ServerImplMBean {

   //default object name
   public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory.create("jboss.system:type=Server");

   /**
    * Check if the server is started.
    * @return True if the server is started, else false.
    */
  boolean isStarted() ;

   /**
    * Shutdown the Server instance and run shutdown hooks. <p>If the exit on shutdown flag is true, then {@link #exit} is called, else only the shutdown hook is run.
    * @throws IllegalStateException No started.    */
  void shutdown() throws java.lang.IllegalStateException;

   /**
    * Shutdown the server, the JVM and run shutdown hooks.
    * @param exitcode The exit code returned to the operating system.    */
  void exit(int exitcode) ;

   /**
    * Shutdown the server, the JVM and run shutdown hooks. Exits with code 1.
    */
  void exit() ;

   /**
    * Forcibly terminates the currently running Java virtual machine.
    * @param exitcode The exit code returned to the operating system.
    */
  void halt(int exitcode) ;

   /**
    * Forcibly terminates the currently running Java virtual machine. Exits with code 1.
    */
  void halt() ;

   /**
    * Hint to the JVM to run the garbage collector.
    */
  void runGarbageCollector() ;

   /**
    * Hint to the JVM to run any pending object finailizations.
    */
  void runFinalization() ;

   /**
    * Enable or disable tracing method calls at the Runtime level.
    */
  void traceMethodCalls(java.lang.Boolean flag) ;

   /**
    * Enable or disable tracing instructions the Runtime level.
    */
  void traceInstructions(java.lang.Boolean flag) ;

  java.util.Date getStartDate() ;

  java.lang.String getVersion() ;

  java.lang.String getVersionName() ;

  java.lang.String getBuildNumber() ;

  java.lang.String getBuildJVM() ;

  java.lang.String getBuildOS() ;

  java.lang.String getBuildID() ;

  java.lang.String getBuildDate() ;

}
