|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.handler.AbstractReflectorAtmosphereHandler
org.atmosphere.handler.ReflectorServletProcessor
public class ReflectorServletProcessor
Simple AtmosphereServletProcessor that delegate the AtmosphereHandler.onEvent(org.atmosphere.cpr.AtmosphereEvent
to a set of FilterChain and Servlet#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
and store the {@link AtmosphereEvent} as a {@link HttpServletRequest} attribute named
org.atmosphere.cpr.AtmosphereEvent. The {@link AtmosphereEvent} can later be retrieved
and used to supend/resume and broadcast
| Field Summary | |
|---|---|
static String |
ATMOSPHERE_EVENT
|
static String |
ATMOSPHERE_HANDLER
|
| Constructor Summary | |
|---|---|
ReflectorServletProcessor()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the AtmosphereServletProcessor |
String |
getServletClass()
Set the Servlet class. |
void |
init(ServletConfig sc)
Initialize the AtmosphereServletProcessor using the E |
AtmosphereEvent |
onEvent(AtmosphereEvent<HttpServletRequest,HttpServletResponse> event)
Delegate the request to the Servlet.service method, and add the AtmosphereEvent
to the HttpServletRequest#setAttribute(java.lang.String, java.lang.Object)). |
void |
setFilterClass(String filterClass)
Add a FilterClass. |
void |
setServletClass(String servletClass)
Return the Servlet class name. |
| Methods inherited from class org.atmosphere.handler.AbstractReflectorAtmosphereHandler |
|---|
onMessage |
| 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 |
|---|
onMessage |
| Field Detail |
|---|
public static final String ATMOSPHERE_EVENT
public static final String ATMOSPHERE_HANDLER
| Constructor Detail |
|---|
public ReflectorServletProcessor()
| Method Detail |
|---|
public AtmosphereEvent onEvent(AtmosphereEvent<HttpServletRequest,HttpServletResponse> event)
throws IOException
AtmosphereEvent
to the HttpServletRequest#setAttribute(java.lang.String, java.lang.Object)).
The AtmosphereEvent can ve retrieved using ATMOSPHERE_EVENT
value.
onEvent in interface AtmosphereHandler<HttpServletRequest,HttpServletResponse>event - The AtmosphereEvent
AtmosphereEvent
IOException
public void init(ServletConfig sc)
throws ServletException
AtmosphereServletProcessorAtmosphereServletProcessor using the E
init in interface AtmosphereServletProcessorsc - the E
ServletExceptionpublic void destroy()
AtmosphereServletProcessorAtmosphereServletProcessor
destroy in interface AtmosphereServletProcessorpublic String getServletClass()
public void setServletClass(String servletClass)
servletClass - the servletClass to setpublic void setFilterClass(String filterClass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||