Interface HttpRestRegistryServer<DESC extends HttpServerDescriptor, B extends HttpRestRegistryServer<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, BaseLocatorAccessor, BaseLocatorAccessor.BaseLocatorBuilder<RestServer>, BaseLocatorAccessor.BaseLocatorMutator, BaseLocatorAccessor.BaseLocatorProperty, BasicAuthObservable<HttpRestServer>, Closable, Closable.CloseBuilder<ConnectionComponent.ConnectionComponentBuilder<HttpServerContext, HttpRestServer>>, Configurable<HttpRegistryContext<DESC>>, ConnectionComponent<HttpServerContext>, ConnectionComponent.ConnectionComponentBuilder<HttpServerContext, HttpRestServer>, ConnectionOpenable<HttpServerContext>, ConnectionOpenable.ConnectionOpenBuilder<HttpServerContext, ConnectionComponent.ConnectionComponentBuilder<HttpServerContext, HttpRestServer>>, ConnectionStatusAccessor, Destroyable, Destroyable.DestroyAutomaton, HostAccessor, HostAccessor.HostBuilder<B>, HostAccessor.HostMutator, HostAccessor.HostProperty, HttpExceptionHandlerAccessor, HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<HttpRestServer>, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty, HttpExceptionHandlingAccessor, HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<HttpRestServer>, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty, HttpRegistry<DESC,B>, HttpRegistryUrlAccessor, HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>, HttpRegistryUrlAccessor.HttpRegistryUrlMutator, HttpRegistryUrlAccessor.HttpRegistryUrlProperty, HttpRestServer, HttpsConnectionRequestObservable<HttpRestServer>, HttpServerDescriptorAccessor<DESC>, HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC, B>, HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC>, HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC>, HttpServerDescriptorFactory<DESC>, HttpServerInterceptable, Initializable, Initializable.InitializeAutomaton, InitializedAccessor, InstanceIdAccessor, InstanceIdAccessor.InstanceIdBuilder<B>, InstanceIdAccessor.InstanceIdMutator, InstanceIdAccessor.InstanceIdProperty, IpAddressAccessor, IpAddressAccessor.IpAddressBuilder<B>, IpAddressAccessor.IpAddressMutator, IpAddressAccessor.IpAddressProperty, KeyStoreDescriptorAccessor, KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<HttpRestServer>, KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator, KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty, LifecycleComponent, LifecycleComponent.LifecycleAutomaton, LifecycleStatusAccessor, LinkComponent, MaxConnectionsAccessor, MaxConnectionsAccessor.MaxConnectionsBuilder<HttpRestServer>, MaxConnectionsAccessor.MaxConnectionsMutator, MaxConnectionsAccessor.MaxConnectionsProperty, MediaTypeFactoryLookup, MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup, Observable<RestEndpoint>, Observers<RestEndpoint, RestServer>, Openable, OpenedAccessor, Pausable, Pausable.PauseAutomaton, PingPathAccessor, PingPathAccessor.PingPathBuilder<B>, PingPathAccessor.PingPathMutator, PingPathAccessor.PingPathProperty, PingRequestObserver, PingRequestObserverAccessor, PingRequestObserverAccessor.PingRequestObserverBuilder<B>, PortAccessor, PortAccessor.PortBuilder<HttpRestServer>, PortAccessor.PortMutator, PortAccessor.PortProperty, PostHttpInterceptable<PostHttpServerInterceptor>, PostHttpServerInterceptable, PreHttpInterceptable<PreHttpServerInterceptor>, PreHttpServerInterceptable, RealmAccessor, RealmAccessor.RealmBuilder<RestServer>, RealmAccessor.RealmMutator, RealmAccessor.RealmProperty, RestServer, Resumable, Resumable.ResumeAutomaton, RunningAccessor, SchemeAccessor, SchemeAccessor.SchemeBuilder<HttpRestServer>, SchemeAccessor.SchemeMutator, SchemeAccessor.SchemeProperty, Startable, Startable.StartAutomaton, Stoppable, Stoppable.StopAutomaton, TrustStoreDescriptorAccessor, TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>, TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty, VirtualHostAccessor, VirtualHostAccessor.VirtualHostBuilder<B>, VirtualHostAccessor.VirtualHostMutator, VirtualHostAccessor.VirtualHostProperty
- All Known Implementing Classes:
AbstractHttpRestRegistryServerDecorator
HttpRestRegistryServer provides additional functionality for
registering at and signing off from a service discovery service in order to
resolve URLs to or from other services. This type is intended to be used by
different separate hierarchy branches by providing of 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 BaseLocatorAccessor
BaseLocatorAccessor.BaseLocatorBuilder<B>, BaseLocatorAccessor.BaseLocatorMutator, BaseLocatorAccessor.BaseLocatorPropertyNested classes/interfaces inherited from interface Closable
Closable.CloseAutomaton, Closable.CloseBuilder<B>Nested classes/interfaces inherited from interface Configurable
Configurable.ConfigureAutomaton<CTX>, Configurable.ConfigureBuilder<CTX,B> Nested classes/interfaces inherited from interface ConnectionComponent
ConnectionComponent.ConnectionAutomaton<CON>, ConnectionComponent.ConnectionComponentBuilder<CON,B> Nested classes/interfaces inherited from interface ConnectionOpenable
ConnectionOpenable.ConnectionOpenAutomaton<CON>, ConnectionOpenable.ConnectionOpenBuilder<CON,B> Nested classes/interfaces inherited from interface ConnectionStatusAccessor
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusPropertyNested 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 HttpExceptionHandlerAccessor
HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B>, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, HttpExceptionHandlerAccessor.HttpExceptionHandlerPropertyNested classes/interfaces inherited from interface HttpExceptionHandlingAccessor
HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B>, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, HttpExceptionHandlingAccessor.HttpExceptionHandlingPropertyNested 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 KeyStoreDescriptorAccessor
KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<B>, KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator, KeyStoreDescriptorAccessor.KeyStoreDescriptorPropertyNested 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 LinkComponent
LinkComponent.LinkAutomaton, LinkComponent.LinkComponentBuilder<B>Nested classes/interfaces inherited from interface MaxConnectionsAccessor
MaxConnectionsAccessor.MaxConnectionsBuilder<B>, MaxConnectionsAccessor.MaxConnectionsMutator, MaxConnectionsAccessor.MaxConnectionsPropertyNested classes/interfaces inherited from interface MediaTypeFactoryLookup
MediaTypeFactoryLookup.MutableMediaTypeFactoryLookupNested classes/interfaces inherited from interface Openable
Openable.OpenAutomaton, Openable.OpenBuilder<B>Nested classes/interfaces inherited from interface OpenedAccessor
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedPropertyNested 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 PingRequestObserverAccessor
PingRequestObserverAccessor.PingRequestObserverBuilder<B>, PingRequestObserverAccessor.PingRequestObserverMutator, PingRequestObserverAccessor.PingRequestObserverPropertyNested classes/interfaces inherited from interface PortAccessor
PortAccessor.PortBuilder<B>, PortAccessor.PortMutator, PortAccessor.PortPropertyNested classes/interfaces inherited from interface RealmAccessor
RealmAccessor.RealmBuilder<B>, RealmAccessor.RealmMutator, RealmAccessor.RealmPropertyNested 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 SchemeAccessor
SchemeAccessor.SchemeBuilder<B>, SchemeAccessor.SchemeMutator, SchemeAccessor.SchemePropertyNested 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.voidinitialize(String aAlias, String aInstanceId, Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, RestRequestConsumer aPingRequestObserver, Url aRegistryUrl) Initializes theHttpRestRegistryServerby 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, RestRequestConsumer aPingRequestObserver, Url aRegistryUrl) Initializes theHttpRestRegistryServerby 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 BwithPingRequestObserver(RestRequestConsumer aRequestConsumer) Sets the pingRestRequestConsumerfor the pingRestRequestConsumerproperty.default BwithPort(int aPort) default BwithProtocol(String aProtocol) default BwithScheme(Scheme aScheme) Methods inherited from interface AliasAccessor
getAliasMethods inherited from interface AliasAccessor.AliasMutator
setAliasMethods inherited from interface AliasAccessor.AliasProperty
letAliasMethods inherited from interface BaseLocatorAccessor
getBaseLocatorMethods inherited from interface BaseLocatorAccessor.BaseLocatorMutator
setBaseLocatorMethods inherited from interface BaseLocatorAccessor.BaseLocatorProperty
letBaseLocatorMethods inherited from interface BasicAuthObservable
onBasicAuthRequestMethods inherited from interface Closable
close, closeIn, closeQuietly, closeUncheckedMethods inherited from interface Closable.CloseBuilder
withCloseUncheckedMethods inherited from interface Configurable
initializeUncheckedMethods inherited from interface ConnectionOpenable
openUncheckedMethods inherited from interface ConnectionOpenable.ConnectionOpenBuilder
withOpenUncheckedMethods inherited from interface ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods 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 HttpExceptionHandlerAccessor
getHttpExceptionHandlerMethods inherited from interface HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder
withOnHttpExceptionMethods inherited from interface HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator
onHttpException, setHttpExceptionHandlerMethods inherited from interface HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
letHttpExceptionHandlerMethods inherited from interface HttpExceptionHandlingAccessor
getHttpExceptionHandlingMethods inherited from interface HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator
setHttpExceptionHandlingMethods inherited from interface HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
letHttpExceptionHandlingMethods inherited from interface HttpRegistry
initialize, initialize, initialize, initialize, initialize, initialize, initialize, initialize, withAlias, withCidrNotation, withHost, withHttpRegistryUrl, withHttpServerDescriptor, withInstanceId, withIpAddress, withPingPath, withTrustStoreDescriptor, withVirtualHostMethods inherited from interface HttpRegistryUrlAccessor
getHttpRegistryUrlMethods inherited from interface HttpRegistryUrlAccessor.HttpRegistryUrlMutator
setHttpRegistryUrlMethods inherited from interface HttpRegistryUrlAccessor.HttpRegistryUrlProperty
letHttpRegistryUrlMethods inherited from interface HttpRestServer
open, open, open, open, open, open, open, open, open, open, open, open, open, withBaseLocator, withClose, withCloseIn, withCloseQuietly, withHttpExceptionHandler, withHttpExceptionHandling, withKeyStoreDescriptor, withMaxConnections, withOpen, withOpen, withRealmMethods inherited from interface HttpsConnectionRequestObservable
onConnectionRequestMethods 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 HttpServerInterceptable
addHttpInterceptor, hasHttpInterceptor, removeHttpInterceptorMethods 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 KeyStoreDescriptorAccessor
getKeyStoreDescriptorMethods inherited from interface KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator
setKeyStoreDescriptorMethods inherited from interface KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty
letKeyStoreDescriptorMethods inherited from interface LifecycleStatusAccessor
getLifecycleStatusMethods inherited from interface MaxConnectionsAccessor
getMaxConnectionsMethods inherited from interface MaxConnectionsAccessor.MaxConnectionsMutator
setMaxConnectionsMethods inherited from interface MaxConnectionsAccessor.MaxConnectionsProperty
letMaxConnectionsMethods inherited from interface MediaTypeFactoryLookup
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactoryMethods inherited from interface MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
addMediaTypeFactoryMethods inherited from interface Observable
hasObserver, subscribeObserver, unsubscribeObserverMethods inherited from interface Observers
disableObservers, enableObservers, isObserversActive, observers, setObserversActiveMethods inherited from interface Openable
openUncheckedMethods 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 PingRequestObserver
onPingRequestMethods inherited from interface PingRequestObserverAccessor
getPingRequestObserverMethods inherited from interface PortAccessor
getPortMethods inherited from interface PortAccessor.PortMutator
setPortMethods inherited from interface PortAccessor.PortProperty
letPortMethods inherited from interface PostHttpInterceptable
addPostHttpInterceptor, hasPostHttpInterceptor, removePostHttpInterceptorMethods inherited from interface PreHttpInterceptable
addPreHttpInterceptor, hasPreHttpInterceptor, removePreHttpInterceptorMethods inherited from interface RealmAccessor
getRealmMethods inherited from interface RealmAccessor.RealmMutator
setRealmMethods inherited from interface RealmAccessor.RealmProperty
letRealmMethods inherited from interface RestServer
onDelete, onDelete, onGet, onGet, onPost, onPost, onPut, onPut, onRequest, onRequest, onRequest, onRequest, onRequest, withDisableObservers, withEnableObservers, withObserversActiveMethods inherited from interface Resumable
resumeUncheckedMethods inherited from interface Resumable.ResumeAutomaton
isResumableMethods inherited from interface RunningAccessor
isRunningMethods inherited from interface SchemeAccessor
getScheme, toProtocolMethods inherited from interface SchemeAccessor.SchemeMutator
setProtocol, setSchemeMethods inherited from interface SchemeAccessor.SchemeProperty
letProtocol, letSchemeMethods 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
-
withPort
- Specified by:
withPortin interfaceHttpRestServer- Specified by:
withPortin interfacePortAccessor.PortBuilder<DESC extends HttpServerDescriptor>
-
withScheme
- Specified by:
withSchemein interfaceHttpRestServer- Specified by:
withSchemein interfaceSchemeAccessor.SchemeBuilder<DESC extends HttpServerDescriptor>
-
withProtocol
- Specified by:
withProtocolin interfaceHttpRestServer- Specified by:
withProtocolin interfaceSchemeAccessor.SchemeBuilder<DESC extends HttpServerDescriptor>
-
withPingRequestObserver
Sets the pingRestRequestConsumerfor the pingRestRequestConsumerproperty.- Specified by:
withPingRequestObserverin interfacePingRequestObserverAccessor.PingRequestObserverBuilder<DESC extends HttpServerDescriptor>- Parameters:
aRequestConsumer- The pingRestRequestConsumerto be stored by the pingRestRequestConsumerproperty.- Returns:
- The builder for applying multiple build operations.
-
initialize
default void initialize(String aAlias, Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, RestRequestConsumer aPingRequestObserver, Url aRegistryUrl) throws InitializeException Initializes theHttpRestRegistryServerby 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.aPingRequestObserver- TheRestRequestConsumerhooking into a ping request.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
void initialize(String aAlias, String aInstanceId, Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, RestRequestConsumer aPingRequestObserver, Url aRegistryUrl) throws InitializeException Initializes theHttpRestRegistryServerby 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.aPingRequestObserver- TheRestRequestConsumerhooking into a ping request.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. The registered
RestEndpointinstances (observers) (e.g. viaRestServer.onRequest(org.refcodes.web.HttpMethod, String, RestRequestConsumer),RestServer.onGet(String, RestRequestConsumer)RestServer.onPut(String, RestRequestConsumer),RestServer.onPut(String, RestRequestConsumer)orRestServer.onDelete(String, RestRequestConsumer)) are enabled by callingObservers.enableObservers(). If necessary, the connection is opened viaHttpRestServer.open()or the like. May also start a "ping" or "heartbeat" daemon.Some "up-and-running" status is communicated to the registry server. May also start a "ping" or "heartbeat" daemon.
- Specified by:
startin interfaceHttpRegistry<DESC extends HttpServerDescriptor, B extends HttpRestRegistryServer<DESC,B>> - Specified by:
startin interfaceStartable- Throws:
StartException
-
pause
Some "deactivated" status is communicated to the registry server. The registered
RestEndpointinstances (observers) (e.g. viaRestEndpointBuilderbeing registered e.g. viaRestServer.onRequest(org.refcodes.web.HttpMethod, String, RestRequestConsumer),RestServer.onGet(String, RestRequestConsumer)RestServer.onPut(String, RestRequestConsumer),RestServer.onPut(String, RestRequestConsumer)orRestServer.onDelete(String, RestRequestConsumer)is closed by calling itsRestEndpointBuilder.close()) are disabled by callingObservers.disableObservers().Some "deactivated" status is communicated to the registry server.
- Specified by:
pausein interfaceHttpRegistry<DESC extends HttpServerDescriptor, B extends HttpRestRegistryServer<DESC,B>> - Specified by:
pausein interfacePausable- Throws:
PauseException
-
resume
Some "up-and-running (again)" status is communicated to the registry server. The registered
RestEndpointinstances (observers) (e.g. viaRestEndpointBuilderbeing registered e.g. viaRestServer.onRequest(org.refcodes.web.HttpMethod, String, RestRequestConsumer),RestServer.onGet(String, RestRequestConsumer)RestServer.onPut(String, RestRequestConsumer),RestServer.onPut(String, RestRequestConsumer)orRestServer.onDelete(String, RestRequestConsumer)is closed by calling itsRestEndpointBuilder.close()) are enabled (again) by callingObservers.enableObservers().Some "up-and-running (again)" status is communicated to the registry server.
- Specified by:
resumein interfaceHttpRegistry<DESC extends HttpServerDescriptor, B extends HttpRestRegistryServer<DESC,B>> - Specified by:
resumein interfaceResumable- Throws:
ResumeException
-
stop
Some "out-of-order" status is communicated to the registry server. The registered
RestEndpointinstances (observers) (e.g. viaRestServer.onRequest(org.refcodes.web.HttpMethod, String, RestRequestConsumer),RestServer.onGet(String, RestRequestConsumer)RestServer.onPut(String, RestRequestConsumer),RestServer.onPut(String, RestRequestConsumer)orRestServer.onDelete(String, RestRequestConsumer)) are disabled by callingObservers.disableObservers(). Also stops a "ping" or "heartbeat" daemon.Some "out-of-order" status is communicated to the registry server. Also stops a "ping" or "heartbeat" daemon.
- Specified by:
stopin interfaceHttpRegistry<DESC extends HttpServerDescriptor, B extends HttpRestRegistryServer<DESC,B>> - Specified by:
stopin interfaceStoppable- Throws:
StopException
-
destroy
void destroy()This server is taken (removed) from the registry server. The registered
RestEndpointinstances (observers) (e.g. viaRestServer.onRequest(org.refcodes.web.HttpMethod, String, RestRequestConsumer),RestServer.onGet(String, RestRequestConsumer)RestServer.onPut(String, RestRequestConsumer),RestServer.onPut(String, RestRequestConsumer)orRestServer.onDelete(String, RestRequestConsumer)) are disabled by callingObservers.disableObservers(). Also stops a "ping" or "heartbeat" daemon. Finally the connection is closed viaClosable.close().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- Specified by:
destroyin interfaceHttpRegistry<DESC extends HttpServerDescriptor, B extends HttpRestRegistryServer<DESC,B>>
-