Package org.cometd.client.transport
Interface TransportListener
- All Known Implementing Classes:
TransportListener.Empty
public interface TransportListener
Abstracts the communication between BayeuxClient and ClientTransport.
A TransportListener is associated to every batch of messages being sent,
and notified when responses for those messages come back, or a failure occurs.
- See Also:
MessageClientTransport
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTransportListener.Empty -
Method Summary
Modifier and Type Method Description voidonFailure(Throwable failure, List<? extends org.cometd.bayeux.Message> messages)Callback method invoked when a failure to send or receive messages occurs.voidonMessages(List<org.cometd.bayeux.Message.Mutable> messages)Callback method invoked when a batch of message is received.voidonSending(List<? extends org.cometd.bayeux.Message> messages)Callback method invoked when the batch of messages is being sent.
-
Method Details
-
onSending
Callback method invoked when the batch of messages is being sent.- Parameters:
messages- the batch of messages being sent
-
onMessages
Callback method invoked when a batch of message is received.- Parameters:
messages- the batch of messages received
-
onFailure
Callback method invoked when a failure to send or receive messages occurs.- Parameters:
failure- the failure occurredmessages- the batch of messages being sent
-