Module org.refcodes.rest
Package org.refcodes.rest
Interface HttpDiscovery<B extends HttpDiscovery<B>>
- Type Parameters:
B- In order to implement the builder pattern with a coherent type hierarchy.
- All Superinterfaces:
org.refcodes.component.Configurable<HttpDiscoveryContext>,org.refcodes.component.Destroyable,org.refcodes.component.Destroyable.DestroyAutomaton,HttpDiscoveryUrlAccessor,HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>,HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator,HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty,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.web.LoadBalancingStrategyAccessor,org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>,org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator,org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty,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
- All Known Subinterfaces:
HttpDiscoverySidecar<B>,RestfulHttpDiscoveryClient<B>
- All Known Implementing Classes:
AbstractHttpDiscoverySidecar,AbstractRestfulHttpDiscoveryClientDecorator
public interface HttpDiscovery<B extends HttpDiscovery<B>>
extends org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty, org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>, org.refcodes.component.Configurable<HttpDiscoveryContext>, org.refcodes.component.LifecycleComponent.LifecycleAutomaton, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>
The
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 org.refcodes.component.Configurable
org.refcodes.component.Configurable.ConfigureAutomaton<CTX>, org.refcodes.component.Configurable.ConfigureBuilder<CTX,B extends org.refcodes.component.Configurable.ConfigureBuilder<CTX, B>> Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface org.refcodes.rest.HttpDiscoveryUrlAccessor
HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B extends HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>>, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlPropertyNested 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.UncheckedInitializableNested classes/interfaces inherited from interface org.refcodes.component.InitializedAccessor
org.refcodes.component.InitializedAccessor.InitializedMutator, org.refcodes.component.InitializedAccessor.InitializedPropertyNested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent
org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponentNested 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.LifecycleStatusPropertyNested 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.LoadBalancingStrategyPropertyNested 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.UncheckedPausableNested 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.UncheckedResumableNested classes/interfaces inherited from interface org.refcodes.component.RunningAccessor
org.refcodes.component.RunningAccessor.RunningMutator, org.refcodes.component.RunningAccessor.RunningPropertyNested 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.UncheckedStartableNested 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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Stops resolving of the host part of anUrlfrom the list of available services and their accordingly associatedUrlas of the discovery service.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(org.refcodes.web.Url aDiscoveryUrl) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.default voidinitialize(org.refcodes.web.Url aDiscoveryUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.default voidinitialize(org.refcodes.web.Url aDiscoveryUrl, org.refcodes.web.LoadBalancingStrategy aStrategy) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.voidinitialize(org.refcodes.web.Url aDiscoveryUrl, org.refcodes.web.LoadBalancingStrategy aStrategy, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service.voidpause()Pauses the resolving of the host part of anUrlfrom the list of available services and their accordingly associatedUrlas of the discovery service.voidresume()Resumes the resolving of the host part of anUrlfrom the list of available services and their accordingly associatedUrlas of the discovery service.voidstart()Starts resolving of the host part of anUrlfrom the list of available services and their accordingly associatedUrlas of the discovery service.voidstop()Stops resolving of the host part of anUrlfrom the list of available services and their accordingly associatedUrlas of the discovery service.default org.refcodes.web.UrlResolves the server's alias from the providedStringby an actual host and returns the accordingly resolvedUrl.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrltoUrl(String aProtocol, String aHost, int aPort, String aPath, org.refcodes.web.FormFields aQueryFields) Constructs anUrlwith the common attributes.default org.refcodes.web.UrltoUrl(String aProtocol, String aHost, int aPort, String aPath, org.refcodes.web.FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrltoUrl(String aProtocol, String aHost, String aPath, org.refcodes.web.FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.default org.refcodes.web.UrlResolves the server's alias from the providedStringby an actual host and returns the accordingly resolvedUrl.default org.refcodes.web.UrlResolves the server's alias from the providedStringby an actual host and returns the accordingly resolvedUrl.default org.refcodes.web.UrlConstructs anUrlfrom the providedURLinstance.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrltoUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, org.refcodes.web.FormFields aQueryFields) Constructs anUrlwith the common attributes.default org.refcodes.web.UrltoUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, org.refcodes.web.FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.default org.refcodes.web.UrlConstructs anUrlwith the common attributes.default org.refcodes.web.UrltoUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, org.refcodes.web.FormFields aQueryFields) Constructs anUrlwith the common attributes.default org.refcodes.web.UrltoUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, org.refcodes.web.FormFields aQueryFields, String aFragment) Constructs anUrlwith the common attributes.org.refcodes.web.UrltoUrl(org.refcodes.web.Url aUrl) Resolves the server's alias from the providedUrlby an actual host and returns the accordingly resolvedUrl.default org.refcodes.web.UrlSomeUrlalgebra: Adds the provided path to the givenUrlby prepending it to theUrl's path.default org.refcodes.web.UrltoUrl(org.refcodes.web.Url aUrl, org.refcodes.web.Url aOtherUrl) Constructs a newUrlfrom the givenUrlinstances by adding the otherUrl's data to the firstUrl's data.default BwithHttpDiscoveryUrl(org.refcodes.web.Url aUrl) Sets the URL for the URL property locating the service discovery discovery.default BwithLoadBalancingStrategy(org.refcodes.web.LoadBalancingStrategy aStrategy) Methods inherited from interface org.refcodes.component.Configurable
initializeUncheckedMethods inherited from interface org.refcodes.component.Destroyable.DestroyAutomaton
isDestroyable, isDestroyedMethods inherited from interface org.refcodes.rest.HttpDiscoveryUrlAccessor
getHttpDiscoveryUrlMethods inherited from interface org.refcodes.rest.HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator
setHttpDiscoveryUrlMethods inherited from interface org.refcodes.rest.HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty
letHttpDiscoveryUrlMethods inherited from interface org.refcodes.component.Initializable
initializeUncheckedMethods inherited from interface org.refcodes.component.Initializable.InitializeAutomaton
isInitalizableMethods inherited from interface org.refcodes.component.InitializedAccessor
isInitializedMethods inherited from interface org.refcodes.component.LifecycleStatusAccessor
getLifecycleStatusMethods inherited from interface org.refcodes.web.LoadBalancingStrategyAccessor
getLoadBalancingStrategyMethods inherited from interface org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator
setLoadBalancingStrategyMethods inherited from interface org.refcodes.web.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty
letLoadBalancingStrategyMethods inherited from interface org.refcodes.component.Pausable
pauseUncheckedMethods inherited from interface org.refcodes.component.Pausable.PauseAutomaton
isPausable, isPausedMethods inherited from interface org.refcodes.component.Resumable
resumeUncheckedMethods inherited from interface org.refcodes.component.Resumable.ResumeAutomaton
isResumableMethods inherited from interface org.refcodes.component.RunningAccessor
isRunningMethods inherited from interface org.refcodes.component.Startable
startUncheckedMethods inherited from interface org.refcodes.component.Startable.StartAutomaton
isStartableMethods inherited from interface org.refcodes.component.Stoppable
stopUncheckedMethods inherited from interface org.refcodes.component.Stoppable.StopAutomaton
isStoppable, isStopped
-
Method Details
-
withLoadBalancingStrategy
- Specified by:
withLoadBalancingStrategyin interfaceorg.refcodes.web.LoadBalancingStrategyAccessor.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
org.refcodes.web.Url toUrl(org.refcodes.web.Url aUrl) Resolves the server's alias from the providedUrlby an actual host and returns the accordingly resolvedUrl.- Parameters:
aUrl- TheUrlfor the request.- Returns:
- The tinkered
Url.
-
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
default org.refcodes.web.Url toUrl(String aUrl, org.refcodes.web.FormFields aQueryFields) 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.- Returns:
- The tinkered
Url. - Throws:
MalformedURLException- in case the provided URL is considered being malformed.
-
toUrl
default org.refcodes.web.Url toUrl(String aUrl, org.refcodes.web.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
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.- 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.- Returns:
- The tinkered
Url.
-
toUrl
default org.refcodes.web.Url toUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath) 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
default org.refcodes.web.Url toUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, org.refcodes.web.FormFields aQueryFields) 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 org.refcodes.web.Url toUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, org.refcodes.web.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
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.- 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.- 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.- Returns:
- The tinkered
Url.
-
toUrl
default org.refcodes.web.Url toUrl(String aProtocol, String aHost, int aPort, String aPath, org.refcodes.web.FormFields aQueryFields) 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 org.refcodes.web.Url toUrl(String aProtocol, String aHost, int aPort, String aPath, org.refcodes.web.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.- 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.- Returns:
- The tinkered
Url.
-
toUrl
default org.refcodes.web.Url toUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, org.refcodes.web.FormFields aQueryFields) 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 org.refcodes.web.Url toUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, org.refcodes.web.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.- 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.- Returns:
- The tinkered
Url.
-
toUrl
default org.refcodes.web.Url toUrl(String aProtocol, String aHost, String aPath, org.refcodes.web.FormFields aQueryFields) 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 org.refcodes.web.Url toUrl(String aProtocol, String aHost, String aPath, org.refcodes.web.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
default org.refcodes.web.Url toUrl(org.refcodes.web.Url aUrl, org.refcodes.web.Url aOtherUrl) Constructs a newUrlfrom the givenUrlinstances by adding the otherUrl's data to the firstUrl's data. E.g. a path from the otherUrlis append to the firstUrl's path, the query parameters are added or overwritten accordingly and so on.- Parameters:
aUrl- TheUrlwhich is to be enriched.aOtherUrl- TheUrlenriching the givenUrlby an actual host and returns the accordingly resolvedUrl.- Returns:
- The tinkered
Url.
-
toUrl
SomeUrlalgebra: Adds the provided path to the givenUrlby prepending it to theUrl's path.- Parameters:
aUrl- TheUrlto which to add the path.aPaths- The paths to be added to the givenUrlby an actual host and returns the accordingly resolvedUrl.- Returns:
- The tinkered
Url.
-
initialize
default void initialize() throws org.refcodes.component.InitializeExceptionInitially fetches the list of available services and their accordingly associatedUrlfrom the discovery service. Sets up the client according to the current client's state when invokinginitialize(Url, LoadBalancingStrategy, TrustStoreDescriptor).- Specified by:
initializein interfaceorg.refcodes.component.Initializable- Throws:
org.refcodes.component.InitializeException
-
initialize
default void initialize(org.refcodes.web.Url aDiscoveryUrl) throws org.refcodes.component.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 service.- Throws:
org.refcodes.component.InitializeException- Thrown in case initializing fails.
-
initialize
default void initialize(HttpDiscoveryContext aDiscoveryContext) throws org.refcodes.component.InitializeException Initially fetches the list of available services and their accordingly associatedUrlfrom the discovery service. Sets up the client according to the provided context when invokinginitialize(Url, LoadBalancingStrategy, TrustStoreDescriptor).- Specified by:
initializein interfaceorg.refcodes.component.Configurable<B extends HttpDiscovery<B>>- Parameters:
aDiscoveryContext- TheHttpDiscoveryContextdescribing the information for connecting to the discovery service.- Throws:
org.refcodes.component.InitializeException
-
initialize
default void initialize(org.refcodes.web.Url aDiscoveryUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) throws org.refcodes.component.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:
org.refcodes.component.InitializeException
-
initialize
default void initialize(org.refcodes.web.Url aDiscoveryUrl, org.refcodes.web.LoadBalancingStrategy aStrategy) throws org.refcodes.component.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:
org.refcodes.component.InitializeException
-
initialize
void initialize(org.refcodes.web.Url aDiscoveryUrl, org.refcodes.web.LoadBalancingStrategy aStrategy, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) throws org.refcodes.component.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:
org.refcodes.component.InitializeException
-
start
void start() throws org.refcodes.component.StartExceptionStarts resolving of the host part of anUrlfrom 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 interfaceorg.refcodes.component.Startable- Throws:
org.refcodes.component.StartException
-
pause
void pause() throws org.refcodes.component.PauseExceptionPauses the resolving of the host part of anUrlfrom the list of available services and their accordingly associatedUrlas of the discovery service.- Specified by:
pausein interfaceorg.refcodes.component.Pausable- Throws:
org.refcodes.component.PauseException
-
resume
void resume() throws org.refcodes.component.ResumeExceptionResumes the resolving of the host part of anUrlfrom the list of available services and their accordingly associatedUrlas of the discovery service.- Specified by:
resumein interfaceorg.refcodes.component.Resumable- Throws:
org.refcodes.component.ResumeException
-
stop
void stop() throws org.refcodes.component.StopExceptionStops resolving of the host part of anUrlfrom 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 interfaceorg.refcodes.component.Stoppable- Throws:
org.refcodes.component.StopException
-
destroy
void destroy()Stops resolving of the host part of anUrlfrom 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 interfaceorg.refcodes.component.Destroyable
-