|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectTestServer
public class TestServer
Simple test program demonstrating use of the Sandstorm http library. Creates a simple HTTP server which coughs up a static web page for each request.
| Field Summary | |
|---|---|
private static boolean |
DEBUG
|
private SinkIF |
mysink
|
private static int |
PORT
|
| Constructor Summary | |
|---|---|
TestServer()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Called when an event handler is destroyed. |
void |
handleEvent(QueueElementIF item)
Handle the event corresponding to the given QueueElementIF. |
void |
handleEvents(QueueElementIF[] items)
Handle the events corresponding to the given QueueElementIF array. |
private void |
handleRequest(httpRequest req)
|
void |
init(ConfigDataIF config)
Called when an event handler is initialized. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final boolean DEBUG
private static final int PORT
private SinkIF mysink
| Constructor Detail |
|---|
public TestServer()
| Method Detail |
|---|
public void init(ConfigDataIF config)
throws java.lang.Exception
EventHandlerIF
init in interface EventHandlerIFconfig - The set of configuration parameters for the stage.
java.lang.Exception - The EventHandler can indicate an
error to the runtime during initialization by throwing an
Exception.public void destroy()
EventHandlerIF
destroy in interface EventHandlerIFpublic void handleEvent(QueueElementIF item)
EventHandlerIF
handleEvent in interface EventHandlerIFpublic void handleEvents(QueueElementIF[] items)
EventHandlerIF
handleEvents in interface EventHandlerIFprivate void handleRequest(httpRequest req)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||