org.apache.sling.launchpad.app
Class Main

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.sling.launchpad.app.Main
All Implemented Interfaces:
Runnable, Notifiable

public class Main
extends Thread
implements Notifiable

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.

See Also:
The Sling Launchpad

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static void main(String[] args)
           
 void run()
          Called when the Java VM is being terminiated, for example because the KILL signal has been sent to the process.
 void stopped()
          The framework has been stopped by calling the Bundle.stop() on the system bundle.
 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.
 
Methods inherited from class java.lang.Thread
activeCount, 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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)

stopped

public void stopped()
The framework has been stopped by calling the Bundle.stop() on the system bundle. This actually terminates the Sling Standalone application.

Specified by:
stopped in interface Notifiable

updated

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.

Specified by:
updated in interface Notifiable
Parameters:
updateFile - The temporary file to replace the existing launcher jar file. If null the existing launcher jar will be used again.

run

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.

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.