|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.web.standalone.StandaloneMainUtil
public abstract class StandaloneMainUtil
Abstract class that can be extended when Main/Launcher class are required.
Invoking the start(java.lang.String[]) 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
and finally start a configured instance of WebFilter
| 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(WebFilterConfig wc)
Configure the WebFilterConfig.setAdapter(org.glassfish.grizzly.web.container.Adapter) |
WebFilter |
createWebFilter(String[] args)
Create a single WebFilter and configure it using the
command line passed arguments. |
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 createWebFilter(java.lang.String[]). |
void |
setPort(String num)
Set the port the WebFilter will listen. |
void |
start(String[] args)
Configure and start a WebFilter |
void |
stop()
Stop WebFilter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StandaloneMainUtil()
| Method Detail |
|---|
public void start(String[] args)
throws Exception
WebFilter
args - the command line arguments.
Exception
public void stop()
throws Exception
WebFilter
Exception
public WebFilter createWebFilter(String[] args)
throws Exception
WebFilter and configure it using the
command line passed arguments. This method will invoke parseOptions(java.lang.String[]),
then parseApplicationLocation(java.lang.String[]), appendWarContentToClassPath(java.lang.String) and
finally configureAdapter(org.glassfish.grizzly.web.WebFilterConfig)
args - The command line arguments.
Exception
public String appendWarContentToClassPath(String appliPath)
throws MalformedURLException,
IOException
MalformedURLException
IOExceptionpublic void setPort(String num)
WebFilter will listen.
num - public abstract void printHelpAndExit()
createWebFilter(java.lang.String[]).
public abstract boolean parseOptions(String[] args)
args - the command line arguments.
public abstract Adapter configureAdapter(WebFilterConfig wc)
WebFilterConfig.setAdapter(org.glassfish.grizzly.web.container.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 | |||||||||