Module org.refcodes.rest
Package org.refcodes.rest
Class AbstractRestfulHttpDiscoveryClientDecorator<B extends RestfulHttpDiscoveryClient<B>>
java.lang.Object
org.refcodes.rest.AbstractRestfulHttpClientDecorator<B>
org.refcodes.rest.AbstractRestfulHttpDiscoveryClientDecorator<B>
- Type Parameters:
B
- the generic type
- All Implemented Interfaces:
org.refcodes.component.Closable
,org.refcodes.component.Configurable<HttpDiscoveryContext>
,org.refcodes.component.ConnectionComponent<org.refcodes.web.HttpClientContext>
,org.refcodes.component.ConnectionOpenable<org.refcodes.web.HttpClientContext>
,org.refcodes.component.ConnectionStatusAccessor
,org.refcodes.component.Destroyable
,org.refcodes.component.Destroyable.DestroyAutomaton
,org.refcodes.component.Initializable
,org.refcodes.component.Initializable.InitializeAutomaton
,org.refcodes.component.InitializedAccessor
,org.refcodes.component.LifecycleComponent
,org.refcodes.component.LifecycleComponent.LifecycleAutomaton
,org.refcodes.component.LifecycleStatusAccessor
,org.refcodes.component.LinkComponent
,org.refcodes.component.Openable
,org.refcodes.component.Openable.OpenBuilder<RestfulHttpClient>
,org.refcodes.component.OpenedAccessor
,org.refcodes.component.Pausable
,org.refcodes.component.Pausable.PauseAutomaton
,org.refcodes.component.Resumable
,org.refcodes.component.Resumable.ResumeAutomaton
,org.refcodes.component.RunningAccessor
,org.refcodes.component.Startable
,org.refcodes.component.Startable.StartAutomaton
,org.refcodes.component.Stoppable
,org.refcodes.component.Stoppable.StopAutomaton
,HttpDiscovery<B>
,HttpDiscoveryUrlAccessor
,HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>
,HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator
,HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty
,RestDeleteClient
,RestfulClient
,RestfulHttpClient
,RestfulHttpDiscoveryClient<B>
,RestGetClient
,RestPostClient
,RestPutClient
,RestRequestClient
,RestRequestHandler
,org.refcodes.security.TrustStoreDescriptorAccessor
,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<RestfulHttpClient>
,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
,org.refcodes.web.BaseUrlAccessor
,org.refcodes.web.BaseUrlAccessor.BaseUrlBuilder<RestfulHttpClient>
,org.refcodes.web.BaseUrlAccessor.BaseUrlMutator
,org.refcodes.web.BaseUrlAccessor.BaseUrlProperty
,org.refcodes.web.BasicAuthCredentialsAccessor
,org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<RestfulClient>
,org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
,org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
,org.refcodes.web.HttpClientInterceptable
,org.refcodes.web.LoadBalancingStrategyAccessor
,org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>
,org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator
,org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty
,org.refcodes.web.MediaTypeFactoryLookup
,org.refcodes.web.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
,org.refcodes.web.OauthTokenAccessor
,org.refcodes.web.OauthTokenAccessor.OauthTokenBuilder<RestfulClient>
,org.refcodes.web.OauthTokenAccessor.OauthTokenMutator
,org.refcodes.web.OauthTokenAccessor.OauthTokenProperty
,org.refcodes.web.PostHttpClientInterceptable
,org.refcodes.web.PostHttpInterceptable<org.refcodes.web.PostHttpClientInterceptor>
,org.refcodes.web.PreHttpClientInterceptable
,org.refcodes.web.PreHttpInterceptable<org.refcodes.web.PreHttpClientInterceptor>
,org.refcodes.web.UserAgentAccessor
,org.refcodes.web.UserAgentAccessor.UserAgentBuilder<RestfulClient>
,org.refcodes.web.UserAgentAccessor.UserAgentMutator
,org.refcodes.web.UserAgentAccessor.UserAgentProperty
public abstract class AbstractRestfulHttpDiscoveryClientDecorator<B extends RestfulHttpDiscoveryClient<B>>
extends AbstractRestfulHttpClientDecorator<B>
implements RestfulHttpDiscoveryClient<B>
Abstract class for easily decorating a
RestfulHttpDiscoveryClient
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.web.BaseUrlAccessor
org.refcodes.web.BaseUrlAccessor.BaseUrlBuilder<B extends org.refcodes.web.BaseUrlAccessor.BaseUrlBuilder<B>>, org.refcodes.web.BaseUrlAccessor.BaseUrlMutator, org.refcodes.web.BaseUrlAccessor.BaseUrlProperty
Nested classes/interfaces inherited from interface org.refcodes.web.BasicAuthCredentialsAccessor
org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B extends org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B>>, org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator, org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
Nested classes/interfaces inherited from interface org.refcodes.component.Configurable
org.refcodes.component.Configurable.ConfigureAutomaton<CTX extends Object>, org.refcodes.component.Configurable.ConfigureBuilder<CTX extends Object,
B extends org.refcodes.component.Configurable.ConfigureBuilder<CTX, B>> Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionComponent
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends Object,
B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON, B>> Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionOpenable
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends Object,
B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON, B>> Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomaton
Nested classes/interfaces inherited from interface org.refcodes.rest.HttpDiscoveryUrlAccessor
HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B extends HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>>, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Initializable
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable
Nested classes/interfaces inherited from interface org.refcodes.component.InitializedAccessor
org.refcodes.component.InitializedAccessor.InitializedMutator, org.refcodes.component.InitializedAccessor.InitializedProperty
Nested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent
org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponent
Nested classes/interfaces inherited from interface org.refcodes.component.LifecycleStatusAccessor
org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusBuilder<B extends org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusBuilder<B>>, org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusMutator, org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusProperty
Nested classes/interfaces inherited from interface org.refcodes.component.LinkComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
Nested classes/interfaces inherited from interface org.refcodes.web.LoadBalancingStrategyAccessor
org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B extends org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>>, org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator, org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty
Nested classes/interfaces inherited from interface org.refcodes.web.MediaTypeFactoryLookup
org.refcodes.web.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
Nested classes/interfaces inherited from interface org.refcodes.web.OauthTokenAccessor
org.refcodes.web.OauthTokenAccessor.OauthTokenBuilder<B extends org.refcodes.web.OauthTokenAccessor.OauthTokenBuilder<B>>, org.refcodes.web.OauthTokenAccessor.OauthTokenMutator, org.refcodes.web.OauthTokenAccessor.OauthTokenProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Openable
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Pausable
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable
Nested classes/interfaces inherited from interface org.refcodes.component.Resumable
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumable
Nested classes/interfaces inherited from interface org.refcodes.component.RunningAccessor
org.refcodes.component.RunningAccessor.RunningMutator, org.refcodes.component.RunningAccessor.RunningProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Startable
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable
Nested classes/interfaces inherited from interface org.refcodes.component.Stoppable
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable
Nested classes/interfaces inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor
org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B extends org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
Nested classes/interfaces inherited from interface org.refcodes.web.UserAgentAccessor
org.refcodes.web.UserAgentAccessor.UserAgentBuilder<B extends org.refcodes.web.UserAgentAccessor.UserAgentBuilder<B>>, org.refcodes.web.UserAgentAccessor.UserAgentMutator, org.refcodes.web.UserAgentAccessor.UserAgentProperty
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.refcodes.component.LifecycleMachine.ManualLifecycleMachine
Fields inherited from class org.refcodes.rest.AbstractRestfulHttpClientDecorator
_client
Fields inherited from interface org.refcodes.rest.RestfulHttpClient
DEFAULT_KEYSTORE_TYPE, DEFAULT_SSL_PROTOCOL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Stops resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service.org.refcodes.web.Url
Retrieves the URL from the URL property locating the service discovery discovery.org.refcodes.component.LifecycleStatus
org.refcodes.web.LoadBalancingStrategy
void
Initially fetches the list of available services and their accordingly associatedUrl
from the discovery service.boolean
boolean
boolean
boolean
boolean
boolean
isPaused()
boolean
boolean
boolean
boolean
boolean
void
pause()
Pauses the resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service.void
resume()
Resumes the resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service.void
setHttpDiscoveryUrl
(org.refcodes.web.Url aUrl) Sets the URL for the URL property locating the service discovery discovery.void
setLoadBalancingStrategy
(org.refcodes.web.LoadBalancingStrategy aStrategy) void
start()
Starts resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service.void
stop()
Stops resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service.protected org.refcodes.web.Url
toHttpDiscoveryUrl
(org.refcodes.web.Url aDiscoveryUrl) To http discovery url.protected org.refcodes.web.LoadBalancingStrategy
toLoadBalancerStrategy
(org.refcodes.web.LoadBalancingStrategy aStrategy) To load balancer strategy.protected org.refcodes.security.TrustStoreDescriptor
toTrustStoreDescriptor
(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) To trust store descriptor.abstract org.refcodes.web.Url
toUrl
(org.refcodes.web.Url aUrl) Hook for sub-classes to modify the request URL.Methods inherited from class org.refcodes.rest.AbstractRestfulHttpClientDecorator
addMediaTypeFactory, addPostHttpInterceptor, addPreHttpInterceptor, buildRequest, close, closeIn, closeQuietly, closeUnchecked, doRequest, getBaseUrl, getConnectionStatus, getFactoryMediaTypes, getOauthToken, getTrustStoreDescriptor, getUserAgent, hasMediaTypeFactory, hasPostHttpInterceptor, hasPreHttpInterceptor, onResponse, onResponse, open, open, openUnchecked, removePostHttpInterceptor, removePreHttpInterceptor, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setOauthToken, setTrustStoreDescriptor, setUserAgent, toMediaTypeFactory, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withUserAgent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.web.BaseUrlAccessor
getBaseUrl
Methods inherited from interface org.refcodes.web.BaseUrlAccessor.BaseUrlBuilder
withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl
Methods inherited from interface org.refcodes.web.BaseUrlAccessor.BaseUrlMutator
setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl
Methods inherited from interface org.refcodes.web.BaseUrlAccessor.BaseUrlProperty
letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl
Methods inherited from interface org.refcodes.web.BasicAuthCredentialsAccessor
getBasicAuthCredentials
Methods inherited from interface org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
setBasicAuthCredentials, setBasicAuthCredentials
Methods inherited from interface org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
letBasicAuthCredentials, letBasicAuthCredentials
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
Methods inherited from interface org.refcodes.component.Configurable
initializeUnchecked
Methods inherited from interface org.refcodes.component.ConnectionOpenable
openUnchecked
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
Methods inherited from interface org.refcodes.web.HttpClientInterceptable
addHttpInterceptor, hasHttpInterceptor, removeHttpInterceptor
Methods inherited from interface org.refcodes.rest.HttpDiscovery
initialize, initialize, initialize, initialize, initialize, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, toUrl, withHttpDiscoveryUrl, withLoadBalancingStrategy
Methods inherited from interface org.refcodes.rest.HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty
letHttpDiscoveryUrl
Methods inherited from interface org.refcodes.component.Initializable
initializeUnchecked
Methods inherited from interface org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty
letLoadBalancingStrategy
Methods inherited from interface org.refcodes.web.MediaTypeFactoryLookup
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
Methods inherited from interface org.refcodes.web.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
addMediaTypeFactory
Methods inherited from interface org.refcodes.web.OauthTokenAccessor
getOauthToken
Methods inherited from interface org.refcodes.web.OauthTokenAccessor.OauthTokenMutator
setOauthToken
Methods inherited from interface org.refcodes.web.OauthTokenAccessor.OauthTokenProperty
letOauthToken
Methods inherited from interface org.refcodes.component.Openable
openUnchecked
Methods inherited from interface org.refcodes.component.Openable.OpenBuilder
withOpenUnchecked
Methods inherited from interface org.refcodes.component.Pausable
pauseUnchecked
Methods inherited from interface org.refcodes.web.PostHttpInterceptable
addPostHttpInterceptor, hasPostHttpInterceptor, removePostHttpInterceptor
Methods inherited from interface org.refcodes.web.PreHttpInterceptable
addPreHttpInterceptor, hasPreHttpInterceptor, removePreHttpInterceptor
Methods inherited from interface org.refcodes.rest.RestDeleteClient
buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete, onDelete
Methods inherited from interface org.refcodes.rest.RestfulHttpClient
open, open, open, open, open, withBaseUrl, withBaseUrl, withBaseUrl, withBasicAuthCredentials, withBasicAuthCredentials, withOAuthToken, withOpen, withOpen, withOpen, withOpen, withOpen, withUserAgent
Methods inherited from interface org.refcodes.rest.RestfulHttpDiscoveryClient
withTrustStoreDescriptor
Methods inherited from interface org.refcodes.rest.RestGetClient
buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet, onGet
Methods inherited from interface org.refcodes.rest.RestPostClient
buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost, onPost
Methods inherited from interface org.refcodes.rest.RestPutClient
buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut, onPut
Methods inherited from interface org.refcodes.rest.RestRequestClient
buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse, onResponse
Methods inherited from interface org.refcodes.component.Resumable
resumeUnchecked
Methods inherited from interface org.refcodes.component.Startable
startUnchecked
Methods inherited from interface org.refcodes.component.Stoppable
stopUnchecked
Methods inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor
getTrustStoreDescriptor
Methods inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
setTrustStoreDescriptor
Methods inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
letTrustStoreDescriptor
Methods inherited from interface org.refcodes.web.UserAgentAccessor
getUserAgent
Methods inherited from interface org.refcodes.web.UserAgentAccessor.UserAgentMutator
setUserAgent
Methods inherited from interface org.refcodes.web.UserAgentAccessor.UserAgentProperty
letUserAgent
-
Field Details
-
_lifeCycleAutomaton
protected org.refcodes.component.LifecycleMachine.ManualLifecycleMachine _lifeCycleAutomaton
-
-
Constructor Details
-
AbstractRestfulHttpDiscoveryClientDecorator
Decorates the givenRestfulHttpClient
with discovery functionality.- Parameters:
aClient
- TheRestfulHttpClient
to be decorated.
-
-
Method Details
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceorg.refcodes.component.RunningAccessor
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceorg.refcodes.component.InitializedAccessor
-
getLifecycleStatus
public org.refcodes.component.LifecycleStatus getLifecycleStatus()- Specified by:
getLifecycleStatus
in interfaceorg.refcodes.component.LifecycleStatusAccessor
-
pause
public void pause() throws org.refcodes.component.PauseExceptionPauses the resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service.- Specified by:
pause
in interfaceHttpDiscovery<B extends RestfulHttpDiscoveryClient<B>>
- Specified by:
pause
in interfaceorg.refcodes.component.Pausable
- Throws:
org.refcodes.component.PauseException
-
stop
public void stop() throws org.refcodes.component.StopExceptionStops resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service. Does not update the list of available services and their accordingly associatedUrl
from the discovery service. This may be achieved by canceling a scheduler.- Specified by:
stop
in interfaceHttpDiscovery<B extends RestfulHttpDiscoveryClient<B>>
- Specified by:
stop
in interfaceorg.refcodes.component.Stoppable
- Throws:
org.refcodes.component.StopException
-
start
public void start() throws org.refcodes.component.StartExceptionStarts resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service. Takes care to update the list of available services and their accordingly associatedUrl
from the discovery service. This may be achieved by starting a scheduler. If necessary, the connection is opened.- Specified by:
start
in interfaceHttpDiscovery<B extends RestfulHttpDiscoveryClient<B>>
- Specified by:
start
in interfaceorg.refcodes.component.Startable
- Throws:
org.refcodes.component.StartException
-
resume
public void resume() throws org.refcodes.component.ResumeExceptionResumes the resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service.- Specified by:
resume
in interfaceHttpDiscovery<B extends RestfulHttpDiscoveryClient<B>>
- Specified by:
resume
in interfaceorg.refcodes.component.Resumable
- Throws:
org.refcodes.component.ResumeException
-
initialize
public void initialize() throws org.refcodes.component.InitializeExceptionInitially fetches the list of available services and their accordingly associatedUrl
from the discovery service. Sets up the client according to the current client's state when invokingHttpDiscovery.initialize(Url, LoadBalancingStrategy, TrustStoreDescriptor)
.- Specified by:
initialize
in interfaceHttpDiscovery<B extends RestfulHttpDiscoveryClient<B>>
- Specified by:
initialize
in interfaceorg.refcodes.component.Initializable
- Throws:
org.refcodes.component.InitializeException
-
isStoppable
public boolean isStoppable()- Specified by:
isStoppable
in interfaceorg.refcodes.component.Stoppable.StopAutomaton
-
isPausable
public boolean isPausable()- Specified by:
isPausable
in interfaceorg.refcodes.component.Pausable.PauseAutomaton
-
isStartable
public boolean isStartable()- Specified by:
isStartable
in interfaceorg.refcodes.component.Startable.StartAutomaton
-
isResumable
public boolean isResumable()- Specified by:
isResumable
in interfaceorg.refcodes.component.Resumable.ResumeAutomaton
-
isStopped
public boolean isStopped()- Specified by:
isStopped
in interfaceorg.refcodes.component.Stoppable.StopAutomaton
-
isPaused
public boolean isPaused()- Specified by:
isPaused
in interfaceorg.refcodes.component.Pausable.PauseAutomaton
-
isInitalizable
public boolean isInitalizable()- Specified by:
isInitalizable
in interfaceorg.refcodes.component.Initializable.InitializeAutomaton
-
destroy
public void destroy()Stops resolving of the host part of anUrl
from the list of available services and their accordingly associatedUrl
as of the discovery service. Does not update the list of available services and their accordingly associatedUrl
from the discovery service. This may be achieved by canceling a scheduler. Finally the connection is closed.- Specified by:
destroy
in interfaceorg.refcodes.component.Destroyable
- Specified by:
destroy
in interfaceHttpDiscovery<B extends RestfulHttpDiscoveryClient<B>>
-
isDestroyable
public boolean isDestroyable()- Specified by:
isDestroyable
in interfaceorg.refcodes.component.Destroyable.DestroyAutomaton
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceorg.refcodes.component.Destroyable.DestroyAutomaton
-
toUrl
public abstract org.refcodes.web.Url toUrl(org.refcodes.web.Url aUrl) Hook for sub-classes to modify the request URL.- Specified by:
toUrl
in interfaceHttpDiscovery<B extends RestfulHttpDiscoveryClient<B>>
- Overrides:
toUrl
in classAbstractRestfulHttpClientDecorator<B extends RestfulHttpDiscoveryClient<B>>
- Parameters:
aUrl
- TheUrl
for the request.- Returns:
- The tinkered
Url
, by default it returns the providedUrl
unmodified.
-
setLoadBalancingStrategy
public void setLoadBalancingStrategy(org.refcodes.web.LoadBalancingStrategy aStrategy) - Specified by:
setLoadBalancingStrategy
in interfaceorg.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator
-
getLoadBalancingStrategy
public org.refcodes.web.LoadBalancingStrategy getLoadBalancingStrategy()- Specified by:
getLoadBalancingStrategy
in interfaceorg.refcodes.web.LoadBalancingStrategyAccessor
-
getHttpDiscoveryUrl
public org.refcodes.web.Url getHttpDiscoveryUrl()Retrieves the URL from the URL property locating the service discovery discovery.- Specified by:
getHttpDiscoveryUrl
in interfaceHttpDiscoveryUrlAccessor
- Returns:
- The URL stored by the URL property.
-
setHttpDiscoveryUrl
public void setHttpDiscoveryUrl(org.refcodes.web.Url aUrl) Sets the URL for the URL property locating the service discovery discovery.- Specified by:
setHttpDiscoveryUrl
in interfaceHttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator
- Parameters:
aUrl
- The service discovery discovery URL to be stored by the URL property.
-
toTrustStoreDescriptor
protected org.refcodes.security.TrustStoreDescriptor toTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) To trust store descriptor.- Parameters:
aStoreDescriptor
- the store descriptor- Returns:
- the trust store descriptor
-
toHttpDiscoveryUrl
protected org.refcodes.web.Url toHttpDiscoveryUrl(org.refcodes.web.Url aDiscoveryUrl) To http discovery url.- Parameters:
aDiscoveryUrl
- the discovery url- Returns:
- the url
-
toLoadBalancerStrategy
protected org.refcodes.web.LoadBalancingStrategy toLoadBalancerStrategy(org.refcodes.web.LoadBalancingStrategy aStrategy) To load balancer strategy.- Parameters:
aStrategy
- the strategy- Returns:
- the load balancing strategy
-