|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Runner
Exposes a basic control interface for applications running under the Brimstone main. The methods exposed allow for basic lifecycle management, allowing for starting, stopping, and restaring the application.
Method Summary | |
---|---|
void |
restart()
Indicates the main that after the application thread terminates it should be restarted. |
void |
setArguments(java.lang.String[] arguments)
Provides arguments to be passed to the specified static run method. |
void |
setClass(java.lang.String clazz)
Sets the class name that the main will load as the entry point to the application. |
void |
setMethod(java.lang.String method)
Sets the method name used to start the application. |
void |
setParent(java.lang.ClassLoader parent)
Sets the ClassLoader this main should use as the parent of the ClassLoader that will be built
from the provided path. |
void |
setPath(java.lang.String path)
Comma-separated list of URL strings that the main will use to look up the Class and
Method instances used to load and run the wrapped application. |
void |
start()
Starts the application as described by the three attributes above. |
Method Detail |
---|
void setParent(java.lang.ClassLoader parent)
ClassLoader
this main should use as the parent of the ClassLoader
that will be built
from the provided path. This defaults to the classloader of the main implementation itself
and if it is overridden applications executed through this main may not to resolve and use
this management interface.
parent
- the ClassLoader
to be used as the parent of the application ClassLoader
.void setPath(java.lang.String path)
URL
strings that the main will use to look up the Class
and
Method
instances used to load and run the wrapped application. This set of
locations will also serve as the runtime classpath for the loaded application.
path
- a list of urls to load from.void setClass(java.lang.String clazz)
clazz
- class name of the main application.void setMethod(java.lang.String method)
Class
loaded by name from the clazz
attribute.
method
- name to invoke when starting the application.void setArguments(java.lang.String[] arguments)
arguments
- arguments for the main method.void start() throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.net.URISyntaxException, java.net.MalformedURLException, java.io.IOException
java.lang.ClassNotFoundException
- if the specified class can not be found.
java.lang.NoSuchMethodException
- the specified method is not a static method on the given class.
java.lang.IllegalAccessException
- the provided class or method cannot be accessed from this application.
java.net.URISyntaxException
- if a
java.net.MalformedURLException
java.io.IOException
void restart()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |