Package com.kristensoft.kdc
Interface KristenHttpServerEventHandler
-
- All Known Implementing Classes:
KristenHttpServerEventAdapter
public interface KristenHttpServerEventHandlerReceives lifecycle, context, and agent events from aKristenHttpServer.Implementations may be registered with
KristenHttpServerParametersto receive notifications as the HTTP server is created, started, stopped, and processes HTTP contexts and agents.Applications interested in only selected events may extend
KristenHttpServerEventAdapterinstead of implementing every method in this interface.- Author:
- Charles B. Kozoyed
- See Also:
KristenHttpServer,KristenHttpServerEventAdapter,KristenHttpServerParameters
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonAgentReceived(Agent agent)Called when an agent has been received by the HTTP server.voidonDefaultContextCreated(com.sun.net.httpserver.HttpContext context)Called when the default HTTP context has been created.voidonHttpContextCreated(com.sun.net.httpserver.HttpContext context)Called when an HTTP context has been created.voidonHttpContextRemoved(com.sun.net.httpserver.HttpContext context)Called when an HTTP context has been removed.voidonHttpContextRemoved(String path)Called when an HTTP context has been removed.voidonHttpServerCreated(com.sun.net.httpserver.HttpServer httpServer)Called when the underlying HTTP server has been created.voidonHttpServerStarted(com.sun.net.httpserver.HttpServer httpServer)Called when the underlying HTTP server has started.voidonHttpServerStopped()Called when the underlying HTTP server has stopped.
-
-
-
Method Detail
-
onHttpServerCreated
void onHttpServerCreated(com.sun.net.httpserver.HttpServer httpServer)
Called when the underlying HTTP server has been created.- Parameters:
httpServer- the HTTP server that was created
-
onDefaultContextCreated
void onDefaultContextCreated(com.sun.net.httpserver.HttpContext context)
Called when the default HTTP context has been created.- Parameters:
context- the default HTTP context that was created
-
onHttpServerStarted
void onHttpServerStarted(com.sun.net.httpserver.HttpServer httpServer)
Called when the underlying HTTP server has started.- Parameters:
httpServer- the HTTP server that was started
-
onHttpServerStopped
void onHttpServerStopped()
Called when the underlying HTTP server has stopped.
-
onHttpContextCreated
void onHttpContextCreated(com.sun.net.httpserver.HttpContext context)
Called when an HTTP context has been created.- Parameters:
context- the HTTP context that was created
-
onHttpContextRemoved
void onHttpContextRemoved(com.sun.net.httpserver.HttpContext context)
Called when an HTTP context has been removed.- Parameters:
context- the HTTP context that was removed
-
onHttpContextRemoved
void onHttpContextRemoved(String path)
Called when an HTTP context has been removed.- Parameters:
path- the path of the HTTP context that was removed
-
onAgentReceived
void onAgentReceived(Agent agent)
Called when an agent has been received by the HTTP server.- Parameters:
agent- the agent that was received
-
-