
org.postgresql.adba.communication.network.CloseResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pgadba Show documentation
Show all versions of pgadba Show documentation
ADBA implementation for PostgreSQL
The newest version!
package org.postgresql.adba.communication.network;
import java.io.IOException;
import jdk.incubator.sql2.Submission;
import org.postgresql.adba.communication.NetworkReadContext;
import org.postgresql.adba.communication.NetworkResponse;
public class CloseResponse implements NetworkResponse {
private final Submission submission;
public CloseResponse(Submission submission) {
this.submission = submission;
}
@Override
public NetworkResponse read(NetworkReadContext context) throws IOException {
submission.getCompletionStage().toCompletableFuture().complete(null);
return null;
}
@Override
public NetworkResponse handleException(Throwable ex) {
submission.getCompletionStage().toCompletableFuture().completeExceptionally(ex);
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy