- All Implemented Interfaces:
- com.sun.net.httpserver.HttpHandler
public class MessageHandler
extends java.lang.Object
implements com.sun.net.httpserver.HttpHandler
MessageHandler implements HttpHandler for http servers. It handles HTTP
requests and converts them into JMS messages before passing them to the
assigned message service as requests. Once a response message is back,
it converts the message to JSON content and sends the content back to the
HTTP client as the response. Therefore, MessageHandler is the frontend and
the gateway for message services. It is responsible for transformations
between HTTP requests/responses and JMS messages.
N.B. The name of the handler is supposed to be same as the substring of
the context path starting from the 2nd character (after the beginning "/").
- Author:
- yannanlu@yahoo.com