Interface HttpDiscovery<B extends HttpDiscovery<B>>
- Type Parameters:
B- In order to implement the builder pattern with a coherent type hierarchy.
- All Superinterfaces:
Configurable<HttpDiscoveryContext>, Destroyable, Destroyable.DestroyAutomaton, HttpDiscoveryUrlAccessor, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty, Initializable, Initializable.InitializeAutomaton, InitializedAccessor, LifecycleComponent, LifecycleComponent.LifecycleAutomaton, LifecycleStatusAccessor, LoadBalancingStrategyAccessor, LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>, LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator, LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty, Pausable, Pausable.PauseAutomaton, Resumable, Resumable.ResumeAutomaton, RunningAccessor, Startable, Startable.StartAutomaton, Stoppable, Stoppable.StopAutomaton
- All Known Subinterfaces:
HttpDiscoverySidecar<B>, HttpRestDiscoveryClient<B>
- All Known Implementing Classes:
AbstractHttpDiscoverySidecar, AbstractHttpRestDiscoveryClientDecorator
HttpDiscovery describes the functionality required in order to
discover a service at a service discovery and discovery service. This type is
intended to be used by different separate hierarchy branches by providing the
generic type <B>, ensuring a coherent type hierarchy for each branch.-
Nested Class Summary
Nested classes/interfaces inherited from interface Configurable
Configurable.ConfigureAutomaton<CTX>, Configurable.ConfigureBuilder<CTX,B> Nested classes/interfaces inherited from interface Destroyable
Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface HttpDiscoveryUrlAccessor
HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlPropertyNested classes/interfaces inherited from interface Initializable
Initializable.InitializeAutomaton, Initializable.InitializeBuilder<B>, Initializable.UncheckedInitializableNested classes/interfaces inherited from interface InitializedAccessor
InitializedAccessor.InitializedMutator, InitializedAccessor.InitializedPropertyNested classes/interfaces inherited from interface LifecycleComponent
LifecycleComponent.LifecycleAutomaton, LifecycleComponent.UncheckedLifecycleComponentNested classes/interfaces inherited from interface LifecycleStatusAccessor
LifecycleStatusAccessor.LifecycleStatusBuilder<B>, LifecycleStatusAccessor.LifecycleStatusMutator, LifecycleStatusAccessor.LifecycleStatusPropertyNested classes/interfaces inherited from interface LoadBalancingStrategyAccessor
LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>, LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator, LoadBalancingStrategyAccessor.LoadBalancingStrategyPropertyNested classes/interfaces inherited from interface Pausable
Pausable.PauseAutomaton, Pausable.PauseBuilder<B>, Pausable.UncheckedPausableNested classes/interfaces inherited from interface Resumable
Resumable.ResumeAutomaton, Resumable.ResumeBuilder<B>, Resumable.UncheckedResumableNested classes/interfaces inherited from interface RunningAccessor
RunningAccessor.RunningMutator, RunningAccessor.RunningPropertyNested classes/interfaces inherited from interface Startable
Startable.StartAutomaton, Startable.StartBuilder<B>, Startable.UncheckedStartableNested classes/interfaces inherited from interface Stoppable
Stoppable.StopAutomaton, Stoppable.StopBuilder<B>, Stoppable.UncheckedStoppable -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()default voidInitially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.default voidinitialize(HttpDiscoveryContext aDiscoveryContext) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.default voidinitialize(Url aDiscoveryUrl) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.default voidinitialize(Url aDiscoveryUrl, TrustStoreDescriptor aStoreDescriptor) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.default voidinitialize(Url aDiscoveryUrl, LoadBalancingStrategy aStrategy) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.voidinitialize(Url aDiscoveryUrl, LoadBalancingStrategy aStrategy, TrustStoreDescriptor aStoreDescriptor) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.voidpause()voidresume()voidstart()voidstop()default Urldefault UrlConstructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default UrltoUrl(String aProtocol, String aHost, int aPort, String aPath, FormFields aQueryFields) Constructs anUrlwith the common attributes.default UrltoUrl(String aProtocol, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default UrltoUrl(String aProtocol, String aHost, String aPath, FormFields aQueryFields) Constructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default UrltoUrl(String aUrl, FormFields aQueryFields) default UrltoUrl(String aUrl, FormFields aQueryFields, String aFragment) default Urldefault UrlConstructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default UrltoUrl(Scheme aScheme, String aHost, int aPort, String aPath, FormFields aQueryFields) Constructs anUrlwith the common attributes.default UrltoUrl(Scheme aScheme, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default UrltoUrl(Scheme aScheme, String aHost, String aPath, FormFields aQueryFields) Constructs anUrlwith the common attributes.default UrlConstructs anUrlwith the common attributes.default Urldefault Urldefault BwithHttpDiscoveryUrl(Url aUrl) Sets the URL for the URL property locating the service discovery discovery.default BwithLoadBalancingStrategy(LoadBalancingStrategy aStrategy) Methods inherited from interface Configurable
initializeUncheckedMethods inherited from interface Destroyable.DestroyAutomaton
isDestroyable, isDestroyedMethods inherited from interface HttpDiscoveryUrlAccessor
getHttpDiscoveryUrlMethods inherited from interface HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator
setHttpDiscoveryUrlMethods inherited from interface HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty
letHttpDiscoveryUrlMethods inherited from interface Initializable
initializeUncheckedMethods inherited from interface Initializable.InitializeAutomaton
isInitalizableMethods inherited from interface InitializedAccessor
isInitializedMethods inherited from interface LifecycleStatusAccessor
getLifecycleStatusMethods inherited from interface LoadBalancingStrategyAccessor
getLoadBalancingStrategyMethods inherited from interface LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator
setLoadBalancingStrategyMethods inherited from interface LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty
letLoadBalancingStrategyMethods inherited from interface Pausable
pauseUncheckedMethods inherited from interface Pausable.PauseAutomaton
isPausable, isPausedMethods inherited from interface Resumable
resumeUncheckedMethods inherited from interface Resumable.ResumeAutomaton
isResumableMethods inherited from interface RunningAccessor
isRunningMethods inherited from interface Startable
startUncheckedMethods inherited from interface Startable.StartAutomaton
isStartableMethods inherited from interface Stoppable
stopUncheckedMethods inherited from interface Stoppable.StopAutomaton
isStoppable, isStopped
-
Method Details
-
withLoadBalancingStrategy
- Specified by:
withLoadBalancingStrategyin interfaceLoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B extends HttpDiscovery<B>>
-
withHttpDiscoveryUrl
Sets the URL for the URL property locating the service discovery discovery.- Specified by:
withHttpDiscoveryUrlin interfaceHttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B extends HttpDiscovery<B>>- Parameters:
aUrl- The service discovery discovery URL to be stored by the URL property.- Returns:
- The builder for applying multiple build operations.
-
toUrl
-
toUrl
Resolves the server's alias from the providedStringby an actual host and returns the accordingly resolvedUrl.- Parameters:
aUrl- The URLStringto be parsed. The URL consists of the scheme (protocol), the identify and the secret (optional), the host as well as an optional port and the (optional) path.- Returns:
- The tinkered
Url. - Throws:
MalformedURLException- in case the provided URL is considered being malformed.
-
toUrl
Resolves the server's alias from the providedStringby an actual host and returns the accordingly resolvedUrl.- Parameters:
aUrl- The URLStringto be parsed. The URL consists of the scheme (protocol), the identify and the secret (optional), the host as well as an optional port and the (optional) path.aQueryFields- The Query-Fields to be used for the HTTP Query-String.- Returns:
- The tinkered
Url. - Throws:
MalformedURLException- in case the provided URL is considered being malformed.
-
toUrl
default Url toUrl(String aUrl, FormFields aQueryFields, String aFragment) throws MalformedURLException Resolves the server's alias from the providedStringby an actual host and returns the accordingly resolvedUrl.- Parameters:
aUrl- The URLStringto be parsed. The URL consists of the scheme (protocol), the identify and the secret (optional), the host as well as an optional port and the (optional) path.aQueryFields- The Query-Fields to be used for the HTTP Query-String.aFragment- The fragment to be set.- Returns:
- The tinkered
Url. - Throws:
MalformedURLException- in case the provided URL is considered being malformed.
-
toUrl
-
toUrl
-
toUrl
Constructs anUrlwith the common attributes. -
toUrl
Constructs anUrlwith the common attributes.- Parameters:
aScheme- TheScheme(e.g. HTTP or HTTPS) to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the base destination URL is to point to.- Returns:
- The tinkered
Url.
-
toUrl
Constructs anUrlwith the common attributes.- Parameters:
aScheme- TheScheme(e.g. HTTP or HTTPS) to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.- Returns:
- The tinkered
Url.
-
toUrl
default Url toUrl(Scheme aScheme, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.- Parameters:
aScheme- TheScheme(e.g. HTTP or HTTPS) to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.aFragment- The fragment to be set.- Returns:
- The tinkered
Url.
-
toUrl
-
toUrl
Constructs anUrlwith the common attributes. -
toUrl
Constructs anUrlwith the common attributes.- Parameters:
aProtocol- The protocolString(e.g. "http://" or "https://") to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the base destination URL is to point to.- Returns:
- The tinkered
Url.
-
toUrl
Constructs anUrlwith the common attributes.- Parameters:
aProtocol- The protocolString(e.g. "http://" or "https://") to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.- Returns:
- The tinkered
Url.
-
toUrl
default Url toUrl(String aProtocol, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.- Parameters:
aProtocol- The protocolString(e.g. "http://" or "https://") to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.aFragment- The fragment to be set.- Returns:
- The tinkered
Url.
-
toUrl
Constructs anUrlwith the common attributes. -
toUrl
Constructs anUrlwith the common attributes.- Parameters:
aScheme- TheScheme(e.g. HTTP or HTTPS) to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.- Returns:
- The tinkered
Url.
-
toUrl
default Url toUrl(Scheme aScheme, String aHost, String aPath, FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.- Parameters:
aScheme- TheScheme(e.g. HTTP or HTTPS) to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.aFragment- The fragment to be set.- Returns:
- The tinkered
Url.
-
toUrl
Constructs anUrlwith the common attributes. -
toUrl
Constructs anUrlwith the common attributes.- Parameters:
aProtocol- The protocolString(e.g. "http://" or "https://") to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.- Returns:
- The tinkered
Url.
-
toUrl
default Url toUrl(String aProtocol, String aHost, String aPath, FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.- Parameters:
aProtocol- The protocolString(e.g. "http://" or "https://") to be used for the destination URL.aHost- The host to which the destination URL is to point to.aPath- The path on the host to which the base destination URL is to point to.aQueryFields- The Query-Fields to be used for the HTTP Query-String.aFragment- The fragment to be set.- Returns:
- The tinkered
Url.
-
toUrl
-
toUrl
-
initialize
Initially fetches the list of available services and their accordingly associated
Urlfrom the discovery service. Sets up the client according to the current client's state when invokinginitialize(Url, LoadBalancingStrategy, TrustStoreDescriptor).- Specified by:
initializein interfaceInitializable- Throws:
InitializeException
-
initialize
Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service. Sets up the client according to the current client's state and the provided parameters when invokinginitialize(Url, LoadBalancingStrategy, TrustStoreDescriptor).- Parameters:
aDiscoveryUrl- TheUrlpointing to the discovery service.- Throws:
InitializeException- Thrown in case initializing fails.
-
initialize
Initially fetches the list of available services and their accordingly associated
Urlfrom the discovery service. Sets up the client according to the provided context when invokinginitialize(Url, LoadBalancingStrategy, TrustStoreDescriptor).- Specified by:
initializein interfaceConfigurable<B extends HttpDiscovery<B>>- Parameters:
aDiscoveryContext- TheHttpDiscoveryContextdescribing the information for connecting to the discovery service.- Throws:
InitializeException
-
initialize
default void initialize(Url aDiscoveryUrl, TrustStoreDescriptor aStoreDescriptor) throws InitializeException Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service. Sets up the client according to the current client's state and the provided parameters when invokinginitialize(Url, LoadBalancingStrategy, TrustStoreDescriptor).- Parameters:
aDiscoveryUrl- TheUrlpointing to the discovery serviceaStoreDescriptor- The descriptor describing the truststore to be used by this client.- Throws:
InitializeException- the initialize exception
-
initialize
default void initialize(Url aDiscoveryUrl, LoadBalancingStrategy aStrategy) throws InitializeException Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service. Sets up the client according to the current client's state and the provided parameters.- Parameters:
aDiscoveryUrl- TheUrlpointing to the discovery serviceaStrategy- The load balancing strategy to use when resolving targetedUrlof issued requests.- Throws:
InitializeException- the initialize exception
-
initialize
void initialize(Url aDiscoveryUrl, LoadBalancingStrategy aStrategy, TrustStoreDescriptor aStoreDescriptor) throws InitializeException Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service. Sets up the client according to the current client's state and the provided parameters.- Parameters:
aDiscoveryUrl- TheUrlpointing to the discovery serviceaStrategy- The load balancing strategy to use when resolving targetedUrlof issued requests.aStoreDescriptor- The descriptor describing the truststore to be used by this client.- Throws:
InitializeException- the initialize exception
-
start
Starts resolving of the host part of an
Urlfrom the list of available services and their accordingly associatedUrlas of the discovery service. Takes care to update the list of available services and their accordingly associatedUrlfrom the discovery service. This may be achieved by starting a scheduler. If necessary, the connection is opened.- Specified by:
startin interfaceStartable- Throws:
StartException
-
pause
Pauses the resolving of the host part of an
Urlfrom the list of available services and their accordingly associatedUrlas of the discovery service.- Specified by:
pausein interfacePausable- Throws:
PauseException
-
resume
Resumes the resolving of the host part of an
Urlfrom the list of available services and their accordingly associatedUrlas of the discovery service.- Specified by:
resumein interfaceResumable- Throws:
ResumeException
-
stop
Stops resolving of the host part of an
Urlfrom the list of available services and their accordingly associatedUrlas of the discovery service. Does not update the list of available services and their accordingly associatedUrlfrom the discovery service. This may be achieved by canceling a scheduler.- Specified by:
stopin interfaceStoppable- Throws:
StopException
-
destroy
void destroy()Stops resolving of the host part of an
Urlfrom the list of available services and their accordingly associatedUrlas of the discovery service. Does not update the list of available services and their accordingly associatedUrlfrom the discovery service. This may be achieved by canceling a scheduler. Finally the connection is closed.- Specified by:
destroyin interfaceDestroyable
-