|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.transport.http.server.SimpleHttpServer
A simple, but extensible HTTP server, mostly for testing purposes.
Constructor Summary | |
SimpleHttpServer()
Creates a new HTTP server instance, using an arbitrary free TCP port |
|
SimpleHttpServer(int port)
Creates a new HTTP server instance, using the specified TCP port |
|
SimpleHttpServer(SimpleSocketFactory socketfactory,
int port)
Creates a new HTTP server instance, using the specified socket factory and the TCP port |
Method Summary | |
void |
destroy()
Stops this HTTP server instance. |
java.lang.String |
getLocalAddress()
Returns the IP address that this HTTP server instance is bound to. |
int |
getLocalPort()
Returns the TCP port that this HTTP server instance is bound to. |
HttpRequestHandler |
getRequestHandler()
Returns the currently used HttpRequestHandler by this SimpleHttpServer |
java.lang.String |
getTestname()
|
boolean |
isRunning()
Checks if this HTTP server instance is running. |
void |
run()
|
void |
setHttpService(HttpService service)
|
void |
setRequestHandler(HttpRequestHandler rh)
Sets the HttpRequestHandler to be used for this SimpleHttpServer. |
void |
setTestname(java.lang.String testname)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleHttpServer() throws java.io.IOException
java.io.IOException
- if anything goes wrong during initializationpublic SimpleHttpServer(SimpleSocketFactory socketfactory, int port) throws java.io.IOException
port
- Desired TCP port
java.io.IOException
- if anything goes wrong during initializationpublic SimpleHttpServer(int port) throws java.io.IOException
port
- Desired TCP port
java.io.IOException
- if anything goes wrong during initializationMethod Detail |
public java.lang.String getTestname()
public void setTestname(java.lang.String testname)
public int getLocalPort()
public java.lang.String getLocalAddress()
null
if not runningpublic boolean isRunning()
public void destroy()
public HttpRequestHandler getRequestHandler()
public void setRequestHandler(HttpRequestHandler rh)
rh
- Request handler to be used, or null to disable.public void setHttpService(HttpService service)
public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |