Save This Page
Home » org.apache.sling.launchpad.base-2.2.0-source-release » org.apache.sling.launchpad.app » [javadoc | source]
org.apache.sling.launchpad.app
public class: Main [javadoc | source]
java.lang.Object
   java.lang.Thread
      org.apache.sling.launchpad.app.Main

All Implemented Interfaces:
    Notifiable, Runnable

The Main is the externally visible Standalone Java Application launcher for Sling. Please refer to the full description The Sling Launchpad on the Sling Wiki for a full description of this class.

Logging goes to standard output for informational messages and to standard error for error messages.

This class goes into the secondary artifact with the classifier app to be used as the main class when starting the Java Application.

Fields inherited from java.lang.Thread:
threadLocals,  inheritableThreadLocals,  parkBlocker,  MIN_PRIORITY,  NORM_PRIORITY,  MAX_PRIORITY
Method from org.apache.sling.launchpad.app.Main Summary:
error,   info,   main,   parseCommandLine,   run,   shutdown,   stopped,   updated
Methods from java.lang.Thread:
activeCount,   blockedOn,   checkAccess,   countStackFrames,   currentThread,   destroy,   dumpStack,   enumerate,   getAllStackTraces,   getContextClassLoader,   getDefaultUncaughtExceptionHandler,   getId,   getName,   getPriority,   getStackTrace,   getState,   getThreadGroup,   getUncaughtExceptionHandler,   holdsLock,   interrupt,   interrupted,   isAlive,   isDaemon,   isInterrupted,   join,   join,   join,   resume,   run,   setContextClassLoader,   setDaemon,   setDefaultUncaughtExceptionHandler,   setName,   setPriority,   setUncaughtExceptionHandler,   sleep,   sleep,   start,   stop,   stop,   suspend,   toString,   yield
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.sling.launchpad.app.Main Detail:
 static  void error(String message,
    Throwable t) 
 static  void info(String message,
    Throwable t) 
 public static  void main(String[] args) 
 static Map<String, String> parseCommandLine(String[] args) 
    Parses the command line arguments into a map of strings indexed by strings. This method suppports single character option names only at the moment. Each pair of an option name and its value is stored into the map. If a single dash '-' character is encountered the rest of the command line are interpreted as option names and are stored in the map unmodified as entries with the same key and value.
    Command LineMapping
    xx -> x
    -y zy -> z
    -yzy -> z
    -y -zy -> y, z -> z
    -y x - -z ay -> x, -z -> -z, a -> a
 public  void run() 
    Called when the Java VM is being terminiated, for example because the KILL signal has been sent to the process. This method calls stop on the launched Sling instance to terminate the framework before returning.
  void shutdown() 
 public  void stopped() 
    The framework has been stopped by calling the Bundle.stop() on the system bundle. This actually terminates the Sling Standalone application.
 public  void updated(File updateFile) 
    The framework has been stopped with the intent to be restarted by calling either of the Bundle.update methods on the system bundle.

    If an InputStream was provided, this has been copied to a temporary file, which will be used in place of the existing launcher jar file.