public class MessageLengthInterceptor extends AtmosphereInterceptorAdapter
AtmosphereInterceptor that add a special String "|" at the end of a message, allowing the
atmosphere.js to detect if one or several messages where aggregated in one write operations.
The special String is configurable using ApplicationConfig.MESSAGE_DELIMITER| Constructor and Description |
|---|
MessageLengthInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(AtmosphereConfig config)
Allow this object to configure it's state when initialized
|
Action |
inspect(AtmosphereResource r)
Invoked before an
AtmosphereResource gets dispatched to AtmosphereHandler |
java.lang.String |
toString() |
postInspectpublic void configure(AtmosphereConfig config)
AtmosphereInterceptorconfigure in interface AtmosphereInterceptorconfigure in class AtmosphereInterceptorAdapterconfig - an AtmosphereConfigpublic Action inspect(AtmosphereResource r)
AtmosphereInterceptorAtmosphereResource gets dispatched to AtmosphereHandlerinspect 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 java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.