public class IdleResourceInterceptor extends AtmosphereInterceptorAdapter
AtmosphereResource and close it. This interceptor is useful for
tracking disconnected client that aren't detected by the network. A good example is a wireless connection
that goes down. In that case Tomcat and Jetty fail to detects the disconnect.InvokationOrder.PRIORITYAFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT| Constructor and Description |
|---|
IdleResourceInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(AtmosphereConfig config)
Configure an AtmosphereFramework object.
|
void |
destroy()
Clean the AtmosphereInterceptor when removed or when the Atmosphere is undeployed.
|
protected void |
idleResources() |
Action |
inspect(AtmosphereResource r)
Invoked before an
AtmosphereResource gets dispatched to AtmosphereHandler. |
long |
maxInactiveTime() |
IdleResourceInterceptor |
maxInactiveTime(long maxInactiveTime) |
InvokationOrder.PRIORITY |
priority()
Return the priority an AtmosphereInterceptor must be executed.
|
postInspect, toStringpublic void configure(AtmosphereConfig config)
AtmosphereConfigAwareconfigure in interface AtmosphereConfigAwareconfigure in class AtmosphereInterceptorAdapterconfig - AtmosphereConfigprotected void idleResources()
public long maxInactiveTime()
public IdleResourceInterceptor maxInactiveTime(long maxInactiveTime)
public Action inspect(AtmosphereResource r)
AtmosphereInterceptorAtmosphereResource gets dispatched to AtmosphereHandler.inspect in interface AtmosphereInterceptorinspect in class AtmosphereInterceptorAdapterr - a AtmosphereResourceAction.CONTINUE or Action.SUSPEND
to dispatch the AtmosphereResource to other AtmosphereInterceptor or AtmosphereHandler.
Return Action.TYPE.CANCELLED to stop the processing.public InvokationOrder.PRIORITY priority()
InvokationOrderpriority in interface InvokationOrderpriority in class AtmosphereInterceptorAdapterpublic void destroy()
AtmosphereInterceptordestroy in interface AtmosphereInterceptordestroy in class AtmosphereInterceptorAdapterCopyright © 2016. All rights reserved.