org.atmosphere.handler
Class AbstractReflectorAtmosphereHandler

java.lang.Object
  extended by org.atmosphere.handler.AbstractReflectorAtmosphereHandler
All Implemented Interfaces:
AtmosphereHandler<HttpServletRequest,HttpServletResponse>
Direct Known Subclasses:
ReflectorServletProcessor

public abstract class AbstractReflectorAtmosphereHandler
extends Object
implements AtmosphereHandler<HttpServletRequest,HttpServletResponse>

Simple AtmosphereHandler that relect every call to Broadcaster.broadcast(F). All broadcast will be by default returned as it is to the suspended ServletResponse.getOutputStream() or ServletResponse.getWriter()

Author:
jeanfrancoisarcand

Constructor Summary
AbstractReflectorAtmosphereHandler()
           
 
Method Summary
 AtmosphereEvent onMessage(AtmosphereEvent<HttpServletRequest,HttpServletResponse> event)
          Write the AtmosphereEvent.getMessage() back to the client using the ServletResponse.getOutputStream() or ServletResponse.getWriter() By default, this method will try to use ServletResponse.getWriter().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.atmosphere.cpr.AtmosphereHandler
onEvent
 

Constructor Detail

AbstractReflectorAtmosphereHandler

public AbstractReflectorAtmosphereHandler()
Method Detail

onMessage

public AtmosphereEvent onMessage(AtmosphereEvent<HttpServletRequest,HttpServletResponse> event)
                          throws IOException
Write the AtmosphereEvent.getMessage() back to the client using the ServletResponse.getOutputStream() or ServletResponse.getWriter() By default, this method will try to use ServletResponse.getWriter().

Specified by:
onMessage in interface AtmosphereHandler<HttpServletRequest,HttpServletResponse>
Parameters:
event - the AtmosphereEvent.getMessage()
Returns:
event the AtmosphereEvent.getMessage()
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.