public class HeartbeatInterceptor extends AtmosphereInterceptorAdapter
InvokationOrder.PRIORITY| Modifier and Type | Field and Description |
|---|---|
static String |
HEARTBEAT_FUTURE |
static String |
HEARTBEAT_INTERVAL_IN_SECONDS |
static 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) |
String |
toString() |
postInspect, prioritypublic static final String HEARTBEAT_INTERVAL_IN_SECONDS
public static final String INTERCEPTOR_ADDED
public static final 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 String toString()
toString in class AtmosphereInterceptorAdapterCopyright © 2015. All Rights Reserved.