public class SimpleRestInterceptor extends AtmosphereInterceptorAdapter
InvokationOrder.PRIORITY| Modifier and Type | Field and Description |
|---|---|
static String |
PROTOCOL_DETACHED_KEY
Deprecated.
always use detached mode
|
protected static String |
REQUEST_DISPATCHED |
protected static String |
REQUEST_ID |
static String |
X_ATMOSPHERE_SIMPLE_REST_PROTOCOL_DETACHED
Deprecated.
always use detached mode
|
static String |
X_REQUEST_KEY
The internal header consisting of the {tracking-id}#{request-id}
|
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 static boolean |
getBoolean(org.json.JSONObject obj,
String key) |
protected String |
getHeartbeatBroadcasterName() |
protected String |
getHeartbeatTemplate() |
protected Object[] |
getHeartbeatTemplateArguments() |
protected static String |
getString(org.json.JSONObject obj,
String key) |
Action |
inspect(AtmosphereResource r)
Invoked before an
AtmosphereResource gets dispatched to AtmosphereHandler. |
protected static boolean |
isJSONObject(byte[] b) |
protected static boolean |
isLastResponse(AtmosphereRequest request,
AtmosphereResponse response) |
protected static org.json.JSONObject |
parseJsonPart(Reader reader) |
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
public static final String X_REQUEST_KEY
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 static boolean isJSONObject(byte[] b)
protected static byte[] quote(byte[] b)
protected static org.json.JSONObject parseJsonPart(Reader reader) throws org.json.JSONException
org.json.JSONExceptionprotected static boolean getBoolean(org.json.JSONObject obj,
String key)
Copyright © 2024. All rights reserved.