Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.cometd
Class CometdServlet

    java.lang.Object
      HttpServlet
          org.mortbay.cometd.CometdServlet

    public class CometdServlet

extends HttpServlet

Cometd Filter Servlet implementing the `Bayeux` protocol. The Servlet can be initialized with a json file mapping channels to `DataFilter` definitions. The servlet init parameter "filters" should point to a webapplication resource containing a JSON array of filter definitions. For example:

     [
       {
         "channels": "/**",
         "class"   : "org.mortbay.cometd.filter.NoMarkupFilter",
         "init"    : {}
       }
     ]

The init parameter "timeout" specifies the poll timeout in milliseconds (default 45000). The init parameter "multiTimeout" specifies the poll timeout if multiple polls are detected from the same browser (default 0 - disable browser detection).

Author:
  gregw
See Also:
  `Bayeux}`, `ChannelPattern}`

Field Summary
`static String` | `BROWSER_ID`
`static String` | `CLIENT_ATTR`
`static String` | `MESSAGE_PARAM`
`static String` | `ORG_MORTBAY_BAYEUX`
`static String` | `TUNNEL_INIT_PARAM`

Constructor Summary
`CometdServlet()`

Method Summary
`protected void` | `doGet(HttpServletRequest req, HttpServletResponse resp)`
`protected void` | `doPost(HttpServletRequest req, HttpServletResponse resp)`
`void` | `init()`
`protected void` | `service(HttpServletRequest req, HttpServletResponse resp)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ORG_MORTBAY_BAYEUX

    public static final String ORG_MORTBAY_BAYEUX

See Also:
  Constant Field Values

### CLIENT_ATTR

    public static final String CLIENT_ATTR

See Also:
  Constant Field Values

### MESSAGE_PARAM

    public static final String MESSAGE_PARAM

See Also:
  Constant Field Values

### TUNNEL_INIT_PARAM

    public static final String TUNNEL_INIT_PARAM

See Also:
  Constant Field Values

### BROWSER_ID

    public static final String BROWSER_ID

See Also:
  Constant Field Values

Constructor Detail

### CometdServlet

    public CometdServlet()

Method Detail

### init

    public void init()
              throws ServletException

  Throws:
    `ServletException`

### service

    protected void service(HttpServletRequest req,
                           HttpServletResponse resp)
                    throws ServletException,
                           IOException

  Throws:
    `ServletException`
    `IOException`

### doPost

    protected void doPost(HttpServletRequest req,
                          HttpServletResponse resp)
                   throws ServletException,
                          IOException

  Throws:
    `ServletException`
    `IOException`

### doGet

    protected void doGet(HttpServletRequest req,
                         HttpServletResponse resp)
                  throws ServletException,
                         IOException

  Throws:
    `ServletException`
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.