public class SimpleRestInterceptor extends AtmosphereInterceptorAdapter
InvokationOrder.PRIORITY| Modifier and Type | Field and Description |
|---|---|
static String |
PROTOCOL_DETACHED_KEY
Servlet init property to enable the detached mode in the response
|
protected static String |
REQUEST_DISPATCHED |
protected static String |
REQUEST_ID |
static String |
X_ATMOSPHERE_SIMPLE_REST_PROTOCOL_DETACHED
Connection request property to enable the detached mode in the response
|
AFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT| Constructor and Description |
|---|
SimpleRestInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(AtmosphereConfig config)
Configure an AtmosphereFramework object.
|
protected AtmosphereRequest |
createAtmosphereRequest(AtmosphereRequest request,
String body) |
protected byte[] |
createResponse(AtmosphereResponse response,
byte[] payload) |
protected String |
getHeartbeatBroadcasterName() |
protected String |
getHeartbeatTemplate() |
protected Object[] |
getHeartbeatTemplateArguments() |
Action |
inspect(AtmosphereResource r)
Invoked before an
AtmosphereResource gets dispatched to AtmosphereHandler. |
protected boolean |
isDetached(AtmosphereRequest request) |
protected static boolean |
isJSONObject(byte[] b) |
protected static boolean |
isLastResponse(AtmosphereRequest request,
AtmosphereResponse response) |
protected static byte[] |
quote(byte[] b) |
destroy, postInspect, priority, toStringpublic static final String PROTOCOL_DETACHED_KEY
public static final String X_ATMOSPHERE_SIMPLE_REST_PROTOCOL_DETACHED
protected static final String REQUEST_DISPATCHED
protected static final String REQUEST_ID
public void configure(AtmosphereConfig config)
AtmosphereConfigAwareconfigure in interface AtmosphereConfigAwareconfigure in class AtmosphereInterceptorAdapterconfig - 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.protected String getHeartbeatBroadcasterName()
protected String getHeartbeatTemplate()
protected Object[] getHeartbeatTemplateArguments()
protected AtmosphereRequest createAtmosphereRequest(AtmosphereRequest request, String body) throws IOException
IOExceptionprotected byte[] createResponse(AtmosphereResponse response, byte[] payload)
protected static boolean isLastResponse(AtmosphereRequest request, AtmosphereResponse response)
protected boolean isDetached(AtmosphereRequest request)
protected static boolean isJSONObject(byte[] b)
protected static byte[] quote(byte[] b)
Copyright © 2016. All rights reserved.