Class EurekaRegistrySidecar

java.lang.Object
org.refcodes.rest.AbstractHttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>
org.refcodes.rest.ext.eureka.EurekaRegistrySidecar
All Implemented Interfaces:
org.refcodes.component.Configurable<org.refcodes.rest.HttpRegistryContext<EurekaServerDescriptor>>, 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.mixin.AliasAccessor, org.refcodes.mixin.AliasAccessor.AliasBuilder<EurekaRegistrySidecar>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty, org.refcodes.mixin.InstanceIdAccessor, org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<EurekaRegistrySidecar>, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty, org.refcodes.mixin.PortAccessor, org.refcodes.mixin.PortAccessor.PortBuilder<EurekaRegistrySidecar>, org.refcodes.mixin.PortAccessor.PortMutator, org.refcodes.mixin.PortAccessor.PortProperty, org.refcodes.net.IpAddressAccessor, org.refcodes.net.IpAddressAccessor.IpAddressBuilder<EurekaRegistrySidecar>, org.refcodes.net.IpAddressAccessor.IpAddressMutator, org.refcodes.net.IpAddressAccessor.IpAddressProperty, EurekaDataCenterTypeAccessor, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeBuilder<EurekaRegistrySidecar>, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeMutator, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeProperty, EurekaRegistry<EurekaRegistrySidecar>, EurekaServerDescriptorFactory, org.refcodes.rest.HomePathAccessor, org.refcodes.rest.HomePathAccessor.HomePathBuilder<EurekaRegistrySidecar>, org.refcodes.rest.HomePathAccessor.HomePathMutator, org.refcodes.rest.HomePathAccessor.HomePathProperty, org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRegistrySidecar>, org.refcodes.rest.HttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>, org.refcodes.rest.HttpRegistryUrlAccessor, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<EurekaRegistrySidecar>, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlMutator, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlProperty, org.refcodes.rest.HttpServerDescriptorAccessor<EurekaServerDescriptor>, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<EurekaServerDescriptor,EurekaRegistrySidecar>, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorMutator<EurekaServerDescriptor>, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorProperty<EurekaServerDescriptor>, org.refcodes.rest.HttpServerDescriptorFactory<EurekaServerDescriptor>, org.refcodes.rest.PingPathAccessor, org.refcodes.rest.PingPathAccessor.PingPathBuilder<EurekaRegistrySidecar>, org.refcodes.rest.PingPathAccessor.PingPathMutator, org.refcodes.rest.PingPathAccessor.PingPathProperty, org.refcodes.rest.StatusPathAccessor, org.refcodes.rest.StatusPathAccessor.StatusPathBuilder<EurekaRegistrySidecar>, org.refcodes.rest.StatusPathAccessor.StatusPathMutator, org.refcodes.rest.StatusPathAccessor.StatusPathProperty, org.refcodes.security.TrustStoreDescriptorAccessor, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<EurekaRegistrySidecar>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty, org.refcodes.web.HostAccessor, org.refcodes.web.HostAccessor.HostBuilder<EurekaRegistrySidecar>, org.refcodes.web.HostAccessor.HostMutator, org.refcodes.web.HostAccessor.HostProperty, org.refcodes.web.SchemeAccessor, org.refcodes.web.SchemeAccessor.SchemeBuilder<EurekaRegistrySidecar>, org.refcodes.web.SchemeAccessor.SchemeMutator, org.refcodes.web.SchemeAccessor.SchemeProperty, org.refcodes.web.VirtualHostAccessor, org.refcodes.web.VirtualHostAccessor.VirtualHostBuilder<EurekaRegistrySidecar>, org.refcodes.web.VirtualHostAccessor.VirtualHostMutator, org.refcodes.web.VirtualHostAccessor.VirtualHostProperty

