Class AckExtension
- java.lang.Object
-
- org.cometd.client.ext.AckExtension
-
- All Implemented Interfaces:
org.cometd.bayeux.client.ClientSession.Extension
public class AckExtension extends java.lang.Object implements org.cometd.bayeux.client.ClientSession.Extension
This client-side extension enables the client to acknowledge to the server the messages that the client has received.
For the acknowledgement to work, the server must be configured with the correspondent server-side ack extension. If both client and server support the ack extension, then the ack functionality will take place automatically. By enabling this extension, all messages arriving from the server will arrive via the long poll, so the comet communication will be slightly chattier. The fact that all messages will return via long poll means also that the messages will arrive with total order, which is not guaranteed if messages can arrive via both long poll and normal response. Messages are not acknowledged one by one, but instead a group of messages is acknowledged when long poll returns.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACK_FIELD
-
Constructor Summary
Constructors Constructor Description AckExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
rcvMeta(org.cometd.bayeux.client.ClientSession session, org.cometd.bayeux.Message.Mutable message)
boolean
sendMeta(org.cometd.bayeux.client.ClientSession session, org.cometd.bayeux.Message.Mutable message)
-
-
-
Field Detail
-
ACK_FIELD
public static final java.lang.String ACK_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
rcvMeta
public boolean rcvMeta(org.cometd.bayeux.client.ClientSession session, org.cometd.bayeux.Message.Mutable message)
- Specified by:
rcvMeta
in interfaceorg.cometd.bayeux.client.ClientSession.Extension
-
sendMeta
public boolean sendMeta(org.cometd.bayeux.client.ClientSession session, org.cometd.bayeux.Message.Mutable message)
- Specified by:
sendMeta
in interfaceorg.cometd.bayeux.client.ClientSession.Extension
-
-