org.atmosphere.handler
Class AbstractReflectorAtmosphereHandler
java.lang.Object
org.atmosphere.handler.AbstractReflectorAtmosphereHandler
- All Implemented Interfaces:
- AtmosphereHandler<HttpServletRequest,HttpServletResponse>
- Direct Known Subclasses:
- ReflectorServletProcessor, WebSocketAtmosphereHandler
public abstract class AbstractReflectorAtmosphereHandler
- extends Object
- implements AtmosphereHandler<HttpServletRequest,HttpServletResponse>
Simple AtmosphereHandler that reflect every call to
Broadcaster.broadcast(java.lang.Object), e.g sent the broadcasted event back to the remote client. All broadcast will be by default returned
as it is to the suspended ServletResponse.getOutputStream()
or ServletResponse.getWriter()
- Author:
- Jean-francois Arcand
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractReflectorAtmosphereHandler
public AbstractReflectorAtmosphereHandler()
onStateChange
public void onStateChange(AtmosphereResourceEvent<HttpServletRequest,HttpServletResponse> event)
throws IOException
- Write the
AtmosphereResourceEvent.getMessage() back to the client using
the ServletResponse.getOutputStream() or ServletResponse.getWriter().
If a Serializer is defined, it will be invoked and the writ operation
will be delegated to to it.
By default, this method will try to use ServletResponse.getWriter().
- Specified by:
onStateChange in interface AtmosphereHandler<HttpServletRequest,HttpServletResponse>
- Parameters:
event - the AtmosphereResourceEvent.getMessage()
- Throws:
IOException
Copyright © 2010. All Rights Reserved.