|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.standalone.StandaloneMainUtil
public abstract class StandaloneMainUtil
Abstract class that can be extended when Main/Launcher class are required.
Invoking the start() method of this class will properly parse the command
line, set the appropriate Classloader
and if a war/jar is passed as
argument, explode it and happens its WEB-INF/classes to the context Classloader.
Field Summary | |
---|---|
static String |
ADAPTER
|
static String |
SELECTOR_THREAD
System property for the SelectorThread value. |
Constructor Summary | |
---|---|
StandaloneMainUtil()
|
Method Summary | |
---|---|
String |
appendWarContentToClassPath(String appliPath)
Make available the content of a War file to the current Thread Context Classloader. |
abstract Adapter |
configureAdapter(SelectorThread st)
Configure the SelectorThread.setAdapter(com.sun.grizzly.tcp.Adapter) |
SelectorThread |
createSelectorThread(String[] args)
Create a single SelectorThread. |
static Object |
loadClass(String clazzName)
Util to load classes using reflection. |
abstract String |
parseApplicationLocation(String[] args)
Parse the current command line, and return the location of the war/jar/static resource location file passed as argument. |
abstract boolean |
parseOptions(String[] args)
Validate the command line options. |
abstract void |
printHelpAndExit()
This method will be invoked when unexpected arguments are passed to the {@link #createSelectorThread. |
void |
setPort(String num)
Set the port the SelectorThread will listen. |
void |
start(String[] args)
Configure and start a SelectorThread |
void |
startSelectorThread(SelectorThread st)
Start a SelectorThread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SELECTOR_THREAD
SelectorThread
value.
public static final String ADAPTER
Constructor Detail |
---|
public StandaloneMainUtil()
Method Detail |
---|
public void start(String[] args) throws Exception
SelectorThread
args
- the command line arguments.
Exception
public SelectorThread createSelectorThread(String[] args) throws Exception
args
- The command line arguments.
Exception
public static Object loadClass(String clazzName)
public String appendWarContentToClassPath(String appliPath) throws MalformedURLException, IOException
MalformedURLException
IOException
public void startSelectorThread(SelectorThread st) throws IOException, InstantiationException
st
-
IOException
InstantiationException
public void setPort(String num)
SelectorThread
will listen.
num
- public abstract void printHelpAndExit()
public abstract boolean parseOptions(String[] args)
args
- the command line arguments.
public abstract Adapter configureAdapter(SelectorThread st)
SelectorThread.setAdapter(com.sun.grizzly.tcp.Adapter)
st
- #return an instance of an Adapter.public abstract String parseApplicationLocation(String[] args)
args
- the command line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |