|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
org.apache.excalibur.instrument.manager.http.server.HTTPServer
public class HTTPServer
| Field Summary |
|---|
| Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
|---|
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
| Constructor Summary | |
|---|---|
HTTPServer(int port,
InetAddress bindAddress)
Creates a new HTTPServer. |
|
| Method Summary | |
|---|---|
protected int |
getSoTimeout()
|
protected void |
handleSocket(Socket socket)
Handle a newly connected socket. |
boolean |
isStopping()
Returns true when the component is in the process of being stopped. |
void |
registerHandler(HTTPURLHandler handler)
Registers a new HTTP URL Handler with the server. |
void |
run()
Run method which is responsible for launching the runner method and handling the shutdown cycle. |
protected void |
runner()
Runner method that will be called when the component is started. |
void |
setAccessLogFile(String accessLogFile)
Access log file name. |
void |
setParameter(Map params,
String param,
String value)
|
void |
start()
Starts the runner thread. |
void |
stop()
Stops the server. |
protected void |
stopRunner()
Called when the component is being stopped, the isStopping method will always return true when this method is called. |
| Methods inherited from class org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable |
|---|
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableName |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTTPServer(int port,
InetAddress bindAddress)
port - The port on which the server will listen.bindAddress - The address on which the server will listen for
connections.| Method Detail |
|---|
public void stop()
throws Exception
stop in interface StartableException - If there are any problems stopping the component.protected void handleSocket(Socket socket)
socket - Newly connected Socket to be handled.public void setAccessLogFile(String accessLogFile)
accessLogFile - Name of the log file or null if disabled.public void registerHandler(HTTPURLHandler handler)
handler - The handler to register.
public void setParameter(Map params,
String param,
String value)
public void start()
throws Exception
start in interface StartableException - If there are any problems.
protected void stopRunner()
throws Exception
Exception - If there are any problemsprotected void runner()
protected int getSoTimeout()
public void run()
run in interface Runnablepublic boolean isStopping()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||