Class BasicPingHandler
java.lang.Object
org.apache.hc.core5.http2.nio.support.BasicPingHandler
- All Implemented Interfaces:
AsyncPingHandler
Basic
AsyncPingHandler
implementation.- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Triggered to cancel the message exchange.void
consumeResponse
(ByteBuffer feedback) Triggered to signal receipt of a ping response message.void
Triggered to signal a failure in data processing.getData()
Returns content of ping message.
-
Field Details
-
PING_MESSAGE
private static final byte[] PING_MESSAGE -
callback
-
-
Constructor Details
-
BasicPingHandler
-
-
Method Details
-
getData
Description copied from interface:AsyncPingHandler
Returns content of ping message.- Specified by:
getData
in interfaceAsyncPingHandler
- Returns:
- the ping message content.
-
consumeResponse
Description copied from interface:AsyncPingHandler
Triggered to signal receipt of a ping response message.- Specified by:
consumeResponse
in interfaceAsyncPingHandler
- Parameters:
feedback
- the ping message feedback.- Throws:
HttpException
IOException
-
failed
Description copied from interface:AsyncPingHandler
Triggered to signal a failure in data processing.- Specified by:
failed
in interfaceAsyncPingHandler
- Parameters:
cause
- the cause of the failure.
-
cancel
public void cancel()Description copied from interface:AsyncPingHandler
Triggered to cancel the message exchange.- Specified by:
cancel
in interfaceAsyncPingHandler
-