|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.naokishibata.generic.TinyHttpd
public class TinyHttpd
This class implements a tiny HTTP server whose responses can be generated by a method given by a user.
Nested Class Summary | |
---|---|
static interface |
TinyHttpd.Responder
An interface for a callback method with which the server response can be generated by a method given by the user. |
static class |
TinyHttpd.Response
This class represents a HTTP response given by this server class |
Constructor Summary | |
---|---|
TinyHttpd(int port,
TinyHttpd.Responder res)
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
An example implementation of an HTTP server. |
void |
run()
Do not call |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TinyHttpd(int port, TinyHttpd.Responder res) throws java.io.IOException
port
- The port number on which the created server will
listen.res
- The responder method which will generate responses from the server.
java.io.IOException
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |