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

    • Nested Class Summary

      • 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 java.lang.Object>, org.refcodes.component.Configurable.ConfigureBuilder<CTX extends java.lang.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.net.HostAccessor

        org.refcodes.net.HostAccessor.HostBuilder<B extends org.refcodes.net.HostAccessor.HostBuilder<?>>, org.refcodes.net.HostAccessor.HostMutator, org.refcodes.net.HostAccessor.HostProperty
      • 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.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.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.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.net.VirtualHostAccessor

        org.refcodes.net.VirtualHostAccessor.VirtualHostBuilder<B extends org.refcodes.net.VirtualHostAccessor.VirtualHostBuilder<?>>, org.refcodes.net.VirtualHostAccessor.VirtualHostMutator, org.refcodes.net.VirtualHostAccessor.VirtualHostProperty
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void destroy()
      This server is taken (removed) from the registry server.
      default void initialize()
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      default void initialize​(DESC aServerDescriptor, org.refcodes.net.Url aRegistryUrl)
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      void initialize​(DESC aServerDescriptor, org.refcodes.net.Url aRegistryUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      default void initialize​(java.lang.String aAlias, java.lang.String aInstanceId, org.refcodes.data.Scheme aScheme, int aPort, org.refcodes.net.Url aRegistryUrl)
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      default void initialize​(java.lang.String aAlias, java.lang.String aInstanceId, org.refcodes.data.Scheme aScheme, java.lang.String aHost, java.lang.String aVirtualHost, int[] aIpAddress, int aPort, java.lang.String aPingPath, org.refcodes.net.Url aRegistryUrl)
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      default void initialize​(java.lang.String aAlias, org.refcodes.data.Scheme aScheme, java.lang.String aHost, int aPort, org.refcodes.net.Url aRegistryUrl)
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      default void initialize​(java.lang.String aAlias, org.refcodes.data.Scheme aScheme, java.lang.String aHost, java.lang.String aVirtualHost, int[] aIpAddress, int aPort, java.lang.String aPingPath, org.refcodes.net.Url aRegistryUrl)
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      default void initialize​(HttpRegistryContext<DESC> aRegistryContext)
      Initializes the HttpRegistry by registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".
      void pause()
      Some "deactivated" status is communicated to the registry server.
      void resume()
      Some "up-and-running (again)" status is communicated to the registry server.
      void start()
      Some "up-and-running" status is communicated to the registry server.
      void stop()
      Some "out-of-order" status is communicated to the registry server.
      default B withAlias​(java.lang.String aAlias)
      default B withCidrNotation​(java.lang.String aCidrNotation)
      default B withHost​(java.lang.String aHost)
      default B withHttpRegistryUrl​(org.refcodes.net.Url aUrl)
      Sets the URL for the URL property locating the service registry registry.
      default B withHttpServerDescriptor​(DESC aServerDescriptor)
      Sets the HttpServerDescriptor for the HttpServerDescriptor property.
      default B withInstanceId​(java.lang.String aInstanceId)
      default B withIpAddress​(int[] aIpAddress)
      default B withPingPath​(java.lang.String aPingPath)
      Sets the ping path to use and returns this builder as of the builder pattern.
      default B withTrustStoreDescriptor​(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
      default B withVirtualHost​(java.lang.String aVirtualHost)
      • 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.component.Configurable

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

        isDestroyable, isDestroyed
      • Methods inherited from interface org.refcodes.net.HostAccessor

        getHost
      • Methods inherited from interface org.refcodes.net.HostAccessor.HostMutator

        setHost
      • 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.net.IpAddressAccessor

        getIpAddress, toCidrNotation
      • Methods inherited from interface org.refcodes.net.IpAddressAccessor.IpAddressMutator

        fromCidrNotation, setIpAddress
      • 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.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.component.Startable

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

        isStartable
      • 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.net.VirtualHostAccessor

        getVirtualHost
      • Methods inherited from interface org.refcodes.net.VirtualHostAccessor.VirtualHostMutator

        setVirtualHost
    • Method Detail

      • withAlias

        default B withAlias​(java.lang.String aAlias)
        Specified by:
        withAlias in interface org.refcodes.mixin.AliasAccessor.AliasBuilder<DESC extends HttpServerDescriptor>
      • withHost

        default B withHost​(java.lang.String aHost)
        Specified by:
        withHost in interface org.refcodes.net.HostAccessor.HostBuilder<DESC extends HttpServerDescriptor>
      • withVirtualHost

        default B withVirtualHost​(java.lang.String aVirtualHost)
        Specified by:
        withVirtualHost in interface org.refcodes.net.VirtualHostAccessor.VirtualHostBuilder<DESC extends HttpServerDescriptor>
      • withIpAddress

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

        default B withCidrNotation​(java.lang.String aCidrNotation)
        Specified by:
        withCidrNotation in interface org.refcodes.net.IpAddressAccessor.IpAddressBuilder<DESC extends HttpServerDescriptor>
      • withTrustStoreDescriptor

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

        default B withInstanceId​(java.lang.String aInstanceId)
        Specified by:
        withInstanceId in interface org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<DESC extends HttpServerDescriptor>
      • initialize

        default void initialize()
                         throws org.refcodes.component.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 org.refcodes.component.Initializable
        Throws:
        org.refcodes.component.InitializeException
      • initialize

        default void initialize​(HttpRegistryContext<DESC> aRegistryContext)
                         throws org.refcodes.component.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 org.refcodes.component.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:
        org.refcodes.component.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,
                                org.refcodes.net.Url aRegistryUrl)
                         throws org.refcodes.component.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:
        org.refcodes.component.InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
      • initialize

        void initialize​(DESC aServerDescriptor,
                        org.refcodes.net.Url aRegistryUrl,
                        org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
                 throws org.refcodes.component.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:
        org.refcodes.component.InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
      • initialize

        default void initialize​(java.lang.String aAlias,
                                java.lang.String aInstanceId,
                                org.refcodes.data.Scheme aScheme,
                                int aPort,
                                org.refcodes.net.Url aRegistryUrl)
                         throws org.refcodes.component.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 ID 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:
        org.refcodes.component.InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
      • initialize

        default void initialize​(java.lang.String aAlias,
                                org.refcodes.data.Scheme aScheme,
                                java.lang.String aHost,
                                int aPort,
                                org.refcodes.net.Url aRegistryUrl)
                         throws org.refcodes.component.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:
        org.refcodes.component.InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
      • initialize

        default void initialize​(java.lang.String aAlias,
                                org.refcodes.data.Scheme aScheme,
                                java.lang.String aHost,
                                java.lang.String aVirtualHost,
                                int[] aIpAddress,
                                int aPort,
                                java.lang.String aPingPath,
                                org.refcodes.net.Url aRegistryUrl)
                         throws org.refcodes.component.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:
        org.refcodes.component.InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
      • initialize

        default void initialize​(java.lang.String aAlias,
                                java.lang.String aInstanceId,
                                org.refcodes.data.Scheme aScheme,
                                java.lang.String aHost,
                                java.lang.String aVirtualHost,
                                int[] aIpAddress,
                                int aPort,
                                java.lang.String aPingPath,
                                org.refcodes.net.Url aRegistryUrl)
                         throws org.refcodes.component.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 ID 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:
        org.refcodes.component.InitializeException - thrown in case initializing a component caused problems. Usually a method similar to "initialize()" throws such an exception.
      • start

        void start()
            throws org.refcodes.component.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 org.refcodes.component.Startable
        Throws:
        org.refcodes.component.StartException
      • pause

        void pause()
            throws org.refcodes.component.PauseException
        Some "deactivated" status is communicated to the registry server.
        Specified by:
        pause in interface org.refcodes.component.Pausable
        Throws:
        org.refcodes.component.PauseException
      • resume

        void resume()
             throws org.refcodes.component.ResumeException
        Some "up-and-running (again)" status is communicated to the registry server.
        Specified by:
        resume in interface org.refcodes.component.Resumable
        Throws:
        org.refcodes.component.ResumeException
      • stop

        void stop()
           throws org.refcodes.component.StopException
        Some "out-of-order" status is communicated to the registry server. Also stops a "ping" or "heartbeat" daemon.
        Specified by:
        stop in interface org.refcodes.component.Stoppable
        Throws:
        org.refcodes.component.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 org.refcodes.component.Destroyable