use of org.apache.pulsar.common.protocol.schema.IsCompatibilityResponse in project pulsar by apache.
the class SchemasImpl method testCompatibilityAsync.
@Override
public CompletableFuture<IsCompatibilityResponse> testCompatibilityAsync(String topic, PostSchemaPayload payload) {
TopicName tn = TopicName.get(topic);
final CompletableFuture<IsCompatibilityResponse> future = new CompletableFuture<>();
try {
request(compatibilityPath(tn)).async().post(Entity.json(payload), new InvocationCallback<IsCompatibilityResponse>() {
@Override
public void completed(IsCompatibilityResponse isCompatibilityResponse) {
future.complete(isCompatibilityResponse);
}
@Override
public void failed(Throwable throwable) {
future.completeExceptionally(getApiException(throwable.getCause()));
}
});
} catch (PulsarAdminException cae) {
future.completeExceptionally(cae);
}
return future;
}
use of org.apache.pulsar.common.protocol.schema.IsCompatibilityResponse in project pulsar by yahoo.
the class SchemasImpl method testCompatibilityAsync.
@Override
public CompletableFuture<IsCompatibilityResponse> testCompatibilityAsync(String topic, PostSchemaPayload payload) {
TopicName tn = TopicName.get(topic);
final CompletableFuture<IsCompatibilityResponse> future = new CompletableFuture<>();
try {
request(compatibilityPath(tn)).async().post(Entity.json(payload), new InvocationCallback<IsCompatibilityResponse>() {
@Override
public void completed(IsCompatibilityResponse isCompatibilityResponse) {
future.complete(isCompatibilityResponse);
}
@Override
public void failed(Throwable throwable) {
future.completeExceptionally(getApiException(throwable.getCause()));
}
});
} catch (PulsarAdminException cae) {
future.completeExceptionally(cae);
}
return future;
}
use of org.apache.pulsar.common.protocol.schema.IsCompatibilityResponse in project incubator-pulsar by apache.
the class SchemasImpl method testCompatibilityAsync.
@Override
public CompletableFuture<IsCompatibilityResponse> testCompatibilityAsync(String topic, PostSchemaPayload payload) {
TopicName tn = TopicName.get(topic);
final CompletableFuture<IsCompatibilityResponse> future = new CompletableFuture<>();
try {
request(compatibilityPath(tn)).async().post(Entity.json(payload), new InvocationCallback<IsCompatibilityResponse>() {
@Override
public void completed(IsCompatibilityResponse isCompatibilityResponse) {
future.complete(isCompatibilityResponse);
}
@Override
public void failed(Throwable throwable) {
future.completeExceptionally(getApiException(throwable.getCause()));
}
});
} catch (PulsarAdminException cae) {
future.completeExceptionally(cae);
}
return future;
}
Aggregations