|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.tools.webster.Webster
public class Webster
Webster is a HTTP server which can serve code from multiple codebases. Environment variables used to control Webster are as follows:
| org.rioproject.tools.webster.port | Sets the port for webster to use | 0 |
| org.rioproject.tools.webster.port | Sets the port for webster to use | 0 | org.rioproject.tools.webster.root | Root directory to serve code from. Webster supports multiple root
directories which are separated by a ; |
System.getProperty(user.home) |
| Constructor Summary | |
|---|---|
Webster()
Create a new Webster. |
|
Webster(int port)
Create a new Webster The Webster will be serving code as determined by the either the org.rioproject.tools.webster.root system property (if set) or defaulting to the user.dir system property. |
|
Webster(int port,
String roots)
Create a new Webster |
|
Webster(int port,
String roots,
String bindAddress)
Create a new Webster |
|
Webster(ServerSocketFactory socketFactory,
String roots,
String bindAddress)
Create a new Webster |
|
Webster(String[] options,
LifeCycle lifeCycle)
Create a new Webster, compatible with the ServiceStarter mechanism in Jini 2.0 |
|
| Method Summary | |
|---|---|
protected String[] |
expandRoots()
|
String |
getAddress()
Get address that Webster is bound to |
int |
getPort()
Get the port Webster is bound to |
String |
getRoots()
Get the roots Webster is serving |
static void |
main(String[] args)
|
protected File |
parseFileName(String filename)
|
void |
run()
|
void |
terminate()
Terminate a running Webster instance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Webster()
throws BindException
The Webster will be serving code as determined by the either the org.rioproject.tools.webster.root system property (if set) or defaulting to the user.dir system property.
BindException - if Webster cannot create a socket
public Webster(int port)
throws BindException
The Webster will be serving code as determined by the either the org.rioproject.tools.webster.root system property (if set) or defaulting to the user.dir system property.
port - The port to use
BindException - if Webster cannot create a socket
public Webster(int port,
String roots)
throws BindException
port - The port to useroots - The root(s) to serve code from. This is a semi-colin
delimited list of directories
BindException - if Webster cannot create a socket
public Webster(int port,
String roots,
String bindAddress)
throws BindException
port - The port to useroots - The root(s) to serve code from. This is a semi-colin
delimited list of directoriesbindAddress - TCP/IP address which Webster should bind to (null
implies no specific address)
BindException - if Webster cannot create a socket
public Webster(ServerSocketFactory socketFactory,
String roots,
String bindAddress)
throws BindException
socketFactory - The ServerSocketFactory to use when creating the socket the Webster will be bound toroots - The root(s) to serve code from. This is a semi-colin
delimited list of directoriesbindAddress - TCP/IP address which Webster should bind to (null
implies no specific address)
BindException - if Webster cannot create a socket
public Webster(String[] options,
LifeCycle lifeCycle)
throws BindException
options - String[] of options. Valid options are [-port port],
[-roots list-of-roots], [-bindAddress address],
[-maxThreads maxThreads] [-soTimeout soTimeout] [-portRange range].
Note -port and -portRange are mutually exclusivelifeCycle - The LifeCycle object, may be null
BindException - if Webster cannot create a socket
IllegalArgumentException - if both -port and -portRange are provided
NumberFormatException - if the ports cannot be parsed into an integer| Method Detail |
|---|
public String getRoots()
public String getAddress()
public void terminate()
public int getPort()
public void run()
run in interface Runnableprotected File parseFileName(String filename)
protected String[] expandRoots()
public static void main(String[] args)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||