JXTA

net.jxta.impl.endpoint.servlethttp
Class HttpMessageServlet

java.lang.Object
  extended by HttpServlet
      extended by net.jxta.impl.endpoint.servlethttp.HttpMessageServlet

public class HttpMessageServlet
extends HttpServlet

This is a simple servlet that accepts JXTA Messages from clients using HTTP via POST. In addition to receiving messages via POST responses clients can also poll for messages using GET.

It also supports a ping operation. When the URI is / the response consists of the unique value portion of the local peer id.


Constructor Summary
HttpMessageServlet()
           
 
Method Summary
 void destroy()
          
 void doGet(HttpServletRequest req, HttpServletResponse res)
          
 void doPost(HttpServletRequest req, HttpServletResponse res)
          
 void init(ServletConfig config)
          Recovers the Message Transport which owns this servlet from the context information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpMessageServlet

public HttpMessageServlet()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Recovers the Message Transport which owns this servlet from the context information.

Throws:
ServletException

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
           throws ServletException,
                  IOException

Throws:
ServletException
IOException

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException

Throws:
ServletException
IOException

destroy

public void destroy()


JXSE