Package org.refcodes.rest
Class AbstractHttpRegistryRestServerDecorator<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
- java.lang.Object
-
- org.refcodes.rest.AbstractHttpRestServerDecorator<B>
-
- org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<DESC,B>
-
- All Implemented Interfaces:
org.refcodes.component.Closable,org.refcodes.component.Closable.CloseBuilder<DESC>,org.refcodes.component.Configurable<DESC>,org.refcodes.component.ConnectionComponent<DESC>,org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<DESC,B>,org.refcodes.component.ConnectionOpenable<DESC>,org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<DESC,B>,org.refcodes.component.ConnectionStatusAccessor,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.LinkComponent,org.refcodes.component.Openable,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.io.MaxConnectionsAccessor,org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<DESC>,org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator,org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty,org.refcodes.mixin.AliasAccessor,org.refcodes.mixin.AliasAccessor.AliasBuilder<DESC>,org.refcodes.mixin.AliasAccessor.AliasMutator,org.refcodes.mixin.AliasAccessor.AliasProperty,org.refcodes.mixin.InstanceIdAccessor,org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<DESC>,org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator,org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty,org.refcodes.mixin.PortAccessor,org.refcodes.mixin.PortAccessor.PortBuilder<DESC>,org.refcodes.mixin.PortAccessor.PortMutator,org.refcodes.mixin.PortAccessor.PortProperty,org.refcodes.net.BaseLocatorAccessor,org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<DESC>,org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator,org.refcodes.net.BaseLocatorAccessor.BaseLocatorProperty,org.refcodes.net.BasicAuthObservable<DESC>,org.refcodes.net.HostAccessor,org.refcodes.net.HostAccessor.HostBuilder<DESC>,org.refcodes.net.HostAccessor.HostMutator,org.refcodes.net.HostAccessor.HostProperty,org.refcodes.net.HttpsConnectionRequestObservable<DESC>,org.refcodes.net.IpAddressAccessor,org.refcodes.net.IpAddressAccessor.IpAddressBuilder<DESC>,org.refcodes.net.IpAddressAccessor.IpAddressMutator,org.refcodes.net.IpAddressAccessor.IpAddressProperty,org.refcodes.net.MediaTypeFactoryLookup,org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup,org.refcodes.net.RealmAccessor,org.refcodes.net.RealmAccessor.RealmBuilder<DESC>,org.refcodes.net.RealmAccessor.RealmMutator,org.refcodes.net.RealmAccessor.RealmProperty,org.refcodes.net.SchemeAccessor,org.refcodes.net.SchemeAccessor.SchemeBuilder<DESC>,org.refcodes.net.SchemeAccessor.SchemeMutator,org.refcodes.net.SchemeAccessor.SchemeProperty,org.refcodes.net.VirtualHostAccessor,org.refcodes.net.VirtualHostAccessor.VirtualHostBuilder<DESC>,org.refcodes.net.VirtualHostAccessor.VirtualHostMutator,org.refcodes.net.VirtualHostAccessor.VirtualHostProperty,org.refcodes.observer.Observable<DESC>,org.refcodes.observer.Observers<DESC,B>,HttpExceptionHandlerAccessor,HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<DESC>,HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator,HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty,HttpExceptionHandlingAccessor,HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<DESC>,HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator,HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty,HttpRegistry<DESC,B>,HttpRegistryRestServer<DESC,B>,HttpRegistryUrlAccessor,HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<DESC>,HttpRegistryUrlAccessor.HttpRegistryUrlMutator,HttpRegistryUrlAccessor.HttpRegistryUrlProperty,HttpRestServer,HttpServerDescriptorAccessor<DESC>,HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>,HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC>,HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC>,HttpServerDescriptorFactory<DESC>,PingPathAccessor,PingPathAccessor.PingPathBuilder<DESC>,PingPathAccessor.PingPathMutator,PingPathAccessor.PingPathProperty,PingRequestObserver,PingRequestObserverAccessor,PingRequestObserverAccessor.PingRequestObserverBuilder<DESC>,RestServer,org.refcodes.runtime.RequestCorrelation<DESC>,org.refcodes.runtime.SessionCorrelation<DESC>,org.refcodes.security.KeyStoreDescriptorAccessor,org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<DESC>,org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator,org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty,org.refcodes.security.TrustStoreDescriptorAccessor,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<DESC>,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
public abstract class AbstractHttpRegistryRestServerDecorator<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>> extends AbstractHttpRestServerDecorator<B> implements HttpRegistryRestServer<DESC,B>
Abstract class for easily decorating aHttpRegistryRestServer.
-
-
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.net.BaseLocatorAccessor
org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<B extends org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<B>>, org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator, org.refcodes.net.BaseLocatorAccessor.BaseLocatorProperty
-
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
-
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.ConnectionComponent
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionOpenable
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
-
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.rest.HttpExceptionHandlerAccessor
HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B extends HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B>>, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
-
Nested classes/interfaces inherited from interface org.refcodes.rest.HttpExceptionHandlingAccessor
HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B extends HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B>>, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
-
Nested classes/interfaces inherited from interface org.refcodes.rest.HttpRegistryUrlAccessor
HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B extends HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>>, HttpRegistryUrlAccessor.HttpRegistryUrlMutator, HttpRegistryUrlAccessor.HttpRegistryUrlProperty
-
Nested classes/interfaces inherited from interface org.refcodes.rest.HttpServerDescriptorAccessor
HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC extends HttpServerDescriptor,B extends HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>>, HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC extends HttpServerDescriptor>, HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC extends 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.security.KeyStoreDescriptorAccessor
org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<B extends org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<B>>, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty
-
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.LinkComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.io.MaxConnectionsAccessor
org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<B extends org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<B>>, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.MediaTypeFactoryLookup
org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
-
Nested classes/interfaces inherited from interface org.refcodes.component.Openable
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
-
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
PingPathAccessor.PingPathBuilder<B extends PingPathAccessor.PingPathBuilder<?>>, PingPathAccessor.PingPathMutator, PingPathAccessor.PingPathProperty
-
Nested classes/interfaces inherited from interface org.refcodes.rest.PingRequestObserverAccessor
PingRequestObserverAccessor.PingRequestObserverBuilder<B extends PingRequestObserverAccessor.PingRequestObserverBuilder<B>>, PingRequestObserverAccessor.PingRequestObserverMutator, PingRequestObserverAccessor.PingRequestObserverProperty
-
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.net.RealmAccessor
org.refcodes.net.RealmAccessor.RealmBuilder<B extends org.refcodes.net.RealmAccessor.RealmBuilder<B>>, org.refcodes.net.RealmAccessor.RealmMutator, org.refcodes.net.RealmAccessor.RealmProperty
-
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.net.SchemeAccessor
org.refcodes.net.SchemeAccessor.SchemeBuilder<B extends org.refcodes.net.SchemeAccessor.SchemeBuilder<B>>, org.refcodes.net.SchemeAccessor.SchemeMutator, org.refcodes.net.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.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
-
-
Field Summary
Fields Modifier and Type Field Description protected org.refcodes.component.LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl_lifeCycleAutomatonprotected RestRequestObserver_pingRequestObserver-
Fields inherited from class org.refcodes.rest.AbstractHttpRestServerDecorator
_server
-
-
Constructor Summary
Constructors Constructor Description AbstractHttpRegistryRestServerDecorator(HttpRestServer aServer)Decorates the givenHttpRestServerwith discovery functionality.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()This server is taken (removed) from the registry server.java.lang.StringgetAlias()java.lang.StringgetHost()org.refcodes.net.UrlgetHttpRegistryUrl()Retrieves the URL from the URL property locating the service registry registry.DESCgetHttpServerDescriptor()Retrieves theHttpServerDescriptorfrom theHttpServerDescriptorproperty.java.lang.StringgetInstanceId()int[]getIpAddress()org.refcodes.component.LifeCycleStatusgetLifeCycleStatus()java.lang.StringgetPingPath()Retrieves the ping path from the ping path property.RestRequestObservergetPingRequestObserver()Retrieves the pingRestRequestObserverfrom the pingRestRequestObserverproperty.org.refcodes.security.TrustStoreDescriptorgetTrustStoreDescriptor()java.lang.StringgetVirtualHost()voidinitialize()Initializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".booleanisDestroyable()booleanisDestroyed()booleanisInitalizable()booleanisInitialized()booleanisPausable()booleanisPaused()booleanisResumable()booleanisRunning()booleanisStartable()booleanisStoppable()booleanisStopped()voidonPingRequest(RestRequestObserver aRequestObserver)Sets the pingRestRequestObserverlistening for "ping" requests.voidpause()Some "deactivated" status is communicated to the registry server.voidresume()Some "up-and-running (again)" status is communicated to the registry server.voidsetAlias(java.lang.String aAlias)voidsetHost(java.lang.String aHost)voidsetHttpRegistryUrl(org.refcodes.net.Url aRegistryUrl)Sets the URL for the URL property locating the service registry registry.voidsetHttpServerDescriptor(DESC aServerDescriptor)Sets theHttpServerDescriptorfor theHttpServerDescriptorproperty.voidsetInstanceId(java.lang.String aInstanceId)voidsetIpAddress(int[] aIpAddress)voidsetPingPath(java.lang.String aPingPath)Sets the ping path for the ping path property.voidsetTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)voidsetVirtualHost(java.lang.String aVirtualHost)voidstart()Some "up-and-running" status is communicated to the registry server.voidstop()Some "out-of-order" status is communicated to the registry server.protected java.lang.StringtoAlias(java.lang.String aAlias)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected java.lang.StringtoHost(java.lang.String aHost)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected org.refcodes.net.UrltoHttpRegistryUrl(org.refcodes.net.Url aRegistryUrl)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected DESCtoHttpServerDescriptor(DESC aServerDescriptor)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected java.lang.StringtoInstanceId(java.lang.String aInstanceId, java.lang.String aHost)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected int[]toIpAddress(int[] aIpAddress)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected RestRequestObservertoPingObserver(RestRequestObserver aPingRequestObserver)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected java.lang.StringtoPingPath(java.lang.String aPingPath, java.lang.String aDefaultPingPath)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected inttoPort(int aPort)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected org.refcodes.data.SchemetoScheme(org.refcodes.data.Scheme aScheme)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected org.refcodes.security.TrustStoreDescriptortoTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.protected java.lang.StringtoVirtualHost(java.lang.String aVirtualHost)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.-
Methods inherited from class org.refcodes.rest.AbstractHttpRestServerDecorator
addMediaTypeFactory, close, closeIn, closeQuietly, closeUnchecked, disableRequestCorrelation, disableSessionCorrelation, enableRequestCorrelation, enableSessionCorrelation, getBaseLocator, getFactoryMediaTypes, getKeyStoreDescriptor, getMaxConnections, getPort, getRealm, getScheme, hasMediaTypeFactory, hasObserverSubscription, hasRequestCorrelation, hasSessionCorrelation, observers, onBasicAuthRequest, onConnectionRequest, onDelete, onGet, onPost, onPut, onRequest, onRequest, onRequest, open, open, open, open, openUnchecked, setBaseLocator, setKeyStoreDescriptor, setMaxConnections, setPort, setProtocol, setRealm, setRequestCorrelation, setScheme, setSessionCorrelation, subscribeObserver, toMediaTypeFactory, toProtocol, unsubscribeObserver, withBaseLocator, withClose, withCloseIn, withCloseQuietly, withCloseUnchecked, withDisableRequestCorrelation, withDisableSessionCorrelation, withEnableRequestCorrelation, withEnableSessionCorrelation, withOpen, withOpenUnchecked, withRealm, withRequestCorrelation, withSessionCorrelation
-
Methods inherited from interface org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator
setBaseLocator
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder
withOpenUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isConnectionOpened
-
Methods inherited from interface org.refcodes.rest.HttpExceptionHandlerAccessor
getHttpExceptionHandler
-
Methods inherited from interface org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder
withOnHttpException
-
Methods inherited from interface org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator
onHttpException, setHttpExceptionHandler
-
Methods inherited from interface org.refcodes.rest.HttpExceptionHandlingAccessor
getHttpExceptionHandling
-
Methods inherited from interface org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator
setHttpExceptionHandling
-
Methods inherited from interface org.refcodes.rest.HttpRegistry
initialize, initialize, initialize, initialize, initialize, initialize, initialize, withAlias, withCidrNotation, withHost, withHttpRegistryUrl, withHttpServerDescriptor, withInstanceId, withIpAddress, withPingPath, withTrustStoreDescriptor, withVirtualHost
-
Methods inherited from interface org.refcodes.rest.HttpRegistryRestServer
initialize, initialize, withPingRequestObserver, withPort, withProtocol, withScheme
-
Methods inherited from interface org.refcodes.rest.HttpRestServer
open, open, open, open, open, open, open, open, open, open, open, open, open, withBaseLocator, withClose, withCloseIn, withCloseQuietly, withDisableRequestCorrelation, withDisableSessionCorrelation, withEnableRequestCorrelation, withEnableSessionCorrelation, withHttpExceptionHandler, withHttpExceptionHandling, withKeyStoreDescriptor, withMaxConnections, withOpen, withOpen, withRealm, withRequestCorrelation, withSessionCorrelation
-
Methods inherited from interface org.refcodes.net.HttpsConnectionRequestObservable
onConnectionRequest
-
Methods inherited from interface org.refcodes.rest.HttpServerDescriptorFactory
toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor
-
Methods inherited from interface org.refcodes.net.IpAddressAccessor.IpAddressMutator
fromCidrNotation
-
Methods inherited from interface org.refcodes.security.KeyStoreDescriptorAccessor
getKeyStoreDescriptor
-
Methods inherited from interface org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator
setKeyStoreDescriptor
-
Methods inherited from interface org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator
setMaxConnections
-
Methods inherited from interface org.refcodes.net.MediaTypeFactoryLookup
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
-
Methods inherited from interface org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
addMediaTypeFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.observer.Observable
hasObserverSubscription, subscribeObserver, unsubscribeObserver
-
Methods inherited from interface org.refcodes.observer.Observers
disableObservers, enableObservers, isObserversActive, observers, setObserversActive
-
Methods inherited from interface org.refcodes.runtime.RequestCorrelation
disableRequestCorrelation, enableRequestCorrelation, hasRequestCorrelation, setRequestCorrelation
-
Methods inherited from interface org.refcodes.rest.RestServer
onDelete, onGet, onPost, onPut, onRequest, onRequest, onRequest, withDisableObservers, withEnableObservers, withObserversActive
-
Methods inherited from interface org.refcodes.net.SchemeAccessor.SchemeMutator
setProtocol, setScheme
-
-
-
-
Field Detail
-
_lifeCycleAutomaton
protected org.refcodes.component.LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl _lifeCycleAutomaton
-
_pingRequestObserver
protected RestRequestObserver _pingRequestObserver
-
-
Constructor Detail
-
AbstractHttpRegistryRestServerDecorator
public AbstractHttpRegistryRestServerDecorator(HttpRestServer aServer)
Decorates the givenHttpRestServerwith discovery functionality.- Parameters:
aServer- TheHttpRestServerto be decorated.
-
-
Method Detail
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfaceorg.refcodes.component.RunningAccessor
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfaceorg.refcodes.component.InitializedAccessor
-
getLifeCycleStatus
public org.refcodes.component.LifeCycleStatus getLifeCycleStatus()
- Specified by:
getLifeCycleStatusin interfaceorg.refcodes.component.LifeCycleStatusAccessor
-
pause
public void pause() throws org.refcodes.component.PauseExceptionSome "deactivated" status is communicated to the registry server. The registeredRestEndpointinstances (observers) (e.g. viaRestEndpointBuilderbeing registered e.g. viaRestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver),RestServer.onGet(String, RestRequestObserver)RestServer.onPut(String, RestRequestObserver),RestServer.onPut(String, RestRequestObserver)orRestServer.onDelete(String, RestRequestObserver)is closed by calling itsClosable.close()) are disabled by callingObservers.disableObservers(). Some "deactivated" status is communicated to the registry server.- Specified by:
pausein interfaceHttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>- Specified by:
pausein interfaceHttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>- Specified by:
pausein interfaceorg.refcodes.component.Pausable- Throws:
org.refcodes.component.PauseException
-
stop
public void stop() throws org.refcodes.component.StopExceptionSome "out-of-order" status is communicated to the registry server. The registeredRestEndpointinstances (observers) (e.g. viaRestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver),RestServer.onGet(String, RestRequestObserver)RestServer.onPut(String, RestRequestObserver),RestServer.onPut(String, RestRequestObserver)orRestServer.onDelete(String, RestRequestObserver)) 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 HttpRegistryRestServer<DESC,B>>- Specified by:
stopin interfaceHttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>- Specified by:
stopin interfaceorg.refcodes.component.Stoppable- Throws:
org.refcodes.component.StopException
-
start
public void start() throws org.refcodes.component.StartExceptionSome "up-and-running" status is communicated to the registry server. The registeredRestEndpointinstances (observers) (e.g. viaRestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver),RestServer.onGet(String, RestRequestObserver)RestServer.onPut(String, RestRequestObserver),RestServer.onPut(String, RestRequestObserver)orRestServer.onDelete(String, RestRequestObserver)) 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 HttpRegistryRestServer<DESC,B>>- Specified by:
startin interfaceHttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>- Specified by:
startin interfaceorg.refcodes.component.Startable- Throws:
org.refcodes.component.StartException
-
resume
public void resume() throws org.refcodes.component.ResumeExceptionSome "up-and-running (again)" status is communicated to the registry server. The registeredRestEndpointinstances (observers) (e.g. viaRestEndpointBuilderbeing registered e.g. viaRestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver),RestServer.onGet(String, RestRequestObserver)RestServer.onPut(String, RestRequestObserver),RestServer.onPut(String, RestRequestObserver)orRestServer.onDelete(String, RestRequestObserver)is closed by calling itsClosable.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 HttpRegistryRestServer<DESC,B>>- Specified by:
resumein interfaceHttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>- Specified by:
resumein interfaceorg.refcodes.component.Resumable- Throws:
org.refcodes.component.ResumeException
-
initialize
public void initialize() throws org.refcodes.component.InitializeExceptionInitializes theHttpRegistryby registering it at the service registry with a status such as "starting" or "initializing" or "not-ready-yet".- Specified by:
initializein interfaceHttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>- Specified by:
initializein interfaceorg.refcodes.component.Initializable- Throws:
org.refcodes.component.InitializeException
-
isStoppable
public boolean isStoppable()
- Specified by:
isStoppablein interfaceorg.refcodes.component.Stoppable.StopAutomaton
-
isPausable
public boolean isPausable()
- Specified by:
isPausablein interfaceorg.refcodes.component.Pausable.PauseAutomaton
-
isStartable
public boolean isStartable()
- Specified by:
isStartablein interfaceorg.refcodes.component.Startable.StartAutomaton
-
isResumable
public boolean isResumable()
- Specified by:
isResumablein interfaceorg.refcodes.component.Resumable.ResumeAutomaton
-
isStopped
public boolean isStopped()
- Specified by:
isStoppedin interfaceorg.refcodes.component.Stoppable.StopAutomaton
-
isPaused
public boolean isPaused()
- Specified by:
isPausedin interfaceorg.refcodes.component.Pausable.PauseAutomaton
-
isInitalizable
public boolean isInitalizable()
- Specified by:
isInitalizablein interfaceorg.refcodes.component.Initializable.InitializeAutomaton
-
destroy
public void destroy()
This server is taken (removed) from the registry server. The registeredRestEndpointinstances (observers) (e.g. viaRestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver),RestServer.onGet(String, RestRequestObserver)RestServer.onPut(String, RestRequestObserver),RestServer.onPut(String, RestRequestObserver)orRestServer.onDelete(String, RestRequestObserver)) 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 interfaceorg.refcodes.component.Destroyable- Specified by:
destroyin interfaceHttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>- Specified by:
destroyin interfaceHttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
-
isDestroyable
public boolean isDestroyable()
- Specified by:
isDestroyablein interfaceorg.refcodes.component.Destroyable.DestroyAutomaton
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfaceorg.refcodes.component.Destroyable.DestroyAutomaton
-
setInstanceId
public void setInstanceId(java.lang.String aInstanceId)
- Specified by:
setInstanceIdin interfaceorg.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator
-
getInstanceId
public java.lang.String getInstanceId()
- Specified by:
getInstanceIdin interfaceorg.refcodes.mixin.InstanceIdAccessor
-
setHost
public void setHost(java.lang.String aHost)
- Specified by:
setHostin interfaceorg.refcodes.net.HostAccessor.HostMutator
-
getHost
public java.lang.String getHost()
- Specified by:
getHostin interfaceorg.refcodes.net.HostAccessor
-
getVirtualHost
public java.lang.String getVirtualHost()
- Specified by:
getVirtualHostin interfaceorg.refcodes.net.VirtualHostAccessor
-
setVirtualHost
public void setVirtualHost(java.lang.String aVirtualHost)
- Specified by:
setVirtualHostin interfaceorg.refcodes.net.VirtualHostAccessor.VirtualHostMutator
-
getIpAddress
public int[] getIpAddress()
- Specified by:
getIpAddressin interfaceorg.refcodes.net.IpAddressAccessor
-
setIpAddress
public void setIpAddress(int[] aIpAddress)
- Specified by:
setIpAddressin interfaceorg.refcodes.net.IpAddressAccessor.IpAddressMutator
-
getTrustStoreDescriptor
public org.refcodes.security.TrustStoreDescriptor getTrustStoreDescriptor()
- Specified by:
getTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor
-
setTrustStoreDescriptor
public void setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
- Specified by:
setTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
-
getHttpServerDescriptor
public DESC getHttpServerDescriptor()
Retrieves theHttpServerDescriptorfrom theHttpServerDescriptorproperty.- Specified by:
getHttpServerDescriptorin interfaceHttpServerDescriptorAccessor<DESC extends HttpServerDescriptor>- Returns:
- The
HttpServerDescriptorstored by theHttpServerDescriptorproperty.
-
setHttpServerDescriptor
public void setHttpServerDescriptor(DESC aServerDescriptor)
Sets theHttpServerDescriptorfor theHttpServerDescriptorproperty.- Specified by:
setHttpServerDescriptorin interfaceHttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC extends HttpServerDescriptor>- Parameters:
aServerDescriptor- TheHttpServerDescriptorto be stored by theHttpServerDescriptorproperty.
-
getHttpRegistryUrl
public org.refcodes.net.Url getHttpRegistryUrl()
Retrieves the URL from the URL property locating the service registry registry.- Specified by:
getHttpRegistryUrlin interfaceHttpRegistryUrlAccessor- Returns:
- The URL stored by the URL property.
-
setHttpRegistryUrl
public void setHttpRegistryUrl(org.refcodes.net.Url aRegistryUrl)
Sets the URL for the URL property locating the service registry registry.- Specified by:
setHttpRegistryUrlin interfaceHttpRegistryUrlAccessor.HttpRegistryUrlMutator- Parameters:
aRegistryUrl- The service registry registry URL to be stored by the URL property.
-
getAlias
public java.lang.String getAlias()
- Specified by:
getAliasin interfaceorg.refcodes.mixin.AliasAccessor
-
setAlias
public void setAlias(java.lang.String aAlias)
- Specified by:
setAliasin interfaceorg.refcodes.mixin.AliasAccessor.AliasMutator
-
getPingPath
public java.lang.String getPingPath()
Retrieves the ping path from the ping path property.- Specified by:
getPingPathin interfacePingPathAccessor- Returns:
- The ping path stored by the ping path property.
-
setPingPath
public void setPingPath(java.lang.String aPingPath)
Sets the ping path for the ping path property.- Specified by:
setPingPathin interfacePingPathAccessor.PingPathMutator- Parameters:
aPingPath- The ping path to be stored by the ping path property.
-
onPingRequest
public void onPingRequest(RestRequestObserver aRequestObserver)
Sets the pingRestRequestObserverlistening for "ping" requests.- Specified by:
onPingRequestin interfacePingRequestObserver- Parameters:
aRequestObserver- The pingRestRequestObserverto be registered.
-
getPingRequestObserver
public RestRequestObserver getPingRequestObserver()
Retrieves the pingRestRequestObserverfrom the pingRestRequestObserverproperty.- Specified by:
getPingRequestObserverin interfacePingRequestObserverAccessor- Returns:
- The ping
RestRequestObserverstored by the pingRestRequestObserverproperty.
-
toHost
protected java.lang.String toHost(java.lang.String aHost) throws java.net.UnknownHostExceptionResolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aHost- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
- Throws:
java.net.UnknownHostException- thrown in case the local machine's host cannot be resolved when the provided host is null.
-
toVirtualHost
protected java.lang.String toVirtualHost(java.lang.String aVirtualHost)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aVirtualHost- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
toIpAddress
protected int[] toIpAddress(int[] aIpAddress) throws java.io.IOExceptionResolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aIpAddress- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
- Throws:
java.io.IOException- thrown in case the local machine's IP-Address cannot be resolved when the provided IP-Address is null.
-
toAlias
protected java.lang.String toAlias(java.lang.String aAlias)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aAlias- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
toScheme
protected org.refcodes.data.Scheme toScheme(org.refcodes.data.Scheme aScheme)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aScheme- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
toPort
protected int toPort(int aPort)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aPort- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
toInstanceId
protected java.lang.String toInstanceId(java.lang.String aInstanceId, java.lang.String aHost)Resolves the property from the provided value and the this instance's property and the 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 ID is null.- Returns:
- The value when not null, else the value of this instance's property.
-
toPingPath
protected java.lang.String toPingPath(java.lang.String aPingPath, java.lang.String aDefaultPingPath)Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aPingPath- The value to be used when not null.aDefaultPingPath- The value to be used when the ping path is null.- Returns:
- The value when not null, else the value of this instance's property.
-
toTrustStoreDescriptor
protected org.refcodes.security.TrustStoreDescriptor toTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aStoreDescriptor- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
toHttpRegistryUrl
protected org.refcodes.net.Url toHttpRegistryUrl(org.refcodes.net.Url aRegistryUrl)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aRegistryUrl- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
toHttpServerDescriptor
protected DESC toHttpServerDescriptor(DESC aServerDescriptor)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aServerDescriptor- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
toPingObserver
protected RestRequestObserver toPingObserver(RestRequestObserver aPingRequestObserver)
Resolves the property from the provided value and the this instance's property and the and sets the property in case the provided value is not null.- Parameters:
aPingRequestObserver- The value to be used when not null.- Returns:
- The value when not null, else the value of this instance's property.
-
-