public interface AssociationListener
The listener interface for receiving the underlying socket status and
received payload from peer. The class that is interested in receiving data
must implement this interface, and the object created with that class is
registered with Association
| Modifier and Type | Method and Description |
|---|---|
void |
inValidStreamId(PayloadData payloadData)
The stream id set in outgoing
PayloadData is invalid. |
void |
onCommunicationLost(Association association)
Invoked when underlying socket lost the connection with peer due to any
reason like network between peer's died etc.
|
void |
onCommunicationRestart(Association association)
Invoked when the connection with the peer re-started.
|
void |
onCommunicationShutdown(Association association)
Invoked when underlying socket is shutdown and connection is ended with
peer.
|
void |
onCommunicationUp(Association association,
int maxInboundStreams,
int maxOutboundStreams)
Invoked when underlying socket is open and connection is established with
peer.
|
void |
onPayload(Association association,
PayloadData payloadData)
Invoked when the
PayloadData is received from peer |
void onCommunicationUp(Association association, int maxInboundStreams, int maxOutboundStreams)
Associationassociation - maxInboundStreams - Returns the maximum number of inbound streams that this
association supports. Data received on this association will
be on stream number s, where 0 <= s < maxInboundStreams(). For
TCP socket this value is always 1maxOutboundStreams - Returns the maximum number of outbound streams that this
association supports. Data sent on this association must be on
stream number s, where 0 <= s < maxOutboundStreams(). For TCP
socket this value is always 1void onCommunicationShutdown(Association association)
Associationassociation - void onCommunicationLost(Association association)
Association should try to re-establish the
connectionassociation - void onCommunicationRestart(Association association)
association - void onPayload(Association association, PayloadData payloadData)
PayloadData is received from peerassociation - payloadData - void inValidStreamId(PayloadData payloadData)
The stream id set in outgoing PayloadData is invalid. This packe
will be dropped after calling the listener.
This callback is on same Thread as SelectorThread. Do not delay
the process here as it will hold all other IO.
payloadData - Copyright © 2017. All Rights Reserved.