Top Description Fields Constructors Methods
org.apache.hc.core5.http2.nio.support

public Class BasicPingHandler

extends Object
implements AsyncPingHandler
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http2.nio.AsyncPingHandler
Imports
java.io.IOException, java.nio.ByteBuffer, org.apache.hc.core5.function.Callback, org.apache.hc.core5.http.HttpException, org.apache.hc.core5.http2.nio.AsyncPingHandler, org.apache.hc.core5.util.Args

Basic AsyncPingHandler implementation.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final Callback<Boolean>
private static final byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.cancel.

Triggered to cancel the message exchange.
public void
consumeResponse(final ByteBuffer
the ping message feedback.
feedback
)

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.consumeResponse.

Triggered to signal receipt of a ping response message.
public void
failed(final Exception
the cause of the failure.
cause
)

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.failed.

Triggered to signal a failure in data processing.
public ByteBuffer
getData()

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.getData.

Returns content of ping message.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

callbackback to summary
private final Callback<Boolean> callback
PING_MESSAGEback to summary
private static final byte[] PING_MESSAGE

Constructor Detail

BasicPingHandlerback to summary
public BasicPingHandler(final Callback<Boolean> callback)

Method Detail

cancelback to summary
public void cancel()

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.cancel.

Doc from org.apache.hc.core5.http2.nio.AsyncPingHandler.cancel.

Triggered to cancel the message exchange.

Annotations
@Override
consumeResponseback to summary
public void consumeResponse(final ByteBuffer feedback) throws HttpException, IOException

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.consumeResponse.

Doc from org.apache.hc.core5.http2.nio.AsyncPingHandler.consumeResponse.

Triggered to signal receipt of a ping response message.

Parameters
feedback:ByteBuffer

the ping message feedback.

Annotations
@Override
failedback to summary
public void failed(final Exception cause)

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.failed.

Doc from org.apache.hc.core5.http2.nio.AsyncPingHandler.failed.

Triggered to signal a failure in data processing.

Parameters
cause:Exception

the cause of the failure.

Annotations
@Override
getDataback to summary
public ByteBuffer getData()

Implements org.apache.hc.core5.http2.nio.AsyncPingHandler.getData.

Doc from org.apache.hc.core5.http2.nio.AsyncPingHandler.getData.

Returns content of ping message.

Returns:ByteBuffer

the ping message content.

Annotations
@Override