public class HeartbeatInterceptor extends AtmosphereInterceptorAdapter
InvokationOrder.PRIORITY| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HEARTBEAT_FUTURE |
static java.lang.String |
HEARTBEAT_INTERVAL_IN_SECONDS |
static java.lang.String |
INTERCEPTOR_ADDED |
AFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT| Constructor and Description |
|---|
HeartbeatInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
HeartbeatInterceptor |
clock(AtmosphereResource r,
AtmosphereRequest request,
AtmosphereResponse response) |
void |
configure(AtmosphereConfig config)
Allow this object to configure its state when initialized.
|
HeartbeatInterceptor |
heartbeatFrequencyInSeconds(int heartbeatFrequencyInSeconds) |
Action |
inspect(AtmosphereResource r)
Invoked before an
AtmosphereResource gets dispatched to AtmosphereHandler. |
HeartbeatInterceptor |
paddingText(byte[] paddingBytes) |
java.lang.String |
toString() |
postInspect, prioritypublic static final java.lang.String HEARTBEAT_INTERVAL_IN_SECONDS
public static final java.lang.String INTERCEPTOR_ADDED
public static final java.lang.String HEARTBEAT_FUTURE
public HeartbeatInterceptor paddingText(byte[] paddingBytes)
public HeartbeatInterceptor heartbeatFrequencyInSeconds(int heartbeatFrequencyInSeconds)
public void configure(AtmosphereConfig config)
AtmosphereInterceptorconfigure in interface AtmosphereInterceptorconfigure in class AtmosphereInterceptorAdapterconfig - an AtmosphereConfigpublic 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 HeartbeatInterceptor clock(AtmosphereResource r, AtmosphereRequest request, AtmosphereResponse response)
public java.lang.String toString()
toString in class AtmosphereInterceptorAdapterCopyright © 2018. All Rights Reserved.