org.refcodes.component.Configurable<B>
, 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.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
, org.refcodes.net.LoadBalancingStrategyAccessor
, org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>
, org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator
, org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty
, HttpDiscovery<B>
, HttpDiscoverySidecar<B>
, HttpDiscoveryUrlAccessor
, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>
, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator
, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty
, org.refcodes.security.TrustStoreDescriptorAccessor
, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>
, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
public abstract class AbstractHttpDiscoverySidecar<B extends HttpDiscoverySidecar<B>> extends Object implements HttpDiscoverySidecar<B>
HttpRegistrySidecar
.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>>
org.refcodes.component.Destroyable.DestroyAutomaton
HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B extends HttpDiscoveryUrlAccessor.HttpDiscoveryUrlBuilder<B>>, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable
org.refcodes.component.InitializedAccessor.InitializedMutator, org.refcodes.component.InitializedAccessor.InitializedProperty
org.refcodes.component.LifeCycleComponent.LifeCycleAutomaton, org.refcodes.component.LifeCycleComponent.UncheckedLifeCycleComponent
org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusBuilder<B extends org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusBuilder<B>>, org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusMutator, org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusProperty
org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B extends org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyBuilder<B>>, org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator, org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumable
org.refcodes.component.RunningAccessor.RunningMutator, org.refcodes.component.RunningAccessor.RunningProperty
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable
org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B extends org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
Modifier and Type | Field | Description |
---|---|---|
protected org.refcodes.component.LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl |
_lifeCycleAutomaton |
Constructor | Description |
---|---|
AbstractHttpDiscoverySidecar() |
Modifier and Type | Method | Description |
---|---|---|
void |
destroy() |
Stops resolving of the host part of an
Url from the list of
available services and their accordingly associated Url as of the
discovery service. |
org.refcodes.net.Url |
getHttpDiscoveryUrl() |
Retrieves the URL from the URL property locating the service discovery
discovery.
|
org.refcodes.component.LifeCycleStatus |
getLifeCycleStatus() |
|
org.refcodes.net.LoadBalancingStrategy |
getLoadBalancingStrategy() |
|
org.refcodes.security.TrustStoreDescriptor |
getTrustStoreDescriptor() |
|
void |
initialize() |
Initially fetches the list of available services and their accordingly
associated
Url from the discovery service. |
boolean |
isDestroyable() |
|
boolean |
isDestroyed() |
|
boolean |
isInitalizable() |
|
boolean |
isInitialized() |
|
boolean |
isPausable() |
|
boolean |
isPaused() |
|
boolean |
isResumable() |
|
boolean |
isRunning() |
|
boolean |
isStartable() |
|
boolean |
isStoppable() |
|
boolean |
isStopped() |
|
void |
pause() |
Pauses the resolving of the host part of an
Url from the list of
available services and their accordingly associated Url as of the
discovery service. |
void |
resume() |
Resumes the resolving of the host part of an
Url from the list of
available services and their accordingly associated Url as of the
discovery service. |
void |
setHttpDiscoveryUrl(org.refcodes.net.Url aUrl) |
Sets the URL for the URL property locating the service discovery
discovery.
|
void |
setLoadBalancingStrategy(org.refcodes.net.LoadBalancingStrategy aStrategy) |
|
void |
setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) |
|
void |
start() |
Starts resolving of the host part of an
Url from the list of
available services and their accordingly associated Url as of the
discovery service. |
void |
stop() |
Stops resolving of the host part of an
Url from the list of
available services and their accordingly associated Url as of the
discovery service. |
protected static org.refcodes.net.Url |
toHttpDiscoveryUrl(org.refcodes.net.Url aDiscoveryUrl,
HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty aProperty) |
Resolves the property from the provided value and the provided property
and the and sets the property in case the provided value is not null.
|
protected static org.refcodes.net.LoadBalancingStrategy |
toLoadBalancingStrategy(org.refcodes.net.LoadBalancingStrategy aStrategy,
org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty aProperty) |
Resolves the property from the provided value and the provided property
and the and sets the property in case the provided value is not null.
|
protected static org.refcodes.security.TrustStoreDescriptor |
toTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor,
org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty aProperty) |
Resolves the property from the provided value and the provided property
and the and sets the property in case the provided value is not null.
|
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, toUrl, withHttpDiscoveryUrl, withLoadBalancingStrategy
withTrustStoreDescriptor
protected org.refcodes.component.LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl _lifeCycleAutomaton
public boolean isRunning()
isRunning
in interface org.refcodes.component.RunningAccessor
public boolean isInitialized()
isInitialized
in interface org.refcodes.component.InitializedAccessor
public org.refcodes.component.LifeCycleStatus getLifeCycleStatus()
getLifeCycleStatus
in interface org.refcodes.component.LifeCycleStatusAccessor
public void pause() throws org.refcodes.component.PauseException
Url
from the list of
available services and their accordingly associated Url
as of the
discovery service.
pause
in interface HttpDiscovery<B extends HttpDiscoverySidecar<B>>
pause
in interface org.refcodes.component.Pausable
org.refcodes.component.PauseException
public void stop() throws org.refcodes.component.StopException
Url
from the list of
available services and their accordingly associated Url
as of the
discovery service. Does not update the list of available services and
their accordingly associated Url
from the discovery service. This
may be achieved by canceling a scheduler.
stop
in interface HttpDiscovery<B extends HttpDiscoverySidecar<B>>
stop
in interface org.refcodes.component.Stoppable
org.refcodes.component.StopException
public void start() throws org.refcodes.component.StartException
Url
from the list of
available services and their accordingly associated Url
as of the
discovery service. Takes care to update the list of available services
and their accordingly associated Url
from the discovery service.
This may be achieved by starting a scheduler. If necessary, the
connection is opened.
start
in interface HttpDiscovery<B extends HttpDiscoverySidecar<B>>
start
in interface org.refcodes.component.Startable
org.refcodes.component.StartException
public void resume() throws org.refcodes.component.ResumeException
Url
from the list of
available services and their accordingly associated Url
as of the
discovery service.
resume
in interface HttpDiscovery<B extends HttpDiscoverySidecar<B>>
resume
in interface org.refcodes.component.Resumable
org.refcodes.component.ResumeException
public void initialize() throws org.refcodes.component.InitializeException
Url
from the discovery service. Sets up the client
according to the current client's state when invoking
HttpDiscovery.initialize(Url, LoadBalancingStrategy, TrustStoreDescriptor)
.
initialize
in interface HttpDiscovery<B extends HttpDiscoverySidecar<B>>
initialize
in interface org.refcodes.component.Initializable
org.refcodes.component.InitializeException
public boolean isStoppable()
isStoppable
in interface org.refcodes.component.Stoppable.StopAutomaton
public boolean isPausable()
isPausable
in interface org.refcodes.component.Pausable.PauseAutomaton
public boolean isStartable()
isStartable
in interface org.refcodes.component.Startable.StartAutomaton
public boolean isResumable()
isResumable
in interface org.refcodes.component.Resumable.ResumeAutomaton
public boolean isStopped()
isStopped
in interface org.refcodes.component.Stoppable.StopAutomaton
public boolean isPaused()
isPaused
in interface org.refcodes.component.Pausable.PauseAutomaton
public boolean isInitalizable()
isInitalizable
in interface org.refcodes.component.Initializable.InitializeAutomaton
public void destroy()
Url
from the list of
available services and their accordingly associated Url
as of the
discovery service. Does not update the list of available services and
their accordingly associated Url
from the discovery service. This
may be achieved by canceling a scheduler. Finally the connection is
closed.
destroy
in interface org.refcodes.component.Destroyable
destroy
in interface HttpDiscovery<B extends HttpDiscoverySidecar<B>>
public boolean isDestroyable()
isDestroyable
in interface org.refcodes.component.Destroyable.DestroyAutomaton
public boolean isDestroyed()
isDestroyed
in interface org.refcodes.component.Destroyable.DestroyAutomaton
public org.refcodes.net.LoadBalancingStrategy getLoadBalancingStrategy()
getLoadBalancingStrategy
in interface org.refcodes.net.LoadBalancingStrategyAccessor
public void setHttpDiscoveryUrl(org.refcodes.net.Url aUrl)
setHttpDiscoveryUrl
in interface HttpDiscoveryUrlAccessor.HttpDiscoveryUrlMutator
aUrl
- The service discovery discovery URL to be stored by the
URL property.public void setLoadBalancingStrategy(org.refcodes.net.LoadBalancingStrategy aStrategy)
setLoadBalancingStrategy
in interface org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyMutator
public org.refcodes.security.TrustStoreDescriptor getTrustStoreDescriptor()
getTrustStoreDescriptor
in interface org.refcodes.security.TrustStoreDescriptorAccessor
public void setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
setTrustStoreDescriptor
in interface org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
public org.refcodes.net.Url getHttpDiscoveryUrl()
getHttpDiscoveryUrl
in interface HttpDiscoveryUrlAccessor
protected static org.refcodes.net.LoadBalancingStrategy toLoadBalancingStrategy(org.refcodes.net.LoadBalancingStrategy aStrategy, org.refcodes.net.LoadBalancingStrategyAccessor.LoadBalancingStrategyProperty aProperty)
aStrategy
- The value to be used when not null.aProperty
- The property to be used when the value is null and which
is to be set when the value is not null.protected static org.refcodes.security.TrustStoreDescriptor toTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty aProperty)
aStoreDescriptor
- The value to be used when not null.aProperty
- The property to be used when the value is null and which
is to be set when the value is not null.protected static org.refcodes.net.Url toHttpDiscoveryUrl(org.refcodes.net.Url aDiscoveryUrl, HttpDiscoveryUrlAccessor.HttpDiscoveryUrlProperty aProperty)
aDiscoveryUrl
- The value to be used when not null.aProperty
- The property to be used when the value is null and which
is to be set when the value is not null.Copyright © 2018. All rights reserved.