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
public interface HttpRegistry<DESC extends HttpServerDescriptor, B extends HttpRegistry<DESC,B>>
extends Configurable<HttpRegistryContext<DESC>>, HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC>, HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>, PingPathAccessor.PingPathProperty, PingPathAccessor.PingPathBuilder<B>, HostAccessor.HostProperty, HostAccessor.HostBuilder<B>, VirtualHostAccessor.VirtualHostProperty, VirtualHostAccessor.VirtualHostBuilder<B>, IpAddressAccessor.IpAddressProperty, IpAddressAccessor.IpAddressBuilder<B>, InstanceIdAccessor.InstanceIdProperty, InstanceIdAccessor.InstanceIdBuilder<B>, AliasAccessor.AliasProperty, AliasAccessor.AliasBuilder<B>, LifecycleComponent.LifecycleAutomaton, HttpRegistryUrlAccessor.HttpRegistryUrlProperty, HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>, TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty, TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>, HttpServerDescriptorFactory<DESC>
The
HttpRegistry describes the functionality required in order to
register a service at a service registry 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 AliasAccessor
AliasAccessor.AliasBuilder<B>, AliasAccessor.AliasMutator, AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface Configurable
Configurable.ConfigureAutomaton<CTX>, Configurable.ConfigureBuilder<CTX,B> Nested classes/interfaces inherited from interface Destroyable
Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface HostAccessor
HostAccessor.HostBuilder<B>, HostAccessor.HostMutator, HostAccessor.HostPropertyNested classes/interfaces inherited from interface HttpRegistryUrlAccessor
HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>, HttpRegistryUrlAccessor.HttpRegistryUrlMutator, HttpRegistryUrlAccessor.HttpRegistryUrlPropertyNested classes/interfaces inherited from interface HttpServerDescriptorAccessor
HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>, HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC>, HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC> Nested classes/interfaces inherited from interface Initializable
Initializable.InitializeAutomaton, Initializable.InitializeBuilder<B>, Initializable.UncheckedInitializableNested classes/interfaces inherited from interface InitializedAccessor
InitializedAccessor.InitializedMutator, InitializedAccessor.InitializedPropertyNested classes/interfaces inherited from interface InstanceIdAccessor
InstanceIdAccessor.InstanceIdBuilder<B>, InstanceIdAccessor.InstanceIdMutator, InstanceIdAccessor.InstanceIdPropertyNested classes/interfaces inherited from interface IpAddressAccessor
IpAddressAccessor.IpAddressBuilder<B>, IpAddressAccessor.IpAddressMutator, IpAddressAccessor.IpAddressPropertyNested classes/interfaces inherited from interface LifecycleComponent
LifecycleComponent.LifecycleAutomaton, LifecycleComponent.UncheckedLifecycleComponentNested classes/interfaces inherited from interface LifecycleStatusAccessor
LifecycleStatusAccessor.LifecycleStatusBuilder<B>, LifecycleStatusAccessor.LifecycleStatusMutator, LifecycleStatusAccessor.LifecycleStatusPropertyNested classes/interfaces inherited from interface Pausable
Pausable.PauseAutomaton, Pausable.PauseBuilder<B>, Pausable.UncheckedPausableNested classes/interfaces inherited from interface PingPathAccessor
PingPathAccessor.PingPathBuilder<B>, PingPathAccessor.PingPathMutator, PingPathAccessor.PingPathPropertyNested classes/interfaces inherited from interface Resumable
Resumable.ResumeAutomaton, Resumable.ResumeBuilder<B>, Resumable.UncheckedResumableNested classes/interfaces inherited from interface RunningAccessor
RunningAccessor.RunningMutator, RunningAccessor.RunningPropertyNested classes/interfaces inherited from interface Startable
Startable.StartAutomaton, Startable.StartBuilder<B>, Startable.UncheckedStartableNested classes/interfaces inherited from interface Stoppable
Stoppable.StopAutomaton, Stoppable.StopBuilder<B>, Stoppable.UncheckedStoppableNested classes/interfaces inherited from interface TrustStoreDescriptorAccessor
TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>, TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, TrustStoreDescriptorAccessor.TrustStoreDescriptorPropertyNested classes/interfaces inherited from interface VirtualHostAccessor
VirtualHostAccessor.VirtualHostBuilder<B>, VirtualHostAccessor.VirtualHostMutator, VirtualHostAccessor.VirtualHostProperty -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()This server is taken (removed) from the registry server.default voidInitializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".default voidinitialize(DESC aServerDescriptor, Url aRegistryUrl) Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".voidinitialize(DESC aServerDescriptor, Url aRegistryUrl, TrustStoreDescriptor aStoreDescriptor) Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".default voidinitialize(String aAlias, String aInstanceId, Scheme aScheme, int aPort, Url aRegistryUrl) Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".default voidinitialize(String aAlias, String aInstanceId, Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, Url aRegistryUrl) Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".default voidinitialize(String aAlias, Scheme aScheme, String aHost, int aPort, Url aRegistryUrl) Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".default voidinitialize(String aAlias, Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, Url aRegistryUrl) Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".default voidinitialize(HttpRegistryContext<DESC> aRegistryContext) Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".voidpause()Some "deactivated" status is communicated to the registry server.voidresume()Some "up-and-running (again)" status is communicated to the registry server.voidstart()Some "up-and-running" status is communicated to the registry server.voidstop()Some "out-of-order" status is communicated to the registry server.default Bdefault BwithCidrNotation(String aCidrNotation) default Bdefault BwithHttpRegistryUrl(Url aUrl) Sets the URL for the URL property locating the service registry registry.default BwithHttpServerDescriptor(DESC aServerDescriptor) Sets theHttpServerDescriptorfor theHttpServerDescriptorproperty.default BwithInstanceId(String aInstanceId) default BwithIpAddress(int[] aIpAddress) default BwithPingPath(String aPingPath) Sets the ping path to use and returns this builder as of the builder pattern.default BwithTrustStoreDescriptor(TrustStoreDescriptor aStoreDescriptor) default BwithVirtualHost(String aVirtualHost) Methods inherited from interface AliasAccessor
getAliasMethods inherited from interface AliasAccessor.AliasMutator
setAliasMethods inherited from interface AliasAccessor.AliasProperty
letAliasMethods inherited from interface Configurable
initializeUncheckedMethods inherited from interface Destroyable.DestroyAutomaton
isDestroyable, isDestroyedMethods inherited from interface HostAccessor
getHostMethods inherited from interface HostAccessor.HostMutator
setHostMethods inherited from interface HostAccessor.HostProperty
letHostMethods inherited from interface HttpRegistryUrlAccessor
getHttpRegistryUrlMethods inherited from interface HttpRegistryUrlAccessor.HttpRegistryUrlMutator
setHttpRegistryUrlMethods inherited from interface HttpRegistryUrlAccessor.HttpRegistryUrlProperty
letHttpRegistryUrlMethods inherited from interface HttpServerDescriptorAccessor
getHttpServerDescriptorMethods inherited from interface HttpServerDescriptorAccessor.HttpServerDescriptorMutator
setHttpServerDescriptorMethods inherited from interface HttpServerDescriptorAccessor.HttpServerDescriptorProperty
letHttpServerDescriptorMethods inherited from interface HttpServerDescriptorFactory
toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptorMethods inherited from interface Initializable
initializeUncheckedMethods inherited from interface Initializable.InitializeAutomaton
isInitalizableMethods inherited from interface InitializedAccessor
isInitializedMethods inherited from interface InstanceIdAccessor
getInstanceIdMethods inherited from interface InstanceIdAccessor.InstanceIdMutator
setInstanceIdMethods inherited from interface InstanceIdAccessor.InstanceIdProperty
letInstanceIdMethods inherited from interface IpAddressAccessor
getIpAddress, toCidrNotationMethods inherited from interface IpAddressAccessor.IpAddressMutator
fromCidrNotation, setIpAddressMethods inherited from interface IpAddressAccessor.IpAddressProperty
letIpAddressMethods inherited from interface LifecycleStatusAccessor
getLifecycleStatusMethods inherited from interface Pausable
pauseUncheckedMethods inherited from interface Pausable.PauseAutomaton
isPausable, isPausedMethods inherited from interface PingPathAccessor
getPingPathMethods inherited from interface PingPathAccessor.PingPathMutator
setPingPathMethods inherited from interface PingPathAccessor.PingPathProperty
letPingPathMethods inherited from interface Resumable
resumeUncheckedMethods inherited from interface Resumable.ResumeAutomaton
isResumableMethods inherited from interface RunningAccessor
isRunningMethods inherited from interface Startable
startUncheckedMethods inherited from interface Startable.StartAutomaton
isStartableMethods inherited from interface Stoppable
stopUncheckedMethods inherited from interface Stoppable.StopAutomaton
isStoppable, isStoppedMethods inherited from interface TrustStoreDescriptorAccessor
getTrustStoreDescriptorMethods inherited from interface TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
setTrustStoreDescriptorMethods inherited from interface TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
letTrustStoreDescriptorMethods inherited from interface VirtualHostAccessor
getVirtualHostMethods inherited from interface VirtualHostAccessor.VirtualHostMutator
setVirtualHostMethods inherited from interface VirtualHostAccessor.VirtualHostProperty
letVirtualHost
-
Method Details
-
withAlias
- Specified by:
withAliasin interfaceAliasAccessor.AliasBuilder<DESC extends HttpServerDescriptor>
-
withPingPath
Sets the ping path to use and returns this builder as of the builder pattern.- Specified by:
withPingPathin interfacePingPathAccessor.PingPathBuilder<DESC extends HttpServerDescriptor>- Parameters:
aPingPath- The ping path to be stored by the ping path property.- Returns:
- This
PingPathAccessor.PingPathBuilderinstance to continue configuration.
-
withHttpRegistryUrl
Sets the URL for the URL property locating the service registry registry.- Specified by:
withHttpRegistryUrlin interfaceHttpRegistryUrlAccessor.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
Sets theHttpServerDescriptorfor theHttpServerDescriptorproperty.- Specified by:
withHttpServerDescriptorin interfaceHttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC extends HttpServerDescriptor, B extends HttpRegistry<DESC,B>> - Parameters:
aServerDescriptor- TheHttpServerDescriptorto be stored by theHttpServerDescriptorproperty.- Returns:
- The builder for applying multiple build operations.
-
withHost
- Specified by:
withHostin interfaceHostAccessor.HostBuilder<DESC extends HttpServerDescriptor>
-
withVirtualHost
- Specified by:
withVirtualHostin interfaceVirtualHostAccessor.VirtualHostBuilder<DESC extends HttpServerDescriptor>
-
withIpAddress
- Specified by:
withIpAddressin interfaceIpAddressAccessor.IpAddressBuilder<DESC extends HttpServerDescriptor>
-
withCidrNotation
- Specified by:
withCidrNotationin interfaceIpAddressAccessor.IpAddressBuilder<DESC extends HttpServerDescriptor>
-
withTrustStoreDescriptor
- Specified by:
withTrustStoreDescriptorin interfaceTrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<DESC extends HttpServerDescriptor>
-
withInstanceId
- Specified by:
withInstanceIdin interfaceInstanceIdAccessor.InstanceIdBuilder<DESC extends HttpServerDescriptor>
-
initialize
Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".- Specified by:
initializein interfaceInitializable- Throws:
InitializeException- the initialize exception
-
initialize
Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".- Specified by:
initializein interfaceConfigurable<DESC extends HttpServerDescriptor>- Parameters:
aRegistryContext- The context providing the descriptor of the server to be registered and theUrlof 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
Initializes theHttpRegistryby 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 theHttpRegistryby 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 theHttpRegistryby 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- TheSchemeto 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 theHttpRegistryby 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- TheSchemeto 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 theHttpRegistryby 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- TheSchemeto 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 theHttpRegistryby 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- TheSchemeto 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
Some "up-and-running" status is communicated to the registry server. May also start a "ping" or "heartbeat" daemon.
- Specified by:
startin interfaceStartable- Throws:
StartException
-
pause
Some "deactivated" status is communicated to the registry server.
- Specified by:
pausein interfacePausable- Throws:
PauseException
-
resume
Some "up-and-running (again)" status is communicated to the registry server.
- Specified by:
resumein interfaceResumable- Throws:
ResumeException
-
stop
Some "out-of-order" status is communicated to the registry server. Also stops a "ping" or "heartbeat" daemon.
- Specified by:
stopin interfaceStoppable- 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:
destroyin interfaceDestroyable
-