public class EurekaRegistrySidecar extends org.refcodes.rest.AbstractHttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar> implements EurekaRegistry<EurekaRegistrySidecar>, org.refcodes.rest.HttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>
The EurekaRegistrySidecar provides you with a library for registering your web-services at Eureka service registry and discovery.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor

    org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty

    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.Destroyable

    org.refcodes.component.Destroyable.DestroyAutomaton

    Nested classes/interfaces inherited from interface org.refcodes.rest.HomePathAccessor

    org.refcodes.rest.HomePathAccessor.HomePathBuilder<B extends org.refcodes.rest.HomePathAccessor.HomePathBuilder<?>>, org.refcodes.rest.HomePathAccessor.HomePathMutator, org.refcodes.rest.HomePathAccessor.HomePathProperty

    Nested classes/interfaces inherited from interface org.refcodes.web.HostAccessor

    org.refcodes.web.HostAccessor.HostBuilder<B extends org.refcodes.web.HostAccessor.HostBuilder<?>>, org.refcodes.web.HostAccessor.HostMutator, org.refcodes.web.HostAccessor.HostProperty

    Nested classes/interfaces inherited from interface org.refcodes.rest.HttpRegistryUrlAccessor

    org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B extends org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>>, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlMutator, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlProperty

    Nested classes/interfaces inherited from interface org.refcodes.rest.HttpServerDescriptorAccessor

    org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC extends org.refcodes.rest.HttpServerDescriptor,B extends org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>>, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC extends org.refcodes.rest.HttpServerDescriptor>, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC extends org.refcodes.rest.HttpServerDescriptor>

    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.mixin.InstanceIdAccessor

    org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B extends org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B>>, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty

    Nested classes/interfaces inherited from interface org.refcodes.net.IpAddressAccessor

    org.refcodes.net.IpAddressAccessor.IpAddressBuilder<B extends org.refcodes.net.IpAddressAccessor.IpAddressBuilder<B>>, org.refcodes.net.IpAddressAccessor.IpAddressMutator, org.refcodes.net.IpAddressAccessor.IpAddressProperty

    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.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.rest.PingPathAccessor

    org.refcodes.rest.PingPathAccessor.PingPathBuilder<B extends org.refcodes.rest.PingPathAccessor.PingPathBuilder<?>>, org.refcodes.rest.PingPathAccessor.PingPathMutator, org.refcodes.rest.PingPathAccessor.PingPathProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.PortAccessor

    org.refcodes.mixin.PortAccessor.PortBuilder<B extends org.refcodes.mixin.PortAccessor.PortBuilder<B>>, org.refcodes.mixin.PortAccessor.PortMutator, org.refcodes.mixin.PortAccessor.PortProperty

    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.web.SchemeAccessor

    org.refcodes.web.SchemeAccessor.SchemeBuilder<B extends org.refcodes.web.SchemeAccessor.SchemeBuilder<B>>, org.refcodes.web.SchemeAccessor.SchemeMutator, org.refcodes.web.SchemeAccessor.SchemeProperty

    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.rest.StatusPathAccessor

    org.refcodes.rest.StatusPathAccessor.StatusPathBuilder<B extends org.refcodes.rest.StatusPathAccessor.StatusPathBuilder<?>>, org.refcodes.rest.StatusPathAccessor.StatusPathMutator, org.refcodes.rest.StatusPathAccessor.StatusPathProperty

    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.VirtualHostAccessor

    org.refcodes.web.VirtualHostAccessor.VirtualHostBuilder<B extends org.refcodes.web.VirtualHostAccessor.VirtualHostBuilder<?>>, org.refcodes.web.VirtualHostAccessor.VirtualHostMutator, org.refcodes.web.VirtualHostAccessor.VirtualHostProperty
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.refcodes.rest.AbstractHttpRegistrySidecar

    _lifeCycleAutomaton, _pingRequestObserver
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new eureka registry sidecar.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    protected void
    Unregisters the given service at Eureka.
    protected static void
    doDeregister(EurekaRegistry<?> aRegistryService, ExecutorService aExecutorService)
    Unregisters the given service at Eureka.
    protected void
    Registers the given service at Eureka.
    protected static void
    doRegister(EurekaServiceStatus aServiceStatus, EurekaRegistry<?> aRegistryService, ExecutorService aExecutorService)
    Registers the given service at Eureka.
    protected void
    Does a Eureka status update for the given service.
    protected static void
    doStatusUpdate(EurekaServiceStatus aServiceStatus, EurekaRegistry<?> aRegistryService, ExecutorService aExecutorService)
    Does a Eureka status update for the given service.
    Retrieves the Eureka data center type from the Eureka data center type property.
    int
    org.refcodes.data.Scheme
    void
    initialize(EurekaServerDescriptor aServerDescriptor, org.refcodes.web.Url aRegistryUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
    void
    void
    void
    Sets the Eureka data center type for the Eureka data center type property.
    void
    setHomePath(String aHomePath)
    void
    setPort(int aPort)
    void
    setProtocol(String aProtocol)
    void
    setScheme(org.refcodes.data.Scheme aScheme)
    void
    setStatusPath(String aStatusPath)
    void
    void
    protected static AmazonMetaData
    Constructs the Amazon Meta-Data from the Machine's network and AWS settings.
    protected static EurekaDataCenterType
    Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
    protected static String
    toHomePath(String aHomePath, String aDefaultHomePath, org.refcodes.rest.HomePathAccessor.HomePathProperty aProperty)
    Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
    protected static org.refcodes.web.Url
    toHttpRegistryUrl(org.refcodes.web.Url aRegistryUrl, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlProperty aProperty)
    Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
    toHttpServerDescriptor(String aAlias, String aInstanceId, org.refcodes.data.Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, String aStatusPath, String aHomePath, EurekaDataCenterType aDataCenterType)
    Prepares the HttpServerDescriptor by creating it from this instance's state and the provided arguments.
    protected static String
    toInstanceId(String aInstanceId, String aHost, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty aProperty)
    Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
    protected static String
    toStatusPath(String aStatusPath, String aDefaultStatusPath, org.refcodes.rest.StatusPathAccessor.StatusPathProperty aProperty)
    Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.

    Methods inherited from class org.refcodes.rest.AbstractHttpRegistrySidecar

    getAlias, getHost, getHttpRegistryUrl, getHttpServerDescriptor, getInstanceId, getIpAddress, getLifecycleStatus, getPingPath, getTrustStoreDescriptor, getVirtualHost, initialize, isDestroyable, isDestroyed, isInitalizable, isInitialized, isPausable, isPaused, isResumable, isRunning, isStartable, isStoppable, isStopped, setAlias, setHost, setHttpRegistryUrl, setHttpServerDescriptor, setInstanceId, setIpAddress, setPingPath, setTrustStoreDescriptor, setVirtualHost, toAlias, toHost, toHttpServerDescriptor, toIpAddress, toPingPath, toPort, toScheme, toTrustStoreDescriptor, toVirtualHost

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.refcodes.mixin.AliasAccessor

    getAlias

    Methods inherited from interface org.refcodes.mixin.AliasAccessor.AliasMutator

    setAlias

    Methods inherited from interface org.refcodes.mixin.AliasAccessor.AliasProperty

    letAlias

    Methods inherited from interface org.refcodes.component.Configurable

    initializeUnchecked

    Methods inherited from interface org.refcodes.component.Destroyable.DestroyAutomaton

    isDestroyable, isDestroyed

    Methods inherited from interface org.refcodes.rest.ext.eureka.EurekaDataCenterTypeAccessor.EurekaDataCenterTypeProperty

    letEurekaDataCenterType

    Methods inherited from interface org.refcodes.rest.ext.eureka.EurekaRegistry

    initialize, initialize, initialize, withEurekaDataCenterType, withHomePath, withStatusPath

    Methods inherited from interface org.refcodes.rest.ext.eureka.EurekaServerDescriptorFactory

    toHttpServerDescriptor, toHttpServerDescriptor

    Methods inherited from interface org.refcodes.rest.HomePathAccessor.HomePathProperty

    letHomePath

    Methods inherited from interface org.refcodes.web.HostAccessor

    getHost

    Methods inherited from interface org.refcodes.web.HostAccessor.HostMutator

    setHost

    Methods inherited from interface org.refcodes.web.HostAccessor.HostProperty

    letHost

    Methods inherited from interface org.refcodes.rest.HttpRegistry

    initialize, initialize, initialize, initialize, initialize, initialize, withAlias, withCidrNotation, withHost, withHttpRegistryUrl, withHttpServerDescriptor, withInstanceId, withIpAddress, withPingPath, withTrustStoreDescriptor, withVirtualHost

    Methods inherited from interface org.refcodes.rest.HttpRegistrySidecar

    withPort, withProtocol, withScheme

    Methods inherited from interface org.refcodes.rest.HttpRegistryUrlAccessor

    getHttpRegistryUrl

    Methods inherited from interface org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlMutator

    setHttpRegistryUrl

    Methods inherited from interface org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlProperty

    letHttpRegistryUrl

    Methods inherited from interface org.refcodes.rest.HttpServerDescriptorAccessor

    getHttpServerDescriptor

    Methods inherited from interface org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorMutator

    setHttpServerDescriptor

    Methods inherited from interface org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorProperty

    letHttpServerDescriptor

    Methods inherited from interface org.refcodes.rest.HttpServerDescriptorFactory

    toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor

    Methods inherited from interface org.refcodes.component.Initializable

    initializeUnchecked

    Methods inherited from interface org.refcodes.component.Initializable.InitializeAutomaton

    isInitalizable

    Methods inherited from interface org.refcodes.component.InitializedAccessor

    isInitialized

    Methods inherited from interface org.refcodes.mixin.InstanceIdAccessor

    getInstanceId

    Methods inherited from interface org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator

    setInstanceId

    Methods inherited from interface org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty

    letInstanceId

    Methods inherited from interface org.refcodes.net.IpAddressAccessor

    getIpAddress, toCidrNotation

    Methods inherited from interface org.refcodes.net.IpAddressAccessor.IpAddressMutator

    fromCidrNotation, setIpAddress

    Methods inherited from interface org.refcodes.net.IpAddressAccessor.IpAddressProperty

    letIpAddress

    Methods inherited from interface org.refcodes.component.LifecycleStatusAccessor

    getLifecycleStatus

    Methods inherited from interface org.refcodes.component.Pausable

    pauseUnchecked

    Methods inherited from interface org.refcodes.component.Pausable.PauseAutomaton

    isPausable, isPaused

    Methods inherited from interface org.refcodes.rest.PingPathAccessor

    getPingPath

    Methods inherited from interface org.refcodes.rest.PingPathAccessor.PingPathMutator

    setPingPath

    Methods inherited from interface org.refcodes.rest.PingPathAccessor.PingPathProperty

    letPingPath

    Methods inherited from interface org.refcodes.mixin.PortAccessor.PortProperty

    letPort

    Methods inherited from interface org.refcodes.component.Resumable

    resumeUnchecked

    Methods inherited from interface org.refcodes.component.Resumable.ResumeAutomaton

    isResumable

    Methods inherited from interface org.refcodes.component.RunningAccessor

    isRunning

    Methods inherited from interface org.refcodes.web.SchemeAccessor.SchemeProperty

    letProtocol, letScheme

    Methods inherited from interface org.refcodes.component.Startable

    startUnchecked

    Methods inherited from interface org.refcodes.component.Startable.StartAutomaton

    isStartable

    Methods inherited from interface org.refcodes.rest.StatusPathAccessor.StatusPathProperty

    letStatusPath

    Methods inherited from interface org.refcodes.component.Stoppable

    stopUnchecked

    Methods inherited from interface org.refcodes.component.Stoppable.StopAutomaton

    isStoppable, isStopped

    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.VirtualHostAccessor

    getVirtualHost

    Methods inherited from interface org.refcodes.web.VirtualHostAccessor.VirtualHostMutator

    setVirtualHost

    Methods inherited from interface org.refcodes.web.VirtualHostAccessor.VirtualHostProperty

    letVirtualHost
  • Field Details

  • Constructor Details

    • EurekaRegistrySidecar

      public EurekaRegistrySidecar(ExecutorService aExecutorService)
      Instantiates a new eureka registry sidecar.
      Parameters:
      aExecutorService - An executor service to be used when creating Threads.
  • Method Details

    • initialize

      public void initialize(EurekaServerDescriptor aServerDescriptor, org.refcodes.web.Url aRegistryUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) throws org.refcodes.component.InitializeException
      Specified by:
      initialize in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRegistrySidecar>
      Throws:
      org.refcodes.component.InitializeException
    • start

      public void start() throws org.refcodes.component.StartException
      Specified by:
      start in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRegistrySidecar>
      Specified by:
      start in interface org.refcodes.component.Startable
      Overrides:
      start in class org.refcodes.rest.AbstractHttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>
      Throws:
      org.refcodes.component.StartException
    • pause

      public void pause() throws org.refcodes.component.PauseException
      Specified by:
      pause in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRegistrySidecar>
      Specified by:
      pause in interface org.refcodes.component.Pausable
      Overrides:
      pause in class org.refcodes.rest.AbstractHttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>
      Throws:
      org.refcodes.component.PauseException
    • resume

      public void resume() throws org.refcodes.component.ResumeException
      Specified by:
      resume in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRegistrySidecar>
      Specified by:
      resume in interface org.refcodes.component.Resumable
      Overrides:
      resume in class org.refcodes.rest.AbstractHttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>
      Throws:
      org.refcodes.component.ResumeException
    • stop

      public void stop() throws org.refcodes.component.StopException
      Specified by:
      stop in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRegistrySidecar>
      Specified by:
      stop in interface org.refcodes.component.Stoppable
      Overrides:
      stop in class org.refcodes.rest.AbstractHttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>
      Throws:
      org.refcodes.component.StopException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.refcodes.component.Destroyable
      Specified by:
      destroy in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRegistrySidecar>
      Overrides:
      destroy in class org.refcodes.rest.AbstractHttpRegistrySidecar<EurekaServerDescriptor,EurekaRegistrySidecar>
    • setPort

      public void setPort(int aPort)
      Specified by:
      setPort in interface org.refcodes.mixin.PortAccessor.PortMutator
    • getPort

      public int getPort()
      Specified by:
      getPort in interface org.refcodes.mixin.PortAccessor
    • toProtocol

      public String toProtocol()
      Specified by:
      toProtocol in interface org.refcodes.web.SchemeAccessor
    • setProtocol

      public void setProtocol(String aProtocol)
      Specified by:
      setProtocol in interface org.refcodes.web.SchemeAccessor.SchemeMutator
    • setScheme

      public void setScheme(org.refcodes.data.Scheme aScheme)
      Specified by:
      setScheme in interface org.refcodes.web.SchemeAccessor.SchemeMutator
    • getScheme

      public org.refcodes.data.Scheme getScheme()
      Specified by:
      getScheme in interface org.refcodes.web.SchemeAccessor
    • getHomePath

      public String getHomePath()
      Specified by:
      getHomePath in interface org.refcodes.rest.HomePathAccessor
    • setHomePath

      public void setHomePath(String aHomePath)
      Specified by:
      setHomePath in interface org.refcodes.rest.HomePathAccessor.HomePathMutator
    • getStatusPath

      public String getStatusPath()
      Specified by:
      getStatusPath in interface org.refcodes.rest.StatusPathAccessor
    • setStatusPath

      public void setStatusPath(String aStatusPath)
      Specified by:
      setStatusPath in interface org.refcodes.rest.StatusPathAccessor.StatusPathMutator
    • getEurekaDataCenterType

      public EurekaDataCenterType getEurekaDataCenterType()
      Retrieves the Eureka data center type from the Eureka data center type property.
      Specified by:
      getEurekaDataCenterType in interface EurekaDataCenterTypeAccessor
      Returns:
      The Eureka data center type stored by the Eureka data center type property.
    • setEurekaDataCenterType

      public void setEurekaDataCenterType(EurekaDataCenterType aDataCenterType)
      Sets the Eureka data center type for the Eureka data center type property.
      Specified by:
      setEurekaDataCenterType in interface EurekaDataCenterTypeAccessor.EurekaDataCenterTypeMutator
      Parameters:
      aDataCenterType - The Eureka data center type to be stored by the Eureka data center type property.
    • toHttpServerDescriptor

      public EurekaServerDescriptor toHttpServerDescriptor(String aAlias, String aInstanceId, org.refcodes.data.Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, String aStatusPath, String aHomePath, EurekaDataCenterType aDataCenterType)
      Prepares the HttpServerDescriptor by creating it from this instance's state and the provided arguments. The provided arguments can modify theinstance's state. The HttpServerDescriptor as finally used is returned. You may modify this context and use it after modification to initialize the server via HttpRegistry.initialize(HttpServerDescriptor, Url) or HttpRegistry.initialize(HttpServerDescriptor, Url, TrustStoreDescriptor).
      Specified by:
      toHttpServerDescriptor in interface EurekaServerDescriptorFactory
      Parameters:
      aAlias - The name ("alias") which identifies the server in the registry.
      aInstanceId - The TID for the instance when being registered at the service registry. If omitted, then the host name is used.
      aScheme - The Scheme to which this server is being attached (HTTP or HTTPS).
      aHost - The host name to be used to address this server. If omitted, then the system's host name should be used.
      aVirtualHost - The virtual host name to be used for resolving.
      aIpAddress - The IP-Address identifying the host.
      aPort - The port of your service being registered. Make sure, you do not
      aPingPath - The path to use as health-check end-point by this server.
      aStatusPath - The path to use as status-page end-point by this server.
      aHomePath - The path to use as home-page end-point by this server.
      aDataCenterType - The data center type to be used.
      Returns:
      The HttpServerDescriptor as would be used when initializing this instance via HttpRegistry.initialize()
    • toHomePath

      protected static String toHomePath(String aHomePath, String aDefaultHomePath, org.refcodes.rest.HomePathAccessor.HomePathProperty aProperty)
      Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
      Parameters:
      aHomePath - The value to be used when not null.
      aDefaultHomePath - The value to be used when instance TID is null.
      aProperty - The property to be used when the value is null and which is to be set when the value is not null.
      Returns:
      The value when not null, else the value of the provided property.
    • toStatusPath

      protected static String toStatusPath(String aStatusPath, String aDefaultStatusPath, org.refcodes.rest.StatusPathAccessor.StatusPathProperty aProperty)
      Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
      Parameters:
      aStatusPath - The value to be used when not null.
      aDefaultStatusPath - The value to be used when instance TID is null.
      aProperty - The property to be used when the value is null and which is to be set when the value is not null.
      Returns:
      The value when not null, else the value of the provided property.
    • toInstanceId

      protected static String toInstanceId(String aInstanceId, String aHost, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty aProperty)
      Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
      Parameters:
      aInstanceId - The value to be used when not null.
      aHost - The value to be used when instance TID is null.
      aProperty - The property to be used when the value is null and which is to be set when the value is not null.
      Returns:
      The value when not null, else the value of the provided property.
    • doRegister

      protected void doRegister(EurekaServiceStatus aServiceStatus) throws org.refcodes.web.HttpStatusException, IOException
      Registers the given service at Eureka.
      Parameters:
      aServiceStatus - The EurekaServiceStatus to be set.
      Throws:
      org.refcodes.web.HttpStatusException - Thrown in case a HTTP response was of an erroneous status.
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • doRegister

      protected static void doRegister(EurekaServiceStatus aServiceStatus, EurekaRegistry<?> aRegistryService, ExecutorService aExecutorService) throws org.refcodes.web.HttpStatusException, IOException
      Registers the given service at Eureka.
      Parameters:
      aServiceStatus - The EurekaServiceStatus to be set.
      aRegistryService - The registry service to be used for registering.
      aExecutorService - The ExecutorService used to create threads.
      Throws:
      org.refcodes.web.HttpStatusException - Thrown in case a HTTP response was of an erroneous status.
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • doStatusUpdate

      protected void doStatusUpdate(EurekaServiceStatus aServiceStatus) throws IOException, UnknownHostException, org.refcodes.web.HttpStatusException
      Does a Eureka status update for the given service.
      Parameters:
      aServiceStatus - The EurekaServiceStatus to be set.
      Throws:
      org.refcodes.web.HttpStatusException - Thrown in case a HTTP response was of an erroneous status.
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
      UnknownHostException - Thrown in case the targeted host is unknown.
    • doStatusUpdate

      protected static void doStatusUpdate(EurekaServiceStatus aServiceStatus, EurekaRegistry<?> aRegistryService, ExecutorService aExecutorService) throws IOException, UnknownHostException, org.refcodes.web.HttpStatusException
      Does a Eureka status update for the given service.
      Parameters:
      aServiceStatus - The EurekaServiceStatus to be set.
      aRegistryService - The registry service to be used for registering.
      aExecutorService - The ExecutorService used to create threads.
      Throws:
      org.refcodes.web.HttpStatusException - Thrown in case a HTTP response was of an erroneous status.
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
      UnknownHostException - Thrown in case the targeted host is unknown.
    • doDeregister

      protected void doDeregister() throws IOException, org.refcodes.web.HttpStatusException
      Unregisters the given service at Eureka.
      Throws:
      org.refcodes.web.HttpStatusException - Thrown in case a HTTP response was of an erroneous status.t
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • doDeregister

      protected static void doDeregister(EurekaRegistry<?> aRegistryService, ExecutorService aExecutorService) throws IOException, org.refcodes.web.HttpStatusException
      Unregisters the given service at Eureka.
      Parameters:
      aRegistryService - The registry service to be used for registering.
      aExecutorService - The ExecutorService used to create threads.
      Throws:
      org.refcodes.web.HttpStatusException - Thrown in case a HTTP response was of an erroneous status.t
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • toHttpRegistryUrl

      protected static org.refcodes.web.Url toHttpRegistryUrl(org.refcodes.web.Url aRegistryUrl, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlProperty aProperty)
      Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
      Parameters:
      aRegistryUrl - 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.
      Returns:
      The value when not null, else the value of the provided property.
    • toDataCenterType

      protected static EurekaDataCenterType toDataCenterType(EurekaDataCenterType aDataCenterType, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeProperty aProperty)
      Resolves the property from the provided value and the provided property and sets the property in case the provided value is not null.
      Parameters:
      aDataCenterType - 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.
      Returns:
      The value when not null, else the value of the provided property.
    • toAmazonMetaData

      protected static AmazonMetaData toAmazonMetaData()
      Constructs the Amazon Meta-Data from the Machine's network and AWS settings.
      Returns:
      The according Amazon Meta-Data.