com.sun.grizzly.standalone.messagesbus
Class Main

java.lang.Object
  extended by com.sun.grizzly.standalone.StandaloneMainUtil
      extended by com.sun.grizzly.standalone.servlet.ServletLauncher
          extended by com.sun.grizzly.standalone.Comet
              extended by com.sun.grizzly.standalone.messagesbus.Main

public class Main
extends Comet

Basic startup class used when Grizzly MessagesBus is used as a standalone Servlet.

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from class com.sun.grizzly.standalone.servlet.ServletLauncher
applicationLoc
 
Fields inherited from class com.sun.grizzly.standalone.StandaloneMainUtil
ADAPTER, SELECTOR_THREAD
 
Constructor Summary
Main()
           
 
Method Summary
 Adapter configureAdapter(SelectorThread st)
          Configure the SelectorThread.setAdapter(com.sun.grizzly.tcp.Adapter)
 SelectorThread createSelectorThread(String[] args)
          Create a single SelectorThread.
static void main(String[] args)
           
 String parseApplicationLocation(String[] args)
          Parse the current command line, and return the location of the war/jar/static resource location file passed as argument.
 boolean parseOptions(String[] args)
          Validate the command line options.
 void printHelpAndExit()
          This method will be invoked when unexpected arguments are passed to the {@link #createSelectorThread.
 
Methods inherited from class com.sun.grizzly.standalone.StandaloneMainUtil
appendWarContentToClassPath, loadClass, setPort, start, startSelectorThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

configureAdapter

public Adapter configureAdapter(SelectorThread st)
Description copied from class: StandaloneMainUtil
Configure the SelectorThread.setAdapter(com.sun.grizzly.tcp.Adapter)

Overrides:
configureAdapter in class ServletLauncher
Parameters:
st - #return an instance of an Adapter.

parseOptions

public boolean parseOptions(String[] args)
Description copied from class: StandaloneMainUtil
Validate the command line options.

Overrides:
parseOptions in class ServletLauncher
Parameters:
args - the command line arguments.
Returns:
true if the options are well formed.

createSelectorThread

public SelectorThread createSelectorThread(String[] args)
                                    throws Exception
Create a single SelectorThread.

Overrides:
createSelectorThread in class Comet
Parameters:
args - The command line arguments.
Throws:
Exception

parseApplicationLocation

public String parseApplicationLocation(String[] args)
Description copied from class: StandaloneMainUtil
Parse the current command line, and return the location of the war/jar/static resource location file passed as argument.

Overrides:
parseApplicationLocation in class ServletLauncher
Parameters:
args - the command line arguments.
Returns:
the application path, or null if not defined.

printHelpAndExit

public void printHelpAndExit()
Description copied from class: StandaloneMainUtil
This method will be invoked when unexpected arguments are passed to the {@link #createSelectorThread.

Overrides:
printHelpAndExit in class ServletLauncher


Copyright © 2010 SUN Microsystems. All Rights Reserved.