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)
Allow this object to configure its state when initialized.
|
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)
AtmosphereInterceptorconfigure in interface AtmosphereInterceptorconfigure in class AtmosphereInterceptorAdapterconfig - an 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 AtmosphereInterceptorAdapterCopyright © 2016. All Rights Reserved.