Package io.bdeploy.jersey
Class JerseyClientFactory
java.lang.Object
io.bdeploy.jersey.JerseyClientFactory
A factory for Jersey based JAX-RS clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JerseyClientFactoryget(RemoteService svc) jakarta.ws.rs.client.WebTargetgetBaseTarget(Object... additionalRegistrations) getObjectChangeWebSocket(Consumer<ObjectChangeDto> onChanges) Create aObjectChangeClientWebSocketwhich allows to subscribe to object changes, and notifies about them.<T> TgetProxyClient(Class<T> clazz, Object... additionalRegistrations) com.ning.http.client.AsyncHttpClientstatic voidvoidregister(com.fasterxml.jackson.databind.Module o) static voidsetDefaultReporter(ActivityReporter activityReporter) static voidsetProxyUuid(String uuid) voidsetReporter(ActivityReporter reporter)
-
Method Details
-
get
-
invalidateCached
-
register
public void register(com.fasterxml.jackson.databind.Module o) -
setReporter
- Parameters:
reporter- theActivityReporterto report lengthy operations to (e.g. up/download).
-
setDefaultReporter
- Parameters:
activityReporter- the defaultActivityReporterused for all newJerseyClientFactorys.
-
getProxyClient
- Parameters:
clazz- the type of resource (service interface).- Returns:
- A dynamic proxy based client for the given remote service.
-
getBaseTarget
- Returns:
- a
WebTargetwith all required feature, filter and provider registrations for theRemoteServiceassociated with this factory.
-
setProxyUuid
-
getWebSocketClient
public com.ning.http.client.AsyncHttpClient getWebSocketClient()- Returns:
- a client that is capable of providing a WebSocket connection to the given service. The caller is responsible for closing the client once done!
-
getObjectChangeWebSocket
Create aObjectChangeClientWebSocketwhich allows to subscribe to object changes, and notifies about them.
-