org.eclipse.jetty.osgi.equinoxtools.console
Class EquinoxConsoleWebSocketServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.eclipse.jetty.websocket.WebSocketServlet
              extended by org.eclipse.jetty.osgi.equinoxtools.console.EquinoxConsoleWebSocketServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig, WebConsoleWriterOutputStream.OnFlushListener, WebSocketFactory.Acceptor

public class EquinoxConsoleWebSocketServlet
extends WebSocketServlet
implements WebConsoleWriterOutputStream.OnFlushListener

Websocket version of the Chat with equinox. Ported from jetty's example 'WebSocketChatServlet'

See Also:
Serialized Form

Constructor Summary
EquinoxConsoleWebSocketServlet()
           
EquinoxConsoleWebSocketServlet(WebConsoleSession consoleSession, EquinoxChattingSupport support)
           
 
Method Summary
 void destroy()
           
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
 WebSocket doWebSocketConnect(HttpServletRequest request, String protocol)
           
 void init()
           
 void onFlush()
          Called right after the flush method on the output stream has been executed.
 
Methods inherited from class org.eclipse.jetty.websocket.WebSocketServlet
checkOrigin, service
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EquinoxConsoleWebSocketServlet

public EquinoxConsoleWebSocketServlet()

EquinoxConsoleWebSocketServlet

public EquinoxConsoleWebSocketServlet(WebConsoleSession consoleSession,
                                      EquinoxChattingSupport support)
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class WebSocketServlet
Throws:
ServletException
See Also:
GenericServlet.init()

destroy

public void destroy()
Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doWebSocketConnect

public WebSocket doWebSocketConnect(HttpServletRequest request,
                                    String protocol)
Specified by:
doWebSocketConnect in interface WebSocketFactory.Acceptor

onFlush

public void onFlush()
Called right after the flush method on the output stream has been executed.

Specified by:
onFlush in interface WebConsoleWriterOutputStream.OnFlushListener


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.