class ClientAsyncResponse extends ClientResponse implements ClientListenerAsyncResponse {
    /** Future for response. */
    private final IgniteInternalFuture<? extends ClientListenerResponse> fut;

    /**
     * Constructs async response.
     */
    public ClientAsyncResponse(long reqId, IgniteInternalFuture<? extends ClientListenerResponse> fut) {
        super(reqId);

        this.fut = fut;
    }

    /** {@inheritDoc} */
    @Override public IgniteInternalFuture<? extends ClientListenerResponse> future() {
        return fut;
    }

    /** {@inheritDoc} */
    @Override public int status() {
        assert fut.isDone();

        try {
            return fut.get().status();
        }
        catch (Exception e) {
            return STATUS_FAILED;
        }
    }

    /** {@inheritDoc} */
    @Override protected void status(int status) {
        throw new IllegalStateException();
    }

    /** {@inheritDoc} */
    @Override public String error() {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override protected void error(String err) {
        throw new IllegalStateException();
    }

    /** {@inheritDoc} */
    @Override public void onSent() {
        assert fut.isDone();

        try {
            fut.get().onSent();
        }
        catch (Exception ignore) {
            // Ignore.
        }
    }
}

        assert fut.isDone();

        try {
            return fut.get().error();
        }
        catch (Exception e) {
            return e.getMessage();
        }
    
<methods>public void <init>(long) ,public void <init>(long, java.lang.String) ,public void <init>(long, int, java.lang.String) ,public void encode(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext, org.apache.ignite.internal.binary.BinaryRawWriterEx, org.apache.ignite.internal.processors.platform.client.ClientAffinityTopologyVersion) ,public void encode(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext, org.apache.ignite.internal.binary.BinaryRawWriterEx) ,public long requestId() <variables>private final non-sealed long reqId