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
public abstract class BaseResource extends java.lang.ObjectAbstract base class for all admin resources.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.pulsar.client.api.Authenticationauthprotected longreadTimeoutMs
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseResource(org.apache.pulsar.client.api.Authentication auth, long readTimeoutMs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>asyncDeleteRequest(javax.ws.rs.client.WebTarget target)<T> voidasyncDeleteRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.InvocationCallback<T> callback)<T> voidasyncGetRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.InvocationCallback<T> callback)<T> java.util.concurrent.CompletableFuture<java.lang.Void>asyncPostRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity)<T> java.util.concurrent.CompletableFuture<java.lang.Void>asyncPutRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity)org.apache.pulsar.client.admin.PulsarAdminExceptiongetApiException(java.lang.Throwable e)org.apache.pulsar.client.admin.PulsarAdminExceptiongetApiException(javax.ws.rs.core.Response response)static java.lang.StringgetReasonFromServer(javax.ws.rs.WebApplicationException e)javax.ws.rs.client.Invocation.Builderrequest(javax.ws.rs.client.WebTarget target)java.util.concurrent.CompletableFuture<javax.ws.rs.client.Invocation.Builder>requestAsync(javax.ws.rs.client.WebTarget target)protected <T> Tsync(java.util.function.Supplier<java.util.concurrent.CompletableFuture<T>> executor)
-
-
-
Method Detail
-
request
public javax.ws.rs.client.Invocation.Builder request(javax.ws.rs.client.WebTarget target) throws org.apache.pulsar.client.admin.PulsarAdminException- Throws:
org.apache.pulsar.client.admin.PulsarAdminException
-
requestAsync
public java.util.concurrent.CompletableFuture<javax.ws.rs.client.Invocation.Builder> requestAsync(javax.ws.rs.client.WebTarget target)
-
asyncPutRequest
public <T> java.util.concurrent.CompletableFuture<java.lang.Void> asyncPutRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.Entity<T> entity)
-
asyncPostRequest
public <T> java.util.concurrent.CompletableFuture<java.lang.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)
-
asyncDeleteRequest
public java.util.concurrent.CompletableFuture<java.lang.Void> asyncDeleteRequest(javax.ws.rs.client.WebTarget target)
-
asyncDeleteRequest
public <T> void asyncDeleteRequest(javax.ws.rs.client.WebTarget target, javax.ws.rs.client.InvocationCallback<T> callback)
-
getApiException
public org.apache.pulsar.client.admin.PulsarAdminException getApiException(java.lang.Throwable e)
-
getApiException
public org.apache.pulsar.client.admin.PulsarAdminException getApiException(javax.ws.rs.core.Response response)
-
getReasonFromServer
public static java.lang.String getReasonFromServer(javax.ws.rs.WebApplicationException e)
-
sync
protected <T> T sync(java.util.function.Supplier<java.util.concurrent.CompletableFuture<T>> executor) throws org.apache.pulsar.client.admin.PulsarAdminException- Throws:
org.apache.pulsar.client.admin.PulsarAdminException
-
-