Package org.cometd.server.ext
Class AcknowledgedMessagesExtension
- java.lang.Object
-
- org.cometd.server.ext.AcknowledgedMessagesExtension
-
- All Implemented Interfaces:
BayeuxServer.Extension
public class AcknowledgedMessagesExtension extends java.lang.Object implements BayeuxServer.Extension
Installing this extension in a
BayeuxServer
provides support for server-to-client message acknowledgement if a client also supports it.The main role of this extension is to install the
AcknowledgedMessagesSessionExtension
on theServerSession
instances created during successful handshakes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AcknowledgedMessagesExtension.Listener
A listener for acknowledgement events.
-
Constructor Summary
Constructors Constructor Description AcknowledgedMessagesExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(AcknowledgedMessagesExtension.Listener listener)
protected AcknowledgedMessagesSessionExtension
newSessionExtension(ServerSession session)
boolean
rcvMeta(ServerSession remote, ServerMessage.Mutable message)
Blocking version ofBayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)
for meta messages.void
removeListener(AcknowledgedMessagesExtension.Listener listener)
-
-
-
Method Detail
-
addListener
public void addListener(AcknowledgedMessagesExtension.Listener listener)
-
removeListener
public void removeListener(AcknowledgedMessagesExtension.Listener listener)
-
rcvMeta
public boolean rcvMeta(ServerSession remote, ServerMessage.Mutable message)
Description copied from interface:BayeuxServer.Extension
Blocking version of
BayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)
for meta messages.- Specified by:
rcvMeta
in interfaceBayeuxServer.Extension
- Parameters:
remote
- the session that sent the messagemessage
- the incoming message- Returns:
- whether message processing should continue
-
newSessionExtension
protected AcknowledgedMessagesSessionExtension newSessionExtension(ServerSession session)
-
-