flex.messaging
Class MessageBrokerServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by flex.messaging.MessageBrokerServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class MessageBrokerServlet
extends javax.servlet.http.HttpServlet

The MessageBrokerServlet bootstraps the MessageBroker, adds endpoints to it, and starts the broker. The servlet also acts as a facade for all http-based endpoints, in that the servlet receives the http request and then delegates to an endpoint that can handle the request's content type. This does not occur for non-http endpoints, such as the rtmp endpoint.

See Also:
MessageBroker, Serialized Form

Field Summary
static String LOG_CATEGORY_STARTUP_BROKER
           
 
Constructor Summary
MessageBrokerServlet()
           
 
Method Summary
 void destroy()
          Stops all endpoints in the MessageBroker, giving them a chance to perform any endpoint-specific clean up.
 void init(javax.servlet.ServletConfig servletConfig)
          Initializes the servlet in its web container, then creates the MessageBroker and adds Endpoints and Services to that broker.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handle an incoming request, and delegate to an endpoint based on content type, if appropriate.
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_CATEGORY_STARTUP_BROKER

public static final String LOG_CATEGORY_STARTUP_BROKER
See Also:
Constant Field Values
Constructor Detail

MessageBrokerServlet

public MessageBrokerServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException,
                 javax.servlet.UnavailableException
Initializes the servlet in its web container, then creates the MessageBroker and adds Endpoints and Services to that broker. This servlet may keep a reference to an endpoint if it needs to delegate to it in the service method.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException
javax.servlet.UnavailableException

destroy

public void destroy()
Stops all endpoints in the MessageBroker, giving them a chance to perform any endpoint-specific clean up.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
Handle an incoming request, and delegate to an endpoint based on content type, if appropriate. The content type mappings for endpoints are not externally configurable, and currently the AmfEndpoint is the only delegate.

Overrides:
service in class javax.servlet.http.HttpServlet


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/MessageBrokerServlet.html