Class BaseResource
java.lang.Object
org.apache.pulsar.client.admin.internal.BaseResource
- Direct Known Subclasses:
BookiesImpl,BrokersImpl,BrokerStatsImpl,ClustersImpl,ComponentResource,LookupImpl,NamespacesImpl,NonPersistentTopicsImpl,ProxyStatsImpl,ResourceGroupsImpl,ResourceQuotasImpl,SchemasImpl,TenantsImpl,TopicPoliciesImpl,TopicsImpl,TransactionsImpl,WorkerImpl
Abstract base class for all admin resources.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.pulsar.client.api.Authenticationprotected final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseResource(org.apache.pulsar.client.api.Authentication auth, long readTimeoutMs) -
Method Summary
Modifier and TypeMethodDescriptionasyncDeleteRequest(javax.ws.rs.client.WebTarget target) <T> voidasyncDeleteRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.InvocationCallback<T> callback) protected <T> CompletableFuture<T>asyncGetRequest(javax.ws.rs.client.WebTarget target, Class<? extends T> type) <T> voidasyncGetRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.InvocationCallback<T> callback) protected <T> CompletableFuture<T>asyncGetRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.core.GenericType<T> type) <T> CompletableFuture<T>asyncGetRequest(javax.ws.rs.client.WebTarget target, org.apache.pulsar.client.admin.internal.BaseResource.FutureCallback<T> callback) <T> CompletableFuture<Void>asyncPostRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity) <T,R> void asyncPostRequestWithResponse(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity, javax.ws.rs.client.InvocationCallback<R> callback) <T> CompletableFuture<Void>asyncPutRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity) static PulsarAdminExceptiongetApiException(javax.ws.rs.core.Response response) static StringgetReasonFromServer(javax.ws.rs.WebApplicationException e) javax.ws.rs.client.Invocation.Builderrequest(javax.ws.rs.client.WebTarget target) CompletableFuture<javax.ws.rs.client.Invocation.Builder>requestAsync(javax.ws.rs.client.WebTarget target) protected <T> Tsync(Supplier<CompletableFuture<T>> executor)
-
Field Details
-
auth
protected final org.apache.pulsar.client.api.Authentication auth -
readTimeoutMs
protected final long readTimeoutMs
-
-
Constructor Details
-
BaseResource
protected BaseResource(org.apache.pulsar.client.api.Authentication auth, long readTimeoutMs)
-
-
Method Details
-
request
public javax.ws.rs.client.Invocation.Builder request(javax.ws.rs.client.WebTarget target) throws PulsarAdminException - Throws:
PulsarAdminException
-
requestAsync
public CompletableFuture<javax.ws.rs.client.Invocation.Builder> requestAsync(javax.ws.rs.client.WebTarget target) -
asyncPutRequest
public <T> CompletableFuture<Void> asyncPutRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity) -
asyncPostRequestWithResponse
public <T,R> void asyncPostRequestWithResponse(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity, javax.ws.rs.client.InvocationCallback<R> callback) -
asyncPostRequest
public <T> CompletableFuture<Void> asyncPostRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity) -
asyncGetRequest
public <T> void asyncGetRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.InvocationCallback<T> callback) -
asyncGetRequest
public <T> CompletableFuture<T> asyncGetRequest(javax.ws.rs.client.WebTarget target, org.apache.pulsar.client.admin.internal.BaseResource.FutureCallback<T> callback) -
asyncGetRequest
protected <T> CompletableFuture<T> asyncGetRequest(javax.ws.rs.client.WebTarget target, Class<? extends T> type) -
asyncGetRequest
protected <T> CompletableFuture<T> asyncGetRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.core.GenericType<T> type) -
asyncDeleteRequest
-
asyncDeleteRequest
public <T> void asyncDeleteRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.InvocationCallback<T> callback) -
getApiException
-
getApiException
-
getReasonFromServer
-
sync
- Throws:
PulsarAdminException
-