org.ops4j.pax.logging.example
Class TestHandler
java.lang.Object
org.ops4j.pax.logging.example.TestHandler
- All Implemented Interfaces:
- java.io.Serializable, org.mortbay.http.HttpHandler, org.mortbay.util.LifeCycle
public class TestHandler
- extends java.lang.Object
- implements org.mortbay.http.HttpHandler
This is a pure test class, which is handles the requests on port 8080 in this example.
Jetty 4.2 used Jakarta Commons Logging, and we are showing that in combination with Log4J
usage in this particular class.
- See Also:
- Serialized Form
|
Method Summary |
org.mortbay.http.HttpContext |
getHttpContext()
|
java.lang.String |
getName()
|
void |
handle(java.lang.String string,
java.lang.String string1,
org.mortbay.http.HttpRequest httpRequest,
org.mortbay.http.HttpResponse httpResponse)
|
void |
initialize(org.mortbay.http.HttpContext httpContext)
|
boolean |
isStarted()
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestHandler
public TestHandler(java.lang.String name)
getName
public java.lang.String getName()
- Specified by:
getName in interface org.mortbay.http.HttpHandler
getHttpContext
public org.mortbay.http.HttpContext getHttpContext()
- Specified by:
getHttpContext in interface org.mortbay.http.HttpHandler
initialize
public void initialize(org.mortbay.http.HttpContext httpContext)
- Specified by:
initialize in interface org.mortbay.http.HttpHandler
handle
public void handle(java.lang.String string,
java.lang.String string1,
org.mortbay.http.HttpRequest httpRequest,
org.mortbay.http.HttpResponse httpResponse)
throws java.io.IOException
- Specified by:
handle in interface org.mortbay.http.HttpHandler
- Throws:
java.io.IOException
start
public void start()
throws java.lang.Exception
- Specified by:
start in interface org.mortbay.util.LifeCycle
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.InterruptedException
- Specified by:
stop in interface org.mortbay.util.LifeCycle
- Throws:
java.lang.InterruptedException
isStarted
public boolean isStarted()
- Specified by:
isStarted in interface org.mortbay.util.LifeCycle
Copyright © 2008. All Rights Reserved.