org.refcodes.component.Closable
, org.refcodes.component.Closable.CloseBuilder<EurekaServerDescriptor>
, org.refcodes.component.Configurable<EurekaServerDescriptor>
, org.refcodes.component.ConnectionComponent<EurekaServerDescriptor>
, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<EurekaServerDescriptor,EurekaRestServer>
, org.refcodes.component.ConnectionOpenable<EurekaServerDescriptor>
, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<EurekaServerDescriptor,EurekaRestServer>
, 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.OpenedAccessor
, 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<EurekaServerDescriptor>
, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator
, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty
, org.refcodes.mixin.AliasAccessor
, org.refcodes.mixin.AliasAccessor.AliasBuilder<EurekaServerDescriptor>
, org.refcodes.mixin.AliasAccessor.AliasMutator
, org.refcodes.mixin.AliasAccessor.AliasProperty
, org.refcodes.mixin.InstanceIdAccessor
, org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<EurekaServerDescriptor>
, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator
, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty
, org.refcodes.mixin.PortAccessor
, org.refcodes.mixin.PortAccessor.PortBuilder<EurekaServerDescriptor>
, org.refcodes.mixin.PortAccessor.PortMutator
, org.refcodes.mixin.PortAccessor.PortProperty
, org.refcodes.observer.Observable<EurekaServerDescriptor>
, org.refcodes.observer.Observers<EurekaServerDescriptor,EurekaRestServer>
, EurekaDataCenterTypeAccessor
, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeBuilder<EurekaServerDescriptor>
, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeMutator
, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeProperty
, EurekaRegistry<EurekaServerDescriptor>
, EurekaRestServer
, EurekaServerDescriptorFactory
, org.refcodes.rest.HomePathAccessor
, org.refcodes.rest.HomePathAccessor.HomePathBuilder<EurekaServerDescriptor>
, org.refcodes.rest.HomePathAccessor.HomePathMutator
, org.refcodes.rest.HomePathAccessor.HomePathProperty
, org.refcodes.rest.HomeRequestObserver
, org.refcodes.rest.HomeRequestObserverAccessor
, org.refcodes.rest.HomeRequestObserverAccessor.HomeRequestObserverBuilder<EurekaServerDescriptor>
, org.refcodes.rest.HttpExceptionHandlerAccessor
, org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<EurekaServerDescriptor>
, org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator
, org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
, org.refcodes.rest.HttpExceptionHandlingAccessor
, org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<EurekaServerDescriptor>
, org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator
, org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
, org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRestServer>
, org.refcodes.rest.HttpRegistryRestServer<EurekaServerDescriptor,EurekaRestServer>
, org.refcodes.rest.HttpRegistryUrlAccessor
, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<EurekaServerDescriptor>
, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlMutator
, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlProperty
, org.refcodes.rest.HttpRestServer
, org.refcodes.rest.HttpServerDescriptorAccessor<EurekaServerDescriptor>
, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<EurekaServerDescriptor,EurekaRestServer>
, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorMutator<EurekaServerDescriptor>
, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorProperty<EurekaServerDescriptor>
, org.refcodes.rest.HttpServerDescriptorFactory<EurekaServerDescriptor>
, org.refcodes.rest.PingPathAccessor
, org.refcodes.rest.PingPathAccessor.PingPathBuilder<EurekaServerDescriptor>
, org.refcodes.rest.PingPathAccessor.PingPathMutator
, org.refcodes.rest.PingPathAccessor.PingPathProperty
, org.refcodes.rest.PingRequestObserver
, org.refcodes.rest.PingRequestObserverAccessor
, org.refcodes.rest.PingRequestObserverAccessor.PingRequestObserverBuilder<EurekaServerDescriptor>
, org.refcodes.rest.RestServer
, org.refcodes.rest.StatusPathAccessor
, org.refcodes.rest.StatusPathAccessor.StatusPathBuilder<EurekaServerDescriptor>
, org.refcodes.rest.StatusPathAccessor.StatusPathMutator
, org.refcodes.rest.StatusPathAccessor.StatusPathProperty
, org.refcodes.rest.StatusRequestObserver
, org.refcodes.rest.StatusRequestObserverAccessor
, org.refcodes.rest.StatusRequestObserverAccessor.StatusRequestObserverBuilder<EurekaServerDescriptor>
, org.refcodes.runtime.RequestCorrelation<EurekaServerDescriptor>
, org.refcodes.runtime.SessionCorrelation<EurekaServerDescriptor>
, org.refcodes.security.KeyStoreDescriptorAccessor
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<EurekaServerDescriptor>
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty
, org.refcodes.security.TrustStoreDescriptorAccessor
, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<EurekaServerDescriptor>
, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
, org.refcodes.web.BaseLocatorAccessor
, org.refcodes.web.BaseLocatorAccessor.BaseLocatorBuilder<EurekaServerDescriptor>
, org.refcodes.web.BaseLocatorAccessor.BaseLocatorMutator
, org.refcodes.web.BaseLocatorAccessor.BaseLocatorProperty
, org.refcodes.web.BasicAuthObservable<EurekaServerDescriptor>
, org.refcodes.web.HostAccessor
, org.refcodes.web.HostAccessor.HostBuilder<EurekaServerDescriptor>
, org.refcodes.web.HostAccessor.HostMutator
, org.refcodes.web.HostAccessor.HostProperty
, org.refcodes.web.HttpsConnectionRequestObservable<EurekaServerDescriptor>
, org.refcodes.web.IpAddressAccessor
, org.refcodes.web.IpAddressAccessor.IpAddressBuilder<EurekaServerDescriptor>
, org.refcodes.web.IpAddressAccessor.IpAddressMutator
, org.refcodes.web.IpAddressAccessor.IpAddressProperty
, org.refcodes.web.MediaTypeFactoryLookup
, org.refcodes.web.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
, org.refcodes.web.RealmAccessor
, org.refcodes.web.RealmAccessor.RealmBuilder<EurekaServerDescriptor>
, org.refcodes.web.RealmAccessor.RealmMutator
, org.refcodes.web.RealmAccessor.RealmProperty
, org.refcodes.web.SchemeAccessor
, org.refcodes.web.SchemeAccessor.SchemeBuilder<EurekaServerDescriptor>
, org.refcodes.web.SchemeAccessor.SchemeMutator
, org.refcodes.web.SchemeAccessor.SchemeProperty
, org.refcodes.web.VirtualHostAccessor
, org.refcodes.web.VirtualHostAccessor.VirtualHostBuilder<EurekaServerDescriptor>
, org.refcodes.web.VirtualHostAccessor.VirtualHostMutator
, org.refcodes.web.VirtualHostAccessor.VirtualHostProperty
EurekaRestServerImpl
public class EurekaRestServerDecorator extends org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<EurekaServerDescriptor,EurekaRestServer> implements EurekaRestServer
EurekaRestServerDecorator
implements the EurekaRestServer
interface and decorates a given HttpRestServer
with functionality
such registering and unregistering from or to an Eureka discovery service.
Follow the documentation of the EurekaRestServer
in order to initiate
the states such as EurekaServiceStatus.UP
,
EurekaServiceStatus.DOWN
or
EurekaServiceStatus.OUT_OF_SERVICE
and unregistering.org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
org.refcodes.web.BaseLocatorAccessor.BaseLocatorBuilder<B extends org.refcodes.web.BaseLocatorAccessor.BaseLocatorBuilder<B>>, org.refcodes.web.BaseLocatorAccessor.BaseLocatorMutator, org.refcodes.web.BaseLocatorAccessor.BaseLocatorProperty
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
org.refcodes.component.Configurable.ConfigureAutomaton<CTX extends Object>, org.refcodes.component.Configurable.ConfigureBuilder<CTX extends Object,B extends org.refcodes.component.Configurable.ConfigureBuilder<CTX,B>>
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
org.refcodes.component.Destroyable.DestroyAutomaton
EurekaDataCenterTypeAccessor.EurekaDataCenterTypeBuilder<B extends EurekaDataCenterTypeAccessor.EurekaDataCenterTypeBuilder<?>>, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeMutator, EurekaDataCenterTypeAccessor.EurekaDataCenterTypeProperty
org.refcodes.rest.HomePathAccessor.HomePathBuilder<B extends org.refcodes.rest.HomePathAccessor.HomePathBuilder<?>>, org.refcodes.rest.HomePathAccessor.HomePathMutator, org.refcodes.rest.HomePathAccessor.HomePathProperty
org.refcodes.rest.HomeRequestObserverAccessor.HomeRequestObserverBuilder<B extends org.refcodes.rest.HomeRequestObserverAccessor.HomeRequestObserverBuilder<B>>, org.refcodes.rest.HomeRequestObserverAccessor.HomeRequestObserverMutator, org.refcodes.rest.HomeRequestObserverAccessor.HomeRequestObserverProperty
org.refcodes.web.HostAccessor.HostBuilder<B extends org.refcodes.web.HostAccessor.HostBuilder<?>>, org.refcodes.web.HostAccessor.HostMutator, org.refcodes.web.HostAccessor.HostProperty
org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B extends org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B>>, org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B extends org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B>>, org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B extends org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>>, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlMutator, org.refcodes.rest.HttpRegistryUrlAccessor.HttpRegistryUrlProperty
org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC extends org.refcodes.rest.HttpServerDescriptor,B extends org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>>, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC extends org.refcodes.rest.HttpServerDescriptor>, org.refcodes.rest.HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC extends org.refcodes.rest.HttpServerDescriptor>
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable
org.refcodes.component.InitializedAccessor.InitializedMutator, org.refcodes.component.InitializedAccessor.InitializedProperty
org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B extends org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B>>, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty
org.refcodes.web.IpAddressAccessor.IpAddressBuilder<B extends org.refcodes.web.IpAddressAccessor.IpAddressBuilder<B>>, org.refcodes.web.IpAddressAccessor.IpAddressMutator, org.refcodes.web.IpAddressAccessor.IpAddressProperty
org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<B extends org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<B>>, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty
org.refcodes.component.LifeCycleComponent.LifeCycleAutomaton, org.refcodes.component.LifeCycleComponent.UncheckedLifeCycleComponent
org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusBuilder<B extends org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusBuilder<B>>, org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusMutator, org.refcodes.component.LifeCycleStatusAccessor.LifeCycleStatusProperty
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<B extends org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<B>>, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty
org.refcodes.web.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable
org.refcodes.rest.PingPathAccessor.PingPathBuilder<B extends org.refcodes.rest.PingPathAccessor.PingPathBuilder<?>>, org.refcodes.rest.PingPathAccessor.PingPathMutator, org.refcodes.rest.PingPathAccessor.PingPathProperty
org.refcodes.rest.PingRequestObserverAccessor.PingRequestObserverBuilder<B extends org.refcodes.rest.PingRequestObserverAccessor.PingRequestObserverBuilder<B>>, org.refcodes.rest.PingRequestObserverAccessor.PingRequestObserverMutator, org.refcodes.rest.PingRequestObserverAccessor.PingRequestObserverProperty
org.refcodes.mixin.PortAccessor.PortBuilder<B extends org.refcodes.mixin.PortAccessor.PortBuilder<B>>, org.refcodes.mixin.PortAccessor.PortMutator, org.refcodes.mixin.PortAccessor.PortProperty
org.refcodes.web.RealmAccessor.RealmBuilder<B extends org.refcodes.web.RealmAccessor.RealmBuilder<B>>, org.refcodes.web.RealmAccessor.RealmMutator, org.refcodes.web.RealmAccessor.RealmProperty
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumable
org.refcodes.component.RunningAccessor.RunningMutator, org.refcodes.component.RunningAccessor.RunningProperty
org.refcodes.web.SchemeAccessor.SchemeBuilder<B extends org.refcodes.web.SchemeAccessor.SchemeBuilder<B>>, org.refcodes.web.SchemeAccessor.SchemeMutator, org.refcodes.web.SchemeAccessor.SchemeProperty
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable
org.refcodes.rest.StatusPathAccessor.StatusPathBuilder<B extends org.refcodes.rest.StatusPathAccessor.StatusPathBuilder<?>>, org.refcodes.rest.StatusPathAccessor.StatusPathMutator, org.refcodes.rest.StatusPathAccessor.StatusPathProperty
org.refcodes.rest.StatusRequestObserverAccessor.StatusRequestObserverBuilder<B extends org.refcodes.rest.StatusRequestObserverAccessor.StatusRequestObserverBuilder<B>>, org.refcodes.rest.StatusRequestObserverAccessor.StatusRequestObserverMutator, org.refcodes.rest.StatusRequestObserverAccessor.StatusRequestObserverProperty
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable
org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B extends org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
org.refcodes.web.VirtualHostAccessor.VirtualHostBuilder<B extends org.refcodes.web.VirtualHostAccessor.VirtualHostBuilder<?>>, org.refcodes.web.VirtualHostAccessor.VirtualHostMutator, org.refcodes.web.VirtualHostAccessor.VirtualHostProperty
_lifeCycleAutomaton, _pingRequestObserver
EUREKA_BASE_PATH
Constructor | Description |
---|---|
EurekaRestServerDecorator(org.refcodes.rest.HttpRestServer aServer) |
Decorates the given
HttpRestServer with discovery functionality. |
EurekaRestServerDecorator(org.refcodes.rest.HttpRestServer aServer,
ExecutorService aExecutorService) |
Decorates the given
HttpRestServer with discovery functionality. |
Modifier and Type | Method | Description |
---|---|---|
void |
destroy() |
|
protected void |
doDeregister() |
Unregisters the given service at Eureka.
|
protected void |
doRegister(EurekaServiceStatus aServiceStatus) |
Registers the given service at Eureka.
|
protected void |
doStatusUpdate(EurekaServiceStatus aServiceStatus) |
Does a Eureka status update for the given service.
|
org.refcodes.component.ConnectionStatus |
getConnectionStatus() |
|
EurekaDataCenterType |
getEurekaDataCenterType() |
Retrieves the Eureka data center type from the Eureka data center type
property.
|
String |
getHomePath() |
|
org.refcodes.rest.RestRequestConsumer |
getHomeRequestConsumer() |
|
org.refcodes.rest.HttpExceptionHandler |
getHttpExceptionHandler() |
|
org.refcodes.rest.HttpExceptionHandling |
getHttpExceptionHandling() |
|
String |
getStatusPath() |
|
org.refcodes.rest.RestRequestConsumer |
getStatusRequestConsumer() |
|
void |
initialize(EurekaServerDescriptor aServerDescriptor,
org.refcodes.rest.RestRequestConsumer aPingObserver,
org.refcodes.rest.RestRequestConsumer aStatusObserver,
org.refcodes.rest.RestRequestConsumer aHomeObserver,
org.refcodes.web.Url aRegistryUrl,
org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) |
Initializes the
HttpRegistryRestServer by registering it at the
service registry. |
boolean |
isObserversActive() |
|
void |
pause() |
|
void |
resume() |
|
void |
setEurekaDataCenterType(EurekaDataCenterType aDataCenterType) |
Sets the Eureka data center type for the Eureka data center type
property.
|
void |
setHomePath(String aHomePath) |
|
void |
setHomeRequestConsumer(org.refcodes.rest.RestRequestConsumer aRequestConsumer) |
|
void |
setHttpExceptionHandler(org.refcodes.rest.HttpExceptionHandler aHttpErrorHandler) |
|
void |
setHttpExceptionHandling(org.refcodes.rest.HttpExceptionHandling aHttpErrorHandling) |
|
void |
setObserversActive(boolean isActive) |
|
void |
setStatusPath(String aStatusPath) |
|
void |
setStatusRequestConsumer(org.refcodes.rest.RestRequestConsumer aRequestConsumer) |
|
void |
start() |
|
void |
stop() |
|
protected org.refcodes.rest.RestRequestConsumer |
toHomeObserver(org.refcodes.rest.RestRequestConsumer aHomeRequestObserver) |
Resolves the property from the provided value and this instance and sets
the property in case the provided value is not null.
|
protected org.refcodes.web.Url |
toHttpRegistryUrl(org.refcodes.web.Url aRegistryUrl) |
Resolves the property from the provided value and this instance and sets
the property in case the provided value is not null.
|
EurekaServerDescriptor |
toHttpServerDescriptor(String aAlias,
String aInstanceId,
org.refcodes.data.Scheme aScheme,
String aHost,
String aVirtualHost,
int[] aIpAddress,
int aPort,
String aPingPath,
String aStatusPath,
String aHomePath,
EurekaDataCenterType aDataCenterType) |
Prepares the
HttpServerDescriptor by creating it from this
instance's state and the provided arguments. |
protected org.refcodes.rest.RestRequestConsumer |
toStatusObserver(org.refcodes.rest.RestRequestConsumer aStatusRequestObserver) |
Resolves the property from the provided value and this instance and sets
the property in case the provided value is not null.
|
EurekaRestServer |
withHttpExceptionHandler(org.refcodes.rest.HttpExceptionHandler aHttpErrorHandler) |
|
EurekaRestServer |
withHttpExceptionHandling(org.refcodes.rest.HttpExceptionHandling aHttpErrorHandling) |
getAlias, getHost, getHttpRegistryUrl, getHttpServerDescriptor, getInstanceId, getIpAddress, getLifeCycleStatus, getPingPath, getPingRequestObserver, getTrustStoreDescriptor, getVirtualHost, initialize, isDestroyable, isDestroyed, isInitalizable, isInitialized, isPausable, isPaused, isResumable, isRunning, isStartable, isStoppable, isStopped, onPingRequest, setAlias, setHost, setHttpRegistryUrl, setHttpServerDescriptor, setInstanceId, setIpAddress, setPingPath, setTrustStoreDescriptor, setVirtualHost, toAlias, toHost, toHttpServerDescriptor, toInstanceId, toIpAddress, toPingObserver, toPingPath, toPort, toScheme, toTrustStoreDescriptor, toVirtualHost
addMediaTypeFactory, close, closeIn, closeQuietly, closeUnchecked, disableRequestCorrelation, disableSessionCorrelation, enableRequestCorrelation, enableSessionCorrelation, getBaseLocator, getFactoryMediaTypes, getKeyStoreDescriptor, getMaxConnections, getPort, getRealm, getScheme, hasMediaTypeFactory, hasObserverSubscription, hasRequestCorrelation, hasSessionCorrelation, observers, onBasicAuthRequest, onConnectionRequest, onDelete, onDelete, onGet, onGet, onPost, onPost, onPut, onPut, onRequest, onRequest, 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
setBaseLocator
letBaseLocator
close, closeIn, closeQuietly, closeUnchecked
withOpenUnchecked
isDestroyable, isDestroyed
letEurekaDataCenterType
initialize, initialize, initialize, withEurekaDataCenterType, withHomePath, withStatusPath
initialize, initialize, initialize, initialize, withHomeRequestConsumer, withStatusRequestConsumer
toHttpServerDescriptor, toHttpServerDescriptor
withOnHttpException
onHttpException
letHttpExceptionHandler
letHttpExceptionHandling
initialize, initialize, initialize, initialize, initialize, initialize, withAlias, withCidrNotation, withHost, withHttpRegistryUrl, withHttpServerDescriptor, withInstanceId, withIpAddress, withPingPath, withTrustStoreDescriptor, withVirtualHost
initialize, withPingRequestObserver, withPort, withProtocol, withScheme
setHttpRegistryUrl
letHttpRegistryUrl
open, open, open, open, open, open, open, open, open, open, open, open, open, withBaseLocator, withClose, withCloseIn, withCloseQuietly, withDisableRequestCorrelation, withDisableSessionCorrelation, withEnableRequestCorrelation, withEnableSessionCorrelation, withKeyStoreDescriptor, withMaxConnections, withOpen, withOpen, withRealm, withRequestCorrelation, withSessionCorrelation
onConnectionRequest
getHttpServerDescriptor
setHttpServerDescriptor
letHttpServerDescriptor
toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor
isInitalizable
setInstanceId
letInstanceId
fromCidrNotation, setIpAddress
getKeyStoreDescriptor
setKeyStoreDescriptor
letKeyStoreDescriptor
setMaxConnections
letMaxConnections
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
addMediaTypeFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasObserverSubscription, subscribeObserver, unsubscribeObserver
disableObservers, enableObservers, observers
isPausable, isPaused
getPingRequestObserver
disableRequestCorrelation, enableRequestCorrelation, hasRequestCorrelation, setRequestCorrelation
onDelete, onDelete, onGet, onGet, onPost, onPost, onPut, onPut, onRequest, onRequest, onRequest, onRequest, onRequest, withDisableObservers, withEnableObservers, withObserversActive
setProtocol, setScheme
letProtocol, letScheme
disableSessionCorrelation, enableSessionCorrelation, hasSessionCorrelation, setSessionCorrelation
letStatusPath
isStoppable, isStopped
getTrustStoreDescriptor
setTrustStoreDescriptor
letTrustStoreDescriptor
public EurekaRestServerDecorator(org.refcodes.rest.HttpRestServer aServer)
HttpRestServer
with discovery functionality.
Use AbstractHttpRegistryRestServerDecorator.initialize()
, start()
, pause()
,
resume()
, stop()
and destroy()
for publishing
status updates to Eureka. Use
HttpRestServer.open(org.refcodes.web.HttpServerContext)
or similar to activate
your server.aServer
- The HttpRestServer
to be decorated.public EurekaRestServerDecorator(org.refcodes.rest.HttpRestServer aServer, ExecutorService aExecutorService)
HttpRestServer
with discovery functionality.
Use AbstractHttpRegistryRestServerDecorator.initialize()
, start()
, pause()
,
resume()
, stop()
and destroy()
for publishing
status updates to Eureka. Use
HttpRestServer.open(org.refcodes.web.HttpServerContext)
or similar to activate
your server.aServer
- The HttpRestServer
to be decorated.aExecutorService
- An executor service to be used when creating
Thread
s.public void initialize(EurekaServerDescriptor aServerDescriptor, org.refcodes.rest.RestRequestConsumer aPingObserver, org.refcodes.rest.RestRequestConsumer aStatusObserver, org.refcodes.rest.RestRequestConsumer aHomeObserver, org.refcodes.web.Url aRegistryUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) throws org.refcodes.component.InitializeException
HttpRegistryRestServer
by registering it at the
service registry.initialize
in interface EurekaRestServer
aServerDescriptor
- The descriptor describing the server.aPingObserver
- The health-check request observer hook.aStatusObserver
- The status-page request observer hook.aHomeObserver
- The home-page request observer hook.aRegistryUrl
- The registry server where to register.aStoreDescriptor
- The descriptor describing the truststore for
(optionally) opening an HTTPS connection to the registry server.org.refcodes.component.InitializeException
- thrown in case initializing a component
caused problems. Usually a method similar to "initialize()"
throws such an exception.public void start() throws org.refcodes.component.StartException
start
in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRestServer>
start
in interface org.refcodes.rest.HttpRegistryRestServer<EurekaServerDescriptor,EurekaRestServer>
start
in interface org.refcodes.component.Startable
start
in class org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<EurekaServerDescriptor,EurekaRestServer>
org.refcodes.component.StartException
public void pause() throws org.refcodes.component.PauseException
pause
in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRestServer>
pause
in interface org.refcodes.rest.HttpRegistryRestServer<EurekaServerDescriptor,EurekaRestServer>
pause
in interface org.refcodes.component.Pausable
pause
in class org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<EurekaServerDescriptor,EurekaRestServer>
org.refcodes.component.PauseException
public void resume() throws org.refcodes.component.ResumeException
resume
in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRestServer>
resume
in interface org.refcodes.rest.HttpRegistryRestServer<EurekaServerDescriptor,EurekaRestServer>
resume
in interface org.refcodes.component.Resumable
resume
in class org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<EurekaServerDescriptor,EurekaRestServer>
org.refcodes.component.ResumeException
public void stop() throws org.refcodes.component.StopException
stop
in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRestServer>
stop
in interface org.refcodes.rest.HttpRegistryRestServer<EurekaServerDescriptor,EurekaRestServer>
stop
in interface org.refcodes.component.Stoppable
stop
in class org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<EurekaServerDescriptor,EurekaRestServer>
org.refcodes.component.StopException
public void destroy()
destroy
in interface org.refcodes.component.Destroyable
destroy
in interface org.refcodes.rest.HttpRegistry<EurekaServerDescriptor,EurekaRestServer>
destroy
in interface org.refcodes.rest.HttpRegistryRestServer<EurekaServerDescriptor,EurekaRestServer>
destroy
in class org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<EurekaServerDescriptor,EurekaRestServer>
public String getHomePath()
getHomePath
in interface org.refcodes.rest.HomePathAccessor
public void setHomePath(String aHomePath)
setHomePath
in interface org.refcodes.rest.HomePathAccessor.HomePathMutator
public String getStatusPath()
getStatusPath
in interface org.refcodes.rest.StatusPathAccessor
public void setStatusPath(String aStatusPath)
setStatusPath
in interface org.refcodes.rest.StatusPathAccessor.StatusPathMutator
public org.refcodes.component.ConnectionStatus getConnectionStatus()
getConnectionStatus
in interface org.refcodes.component.ConnectionStatusAccessor
public void setObserversActive(boolean isActive)
setObserversActive
in interface org.refcodes.observer.Observers<EurekaServerDescriptor,EurekaRestServer>
public boolean isObserversActive()
isObserversActive
in interface org.refcodes.observer.Observers<EurekaServerDescriptor,EurekaRestServer>
public EurekaRestServer withHttpExceptionHandler(org.refcodes.rest.HttpExceptionHandler aHttpErrorHandler)
withHttpExceptionHandler
in interface org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<EurekaServerDescriptor>
withHttpExceptionHandler
in interface org.refcodes.rest.HttpRestServer
public void setHttpExceptionHandler(org.refcodes.rest.HttpExceptionHandler aHttpErrorHandler)
setHttpExceptionHandler
in interface org.refcodes.rest.HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator
public org.refcodes.rest.HttpExceptionHandler getHttpExceptionHandler()
getHttpExceptionHandler
in interface org.refcodes.rest.HttpExceptionHandlerAccessor
public EurekaRestServer withHttpExceptionHandling(org.refcodes.rest.HttpExceptionHandling aHttpErrorHandling)
withHttpExceptionHandling
in interface org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<EurekaServerDescriptor>
withHttpExceptionHandling
in interface org.refcodes.rest.HttpRestServer
public void setHttpExceptionHandling(org.refcodes.rest.HttpExceptionHandling aHttpErrorHandling)
setHttpExceptionHandling
in interface org.refcodes.rest.HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator
public org.refcodes.rest.HttpExceptionHandling getHttpExceptionHandling()
getHttpExceptionHandling
in interface org.refcodes.rest.HttpExceptionHandlingAccessor
public EurekaDataCenterType getEurekaDataCenterType()
getEurekaDataCenterType
in interface EurekaDataCenterTypeAccessor
public void setEurekaDataCenterType(EurekaDataCenterType aDataCenterType)
setEurekaDataCenterType
in interface EurekaDataCenterTypeAccessor.EurekaDataCenterTypeMutator
aDataCenterType
- The Eureka data center type to be stored by
the Eureka data center type property.public void setHomeRequestConsumer(org.refcodes.rest.RestRequestConsumer aRequestConsumer)
setHomeRequestConsumer
in interface org.refcodes.rest.HomeRequestObserver
public org.refcodes.rest.RestRequestConsumer getHomeRequestConsumer()
getHomeRequestConsumer
in interface org.refcodes.rest.HomeRequestObserverAccessor
public void setStatusRequestConsumer(org.refcodes.rest.RestRequestConsumer aRequestConsumer)
setStatusRequestConsumer
in interface org.refcodes.rest.StatusRequestObserver
public org.refcodes.rest.RestRequestConsumer getStatusRequestConsumer()
getStatusRequestConsumer
in interface org.refcodes.rest.StatusRequestObserverAccessor
public EurekaServerDescriptor toHttpServerDescriptor(String aAlias, String aInstanceId, org.refcodes.data.Scheme aScheme, String aHost, String aVirtualHost, int[] aIpAddress, int aPort, String aPingPath, String aStatusPath, String aHomePath, EurekaDataCenterType aDataCenterType)
HttpServerDescriptor
by creating it from this
instance's state and the provided arguments. The provided arguments can
modify theinstance's state. The HttpServerDescriptor
as finally
used is returned. You may modify this context and use it after
modification to initialize the server via
HttpRegistry.initialize(HttpServerDescriptor, Url)
or
HttpRegistry.initialize(HttpServerDescriptor, Url, TrustStoreDescriptor)
.
toHttpServerDescriptor
in interface EurekaServerDescriptorFactory
aAlias
- The name ("alias") which identifies the server in the
registry.aInstanceId
- The TID for the instance when being registered at the
service registry. If omitted, then the host name is used.aScheme
- The Scheme
to which this server is being attached
(HTTP or HTTPS).aHost
- The host name to be used to address this server. If omitted,
then the system's host name should be used.aVirtualHost
- The virtual host name to be used for resolving.aIpAddress
- The IP-Address identifying the host.aPort
- The port of your service being registered. Make sure, you do
notaPingPath
- The path to use as health-check end-point by this
server.aStatusPath
- The path to use as status-page end-point by this
server.aHomePath
- The path to use as home-page end-point by this server.aDataCenterType
- The data center type to be used.HttpServerDescriptor
as would be used when
initializing this instance via
HttpRegistry.initialize()
protected void doRegister(EurekaServiceStatus aServiceStatus) throws org.refcodes.web.HttpStatusException, IOException
aServiceStatus
- The EurekaServiceStatus
to be set.org.refcodes.web.HttpStatusException
- Thrown in case a HTTP response was of an
erroneous status.tIOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.protected void doStatusUpdate(EurekaServiceStatus aServiceStatus) throws IOException, UnknownHostException, org.refcodes.web.HttpStatusException
aServiceStatus
- The EurekaServiceStatus
to be set.org.refcodes.web.HttpStatusException
- Thrown in case a HTTP response was of an
erroneous status.tIOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.UnknownHostException
- Thrown in case the targeted host is unknown.protected void doDeregister() throws IOException, org.refcodes.web.HttpStatusException
org.refcodes.web.HttpStatusException
- Thrown in case a HTTP response was of an
erroneous status.tIOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.protected org.refcodes.web.Url toHttpRegistryUrl(org.refcodes.web.Url aRegistryUrl)
toHttpRegistryUrl
in class org.refcodes.rest.AbstractHttpRegistryRestServerDecorator<EurekaServerDescriptor,EurekaRestServer>
aRegistryUrl
- The value to be used when not null.protected org.refcodes.rest.RestRequestConsumer toHomeObserver(org.refcodes.rest.RestRequestConsumer aHomeRequestObserver)
aHomeRequestObserver
- The value to be used when not null.protected org.refcodes.rest.RestRequestConsumer toStatusObserver(org.refcodes.rest.RestRequestConsumer aStatusRequestObserver)
aStatusRequestObserver
- The value to be used when not null.Copyright © 2021. All rights reserved.