fipaos.mts.httpMTP
Class ConnectionThread
java.lang.Object
|
+--fipaos.mts.httpMTP.ThreadingAbility
|
+--fipaos.mts.httpMTP.ConnectionThread
- public class ConnectionThread
- extends ThreadingAbility
ConnectionThread carries out all communication for a specific Client connection.
Method Summary |
protected void |
doGet()
A FIPA server does not need to implement GET. |
protected void |
doPost()
Responds to POST request. |
protected void |
runImplementation()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionThread
public ConnectionThread(java.net.Socket connection,
CallBack backRef)
doGet
protected void doGet()
throws java.io.IOException
- A FIPA server does not need to implement GET. This has been added to
allow a simple test of the server from a browser. Knowing it is a GET
request we ignore anything else that has been sent and return the
TEST_PAGE
doPost
protected void doPost()
throws java.io.IOException
- Responds to POST request. Parses the HTTP header and extracts various details.
One of these is the
boundary
that is present in the MIME content
separating the Envelope
and the ACL message
. It also
marks the end of the content. If this is valid then the MIME content is parsed
and the resulting Envelope
and ACL message
are
passed into the FIPA-OS comms stack. A HTTP header is returned to the sender
indicating the result.
runImplementation
protected void runImplementation()
- Overrides:
runImplementation
in class ThreadingAbility