Interface HttpRegistry<DESC extends HttpServerDescriptor, B extends HttpRegistry<DESC,B>>

Type Parameters:
DESC - The type of the server discovery descriptor (the object describing your service and locating the service registry).
B - In order to implement the builder pattern with a coherent type hierarchy.
All Superinterfaces:
AliasAccessor, AliasAccessor.AliasBuilder<B>, AliasAccessor.AliasMutator, AliasAccessor.AliasProperty, Configurable<HttpRegistryContext<DESC>>, Destroyable, Destroyable.DestroyAutomaton, HostAccessor, HostAccessor.HostBuilder<B>, HostAccessor.HostMutator, HostAccessor.HostProperty, HttpRegistryUrlAccessor, HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>, HttpRegistryUrlAccessor.HttpRegistryUrlMutator, HttpRegistryUrlAccessor.HttpRegistryUrlProperty, HttpServerDescriptorAccessor<DESC>, HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>, HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC>, HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC>, HttpServerDescriptorFactory<DESC>, Initializable, Initializable.InitializeAutomaton, InitializedAccessor, InstanceIdAccessor, InstanceIdAccessor.InstanceIdBuilder<B>, InstanceIdAccessor.InstanceIdMutator, InstanceIdAccessor.InstanceIdProperty, IpAddressAccessor, IpAddressAccessor.IpAddressBuilder<B>, IpAddressAccessor.IpAddressMutator, IpAddressAccessor.IpAddressProperty, LifecycleComponent, LifecycleComponent.LifecycleAutomaton, LifecycleStatusAccessor, Pausable, Pausable.PauseAutomaton, PingPathAccessor, PingPathAccessor.PingPathBuilder<B>, PingPathAccessor.PingPathMutator, PingPathAccessor.PingPathProperty, Resumable, Resumable.ResumeAutomaton, RunningAccessor, Startable, Startable.StartAutomaton, Stoppable, Stoppable.StopAutomaton, TrustStoreDescriptorAccessor, TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>, TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty, VirtualHostAccessor, VirtualHostAccessor.VirtualHostBuilder<B>, VirtualHostAccessor.VirtualHostMutator, VirtualHostAccessor.VirtualHostProperty
All Known Subinterfaces:
HttpRegistrySidecar<DESC,B>, HttpRestRegistryServer<DESC,B>
All Known Implementing Classes:
AbstractHttpRegistrySidecar, AbstractHttpRestRegistryServerDecorator

  • Method Details

    • withAlias

      default B withAlias(String aAlias)
      Specified by:
      withAlias in interface AliasAccessor.AliasBuilder<DESC extends HttpServerDescriptor>
    • withPingPath

      default B withPingPath(String aPingPath)
      Sets the ping path to use and returns this builder as of the builder pattern.
      Specified by:
      withPingPath in interface PingPathAccessor.PingPathBuilder<DESC extends HttpServerDescriptor>
      Parameters:
      aPingPath - The ping path to be stored by the ping path property.
      Returns:
      This PingPathAccessor.PingPathBuilder instance to continue configuration.
    • withHttpRegistryUrl

      default B withHttpRegistryUrl(Url aUrl)
      Sets the URL for the URL property locating the service registry registry.
      Specified by:
      withHttpRegistryUrl in interface HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<DESC extends HttpServerDescriptor>
      Parameters:
      aUrl - The service registry registry URL to be stored by the URL property.
      Returns:
      The builder for applying multiple build operations.
    • withHttpServerDescriptor

      default B withHttpServerDescriptor(DESC aServerDescriptor)
      Sets the HttpServerDescriptor for the HttpServerDescriptor property.
      Specified by:
      withHttpServerDescriptor in interface HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC extends HttpServerDescriptor, B extends HttpRegistry<DESC,B>>
      Parameters:
      aServerDescriptor - The HttpServerDescriptor to be stored by the HttpServerDescriptor property.
      Returns:
      The builder for applying multiple build operations.
    • withHost

      default B withHost(String aHost)
      Specified by:
      withHost in interface HostAccessor.HostBuilder<DESC extends HttpServerDescriptor>
    • withVirtualHost

      default B withVirtualHost(String aVirtualHost)
      Specified by:
      withVirtualHost in interface VirtualHostAccessor.VirtualHostBuilder<DESC extends HttpServerDescriptor>
    • withIpAddress

      default B withIpAddress(int[] aIpAddress)
      Specified by:
      withIpAddress in interface IpAddressAccessor.IpAddressBuilder<DESC extends HttpServerDescriptor>
    • withCidrNotation

      default B withCidrNotation(String aCidrNotation)
      Specified by:
      withCidrNotation in interface IpAddressAccessor.IpAddressBuilder<DESC extends HttpServerDescriptor>
    • withTrustStoreDescriptor

      default B withTrustStoreDescriptor(TrustStoreDescriptor aStoreDescriptor)
      Specified by:
      withTrustStoreDescriptor in interface TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<DESC extends HttpServerDescriptor>
    • withInstanceId

      default B withInstanceId(String aInstanceId)
      Specified by:
      withInstanceId in interface InstanceIdAccessor.InstanceIdBuilder<DESC extends HttpServerDescriptor>
    • initialize

      default void initialize() throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      Specified by:
      initialize in interface Initializable
      Throws:
      InitializeException - the initialize exception
    • initialize

      default void initialize(HttpRegistryContext<DESC> aRegistryContext) throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      Specified by:
      initialize in interface Configurable<DESC extends HttpServerDescriptor>
      Parameters:
      aRegistryContext - The context providing the descriptor of the server to be registered and the Url of the service registry to be used as well as the required truststore.
      Throws:
      InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
    • initialize

      default void initialize(DESC aServerDescriptor, Url aRegistryUrl) throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      Parameters:
      aServerDescriptor - The descriptor of the server to be registered.
      aRegistryUrl - The URL of the service registry to be used.
      Throws:
      InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
    • initialize

      void initialize(DESC aServerDescriptor, Url aRegistryUrl, TrustStoreDescriptor aStoreDescriptor) throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      Parameters:
      aServerDescriptor - The descriptor of the server to be registered.
      aRegistryUrl - The URL of the service registry to be used.
      aStoreDescriptor - The descriptor describing the truststore for (optionally) opening an HTTPS connection to the registry server.
      Throws:
      InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
    • initialize

      default void initialize(String aAlias, String aInstanceId, Scheme aScheme, int aPort, Url aRegistryUrl) throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      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).
      aPort - The port of your service being registered.
      aRegistryUrl - The registry server where to register.
      Throws:
      InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
    • initialize

      default void initialize(String aAlias, Scheme aScheme, String aHost, int aPort, Url aRegistryUrl) throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      Parameters:
      aAlias - The name ("alias") which identifies the server in the registry.
      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.
      aPort - The port of your service being registered.
      aRegistryUrl - The registry server where to register.
      Throws:
      InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
    • initialize

      default void initialize(String aAlias, Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, Url aRegistryUrl) throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      Parameters:
      aAlias - The name ("alias") which identifies the server in the registry.
      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.
      aPingPath - The path to use as health-check end-point by this server.
      aRegistryUrl - The registry server where to register.
      Throws:
      InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
    • initialize

      default void initialize(String aAlias, String aInstanceId, Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, Url aRegistryUrl) throws InitializeException
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      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.
      aPingPath - The path to use as health-check end-point by this server.
      aRegistryUrl - The registry server where to register.
      Throws:
      InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
    • start

      void start() throws StartException

      Some "up-and-running" status is communicated to the registry server. May also start a "ping" or "heartbeat" daemon.

      Specified by:
      start in interface Startable
      Throws:
      StartException
    • pause

      void pause() throws PauseException

      Some "deactivated" status is communicated to the registry server.

      Specified by:
      pause in interface Pausable
      Throws:
      PauseException
    • resume

      void resume() throws ResumeException

      Some "up-and-running (again)" status is communicated to the registry server.

      Specified by:
      resume in interface Resumable
      Throws:
      ResumeException
    • stop

      void stop() throws StopException

      Some "out-of-order" status is communicated to the registry server. Also stops a "ping" or "heartbeat" daemon.

      Specified by:
      stop in interface Stoppable
      Throws:
      StopException
    • destroy

      void destroy()

      This server is taken (removed) from the registry server. Also stops a "ping" or "heartbeat" daemon. Finally the connection is closed.

      Specified by:
      destroy in interface Destroyable