org.refcodes.component.Closable
, org.refcodes.component.Closable.CloseBuilder<org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>>
, org.refcodes.component.Configurable<HttpRegistryContext<DESC>>
, org.refcodes.component.ConnectionComponent<org.refcodes.net.HttpServerContext>
, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>
, org.refcodes.component.ConnectionOpenable<org.refcodes.net.HttpServerContext>
, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<org.refcodes.net.HttpServerContext,org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>>
, 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<HttpRestServer>
, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator
, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty
, org.refcodes.mixin.AliasAccessor
, org.refcodes.mixin.AliasAccessor.AliasBuilder<B>
, org.refcodes.mixin.AliasAccessor.AliasMutator
, org.refcodes.mixin.AliasAccessor.AliasProperty
, org.refcodes.mixin.InstanceIdAccessor
, org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B>
, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator
, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty
, org.refcodes.mixin.PortAccessor
, org.refcodes.mixin.PortAccessor.PortBuilder<HttpRestServer>
, org.refcodes.mixin.PortAccessor.PortMutator
, org.refcodes.mixin.PortAccessor.PortProperty
, org.refcodes.net.BaseLocatorAccessor
, org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<RestServer>
, org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator
, org.refcodes.net.BaseLocatorAccessor.BaseLocatorProperty
, org.refcodes.net.BasicAuthObservable<HttpRestServer>
, org.refcodes.net.HostAccessor
, org.refcodes.net.HostAccessor.HostBuilder<B>
, org.refcodes.net.HostAccessor.HostMutator
, org.refcodes.net.HostAccessor.HostProperty
, org.refcodes.net.HttpsConnectionRequestObservable<HttpRestServer>
, org.refcodes.net.IpAddressAccessor
, org.refcodes.net.IpAddressAccessor.IpAddressBuilder<B>
, 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<RestServer>
, org.refcodes.net.RealmAccessor.RealmMutator
, org.refcodes.net.RealmAccessor.RealmProperty
, org.refcodes.net.SchemeAccessor
, org.refcodes.net.SchemeAccessor.SchemeBuilder<HttpRestServer>
, org.refcodes.net.SchemeAccessor.SchemeMutator
, org.refcodes.net.SchemeAccessor.SchemeProperty
, org.refcodes.net.VirtualHostAccessor
, org.refcodes.net.VirtualHostAccessor.VirtualHostBuilder<B>
, org.refcodes.net.VirtualHostAccessor.VirtualHostMutator
, org.refcodes.net.VirtualHostAccessor.VirtualHostProperty
, org.refcodes.observer.Observable<RestEndpoint>
, org.refcodes.observer.Observers<RestEndpoint,RestServer>
, HttpExceptionHandlerAccessor
, HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<RestServer>
, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator
, HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
, HttpExceptionHandlingAccessor
, HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<RestServer>
, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator
, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
, HttpRegistry<DESC,B>
, HttpRegistryRestServer<DESC,B>
, HttpRegistryUrlAccessor
, HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>
, HttpRegistryUrlAccessor.HttpRegistryUrlMutator
, HttpRegistryUrlAccessor.HttpRegistryUrlProperty
, HttpRestServer
, HttpServerDescriptorAccessor<DESC>
, HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>
, HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC>
, HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC>
, HttpServerDescriptorFactory<DESC>
, PingPathAccessor
, PingPathAccessor.PingPathBuilder<B>
, PingPathAccessor.PingPathMutator
, PingPathAccessor.PingPathProperty
, PingRequestObserver
, PingRequestObserverAccessor
, PingRequestObserverAccessor.PingRequestObserverBuilder<B>
, RestServer
, org.refcodes.runtime.RequestCorrelation<RestServer>
, org.refcodes.runtime.SessionCorrelation<RestServer>
, org.refcodes.security.KeyStoreDescriptorAccessor
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<HttpRestServer>
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty
, org.refcodes.security.TrustStoreDescriptorAccessor
, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>
, 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>
HttpRegistryRestServer
.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.net.BaseLocatorAccessor.BaseLocatorBuilder<B extends org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<B>>, org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator, org.refcodes.net.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
org.refcodes.net.HostAccessor.HostBuilder<B extends org.refcodes.net.HostAccessor.HostBuilder<?>>, org.refcodes.net.HostAccessor.HostMutator, org.refcodes.net.HostAccessor.HostProperty
HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B extends HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B>>, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B extends HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B>>, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B extends HttpRegistryUrlAccessor.HttpRegistryUrlBuilder<B>>, HttpRegistryUrlAccessor.HttpRegistryUrlMutator, HttpRegistryUrlAccessor.HttpRegistryUrlProperty
HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC extends HttpServerDescriptor,B extends HttpServerDescriptorAccessor.HttpServerDescriptorBuilder<DESC,B>>, HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC extends HttpServerDescriptor>, HttpServerDescriptorAccessor.HttpServerDescriptorProperty<DESC extends 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.net.IpAddressAccessor.IpAddressBuilder<B extends org.refcodes.net.IpAddressAccessor.IpAddressBuilder<B>>, org.refcodes.net.IpAddressAccessor.IpAddressMutator, org.refcodes.net.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.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable
PingPathAccessor.PingPathBuilder<B extends PingPathAccessor.PingPathBuilder<?>>, PingPathAccessor.PingPathMutator, PingPathAccessor.PingPathProperty
PingRequestObserverAccessor.PingRequestObserverBuilder<B extends PingRequestObserverAccessor.PingRequestObserverBuilder<B>>, PingRequestObserverAccessor.PingRequestObserverMutator, 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.net.RealmAccessor.RealmBuilder<B extends org.refcodes.net.RealmAccessor.RealmBuilder<B>>, org.refcodes.net.RealmAccessor.RealmMutator, org.refcodes.net.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.net.SchemeAccessor.SchemeBuilder<B extends org.refcodes.net.SchemeAccessor.SchemeBuilder<B>>, org.refcodes.net.SchemeAccessor.SchemeMutator, org.refcodes.net.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.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.net.VirtualHostAccessor.VirtualHostBuilder<B extends org.refcodes.net.VirtualHostAccessor.VirtualHostBuilder<?>>, org.refcodes.net.VirtualHostAccessor.VirtualHostMutator, org.refcodes.net.VirtualHostAccessor.VirtualHostProperty
Modifier and Type | Field | Description |
---|---|---|
protected org.refcodes.component.LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl |
_lifeCycleAutomaton |
|
protected RestRequestObserver |
_pingRequestObserver |
_server
Constructor | Description |
---|---|
AbstractHttpRegistryRestServerDecorator(HttpRestServer aServer) |
Decorates the given
HttpRestServer with discovery functionality. |
Modifier and Type | Method | Description |
---|---|---|
void |
destroy() |
This server is taken (removed) from the registry server.
|
String |
getAlias() |
|
String |
getHost() |
|
org.refcodes.net.Url |
getHttpRegistryUrl() |
Retrieves the URL from the URL property locating the service registry
registry.
|
DESC |
getHttpServerDescriptor() |
Retrieves the
HttpServerDescriptor from the
HttpServerDescriptor property. |
String |
getInstanceId() |
|
int[] |
getIpAddress() |
|
org.refcodes.component.LifeCycleStatus |
getLifeCycleStatus() |
|
String |
getPingPath() |
Retrieves the ping path from the ping path property.
|
RestRequestObserver |
getPingRequestObserver() |
Retrieves the ping
RestRequestObserver from the ping
RestRequestObserver property. |
org.refcodes.security.TrustStoreDescriptor |
getTrustStoreDescriptor() |
|
String |
getVirtualHost() |
|
void |
initialize() |
Initializes the
HttpRegistry by registering it at the service
registry with a status such as "starting" or "initializing" or
"not-ready-yet". |
boolean |
isDestroyable() |
|
boolean |
isDestroyed() |
|
boolean |
isInitalizable() |
|
boolean |
isInitialized() |
|
boolean |
isPausable() |
|
boolean |
isPaused() |
|
boolean |
isResumable() |
|
boolean |
isRunning() |
|
boolean |
isStartable() |
|
boolean |
isStoppable() |
|
boolean |
isStopped() |
|
void |
onPingRequest(RestRequestObserver aRequestObserver) |
Sets the ping
RestRequestObserver listening for "ping" requests. |
void |
pause() |
Some "deactivated" status is communicated to the registry server.
|
void |
resume() |
Some "up-and-running (again)" status is communicated to the registry
server.
|
void |
setAlias(String aAlias) |
|
void |
setHost(String aHost) |
|
void |
setHttpRegistryUrl(org.refcodes.net.Url aRegistryUrl) |
Sets the URL for the URL property locating the service registry
registry.
|
void |
setHttpServerDescriptor(DESC aServerDescriptor) |
Sets the
HttpServerDescriptor for the
HttpServerDescriptor property. |
void |
setInstanceId(String aInstanceId) |
|
void |
setIpAddress(int[] aIpAddress) |
|
void |
setPingPath(String aPingPath) |
Sets the ping path for the ping path property.
|
void |
setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) |
|
void |
setVirtualHost(String aVirtualHost) |
|
void |
start() |
Some "up-and-running" status is communicated to the registry server.
|
void |
stop() |
Some "out-of-order" status is communicated to the registry server.
|
protected String |
toAlias(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 String |
toHost(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.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.
|
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.
|
protected String |
toInstanceId(String aInstanceId,
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 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.
|
protected String |
toPingPath(String aPingPath,
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 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.
|
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.
|
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.
|
protected String |
toVirtualHost(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.
|
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
setBaseLocator
close, closeIn, closeQuietly, closeUnchecked
withOpenUnchecked
getConnectionStatus, isConnectionOpened
getHttpExceptionHandler
withOnHttpException
onHttpException, setHttpExceptionHandler
getHttpExceptionHandling
setHttpExceptionHandling
initialize, initialize, initialize, initialize, initialize, initialize, initialize, withAlias, withCidrNotation, withHost, withHttpRegistryUrl, withHttpServerDescriptor, withInstanceId, withIpAddress, withPingPath, withTrustStoreDescriptor, withVirtualHost
initialize, initialize, withPingRequestObserver, withPort, withProtocol, withScheme
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
onConnectionRequest
toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor, toHttpServerDescriptor
fromCidrNotation
getKeyStoreDescriptor
setKeyStoreDescriptor
setMaxConnections
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
addMediaTypeFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasObserverSubscription, subscribeObserver, unsubscribeObserver
disableObservers, enableObservers, isObserversActive, observers, setObserversActive
disableRequestCorrelation, enableRequestCorrelation, hasRequestCorrelation, setRequestCorrelation
onDelete, onGet, onPost, onPut, onRequest, onRequest, onRequest, withDisableObservers, withEnableObservers, withObserversActive
setProtocol, setScheme
protected org.refcodes.component.LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl _lifeCycleAutomaton
protected RestRequestObserver _pingRequestObserver
public AbstractHttpRegistryRestServerDecorator(HttpRestServer aServer)
HttpRestServer
with discovery functionality.aServer
- The HttpRestServer
to be decorated.public boolean isRunning()
isRunning
in interface org.refcodes.component.RunningAccessor
public boolean isInitialized()
isInitialized
in interface org.refcodes.component.InitializedAccessor
public org.refcodes.component.LifeCycleStatus getLifeCycleStatus()
getLifeCycleStatus
in interface org.refcodes.component.LifeCycleStatusAccessor
public void pause() throws org.refcodes.component.PauseException
RestEndpoint
instances (observers) (e.g. via
RestEndpointBuilder
being registered e.g. via
RestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver)
,
RestServer.onGet(String, RestRequestObserver)
RestServer.onPut(String, RestRequestObserver)
,
RestServer.onPut(String, RestRequestObserver)
or
RestServer.onDelete(String, RestRequestObserver)
is closed by calling its
Closable.close()
) are disabled by calling
Observers.disableObservers()
.
Some "deactivated" status is communicated to the registry server.
pause
in interface HttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
pause
in interface HttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
pause
in interface org.refcodes.component.Pausable
org.refcodes.component.PauseException
public void stop() throws org.refcodes.component.StopException
RestEndpoint
instances (observers) (e.g. via
RestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver)
,
RestServer.onGet(String, RestRequestObserver)
RestServer.onPut(String, RestRequestObserver)
,
RestServer.onPut(String, RestRequestObserver)
or
RestServer.onDelete(String, RestRequestObserver)
) are disabled by calling
Observers.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.
stop
in interface HttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
stop
in interface HttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
stop
in interface org.refcodes.component.Stoppable
org.refcodes.component.StopException
public void start() throws org.refcodes.component.StartException
RestEndpoint
instances (observers) (e.g. via
RestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver)
,
RestServer.onGet(String, RestRequestObserver)
RestServer.onPut(String, RestRequestObserver)
,
RestServer.onPut(String, RestRequestObserver)
or
RestServer.onDelete(String, RestRequestObserver)
) are enabled by calling
Observers.enableObservers()
. If necessary, the connection is opened via
HttpRestServer.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.
start
in interface HttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
start
in interface HttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
start
in interface org.refcodes.component.Startable
org.refcodes.component.StartException
public void resume() throws org.refcodes.component.ResumeException
RestEndpoint
instances (observers) (e.g.
via RestEndpointBuilder
being registered e.g. via
RestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver)
,
RestServer.onGet(String, RestRequestObserver)
RestServer.onPut(String, RestRequestObserver)
,
RestServer.onPut(String, RestRequestObserver)
or
RestServer.onDelete(String, RestRequestObserver)
is closed by calling its
Closable.close()
) are enabled (again) by calling
Observers.enableObservers()
.
Some "up-and-running (again)" status is communicated to the registry
server.
resume
in interface HttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
resume
in interface HttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
resume
in interface org.refcodes.component.Resumable
org.refcodes.component.ResumeException
public void initialize() throws org.refcodes.component.InitializeException
HttpRegistry
by registering it at the service
registry with a status such as "starting" or "initializing" or
"not-ready-yet".
initialize
in interface HttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
initialize
in interface org.refcodes.component.Initializable
org.refcodes.component.InitializeException
public boolean isStoppable()
isStoppable
in interface org.refcodes.component.Stoppable.StopAutomaton
public boolean isPausable()
isPausable
in interface org.refcodes.component.Pausable.PauseAutomaton
public boolean isStartable()
isStartable
in interface org.refcodes.component.Startable.StartAutomaton
public boolean isResumable()
isResumable
in interface org.refcodes.component.Resumable.ResumeAutomaton
public boolean isStopped()
isStopped
in interface org.refcodes.component.Stoppable.StopAutomaton
public boolean isPaused()
isPaused
in interface org.refcodes.component.Pausable.PauseAutomaton
public boolean isInitalizable()
isInitalizable
in interface org.refcodes.component.Initializable.InitializeAutomaton
public void destroy()
RestEndpoint
instances (observers) (e.g. via
RestServer.onRequest(org.refcodes.net.HttpMethod, String, RestRequestObserver)
,
RestServer.onGet(String, RestRequestObserver)
RestServer.onPut(String, RestRequestObserver)
,
RestServer.onPut(String, RestRequestObserver)
or
RestServer.onDelete(String, RestRequestObserver)
) are disabled by calling
Observers.disableObservers()
. Also stops a "ping" or "heartbeat" daemon.
Finally the connection is closed via Closable.close()
.
This server is taken (removed) from the registry server. Also stops a
"ping" or "heartbeat" daemon. Finally the connection is closed.
destroy
in interface org.refcodes.component.Destroyable
destroy
in interface HttpRegistry<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
destroy
in interface HttpRegistryRestServer<DESC extends HttpServerDescriptor,B extends HttpRegistryRestServer<DESC,B>>
public boolean isDestroyable()
isDestroyable
in interface org.refcodes.component.Destroyable.DestroyAutomaton
public boolean isDestroyed()
isDestroyed
in interface org.refcodes.component.Destroyable.DestroyAutomaton
public void setInstanceId(String aInstanceId)
setInstanceId
in interface org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator
public String getInstanceId()
getInstanceId
in interface org.refcodes.mixin.InstanceIdAccessor
public void setHost(String aHost)
setHost
in interface org.refcodes.net.HostAccessor.HostMutator
public String getHost()
getHost
in interface org.refcodes.net.HostAccessor
public String getVirtualHost()
getVirtualHost
in interface org.refcodes.net.VirtualHostAccessor
public void setVirtualHost(String aVirtualHost)
setVirtualHost
in interface org.refcodes.net.VirtualHostAccessor.VirtualHostMutator
public int[] getIpAddress()
getIpAddress
in interface org.refcodes.net.IpAddressAccessor
public void setIpAddress(int[] aIpAddress)
setIpAddress
in interface org.refcodes.net.IpAddressAccessor.IpAddressMutator
public org.refcodes.security.TrustStoreDescriptor getTrustStoreDescriptor()
getTrustStoreDescriptor
in interface org.refcodes.security.TrustStoreDescriptorAccessor
public void setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
setTrustStoreDescriptor
in interface org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
public DESC getHttpServerDescriptor()
HttpServerDescriptor
from the
HttpServerDescriptor
property.getHttpServerDescriptor
in interface HttpServerDescriptorAccessor<DESC extends HttpServerDescriptor>
HttpServerDescriptor
stored by the
HttpServerDescriptor
property.public void setHttpServerDescriptor(DESC aServerDescriptor)
HttpServerDescriptor
for the
HttpServerDescriptor
property.setHttpServerDescriptor
in interface HttpServerDescriptorAccessor.HttpServerDescriptorMutator<DESC extends HttpServerDescriptor>
aServerDescriptor
- The HttpServerDescriptor
to be
stored by the HttpServerDescriptor
property.public org.refcodes.net.Url getHttpRegistryUrl()
getHttpRegistryUrl
in interface HttpRegistryUrlAccessor
public void setHttpRegistryUrl(org.refcodes.net.Url aRegistryUrl)
setHttpRegistryUrl
in interface HttpRegistryUrlAccessor.HttpRegistryUrlMutator
aRegistryUrl
- The service registry registry URL to be stored by
the URL property.public String getAlias()
getAlias
in interface org.refcodes.mixin.AliasAccessor
public void setAlias(String aAlias)
setAlias
in interface org.refcodes.mixin.AliasAccessor.AliasMutator
public String getPingPath()
getPingPath
in interface PingPathAccessor
public void setPingPath(String aPingPath)
setPingPath
in interface PingPathAccessor.PingPathMutator
aPingPath
- The ping path to be stored by the ping path
property.public void onPingRequest(RestRequestObserver aRequestObserver)
RestRequestObserver
listening for "ping" requests.onPingRequest
in interface PingRequestObserver
aRequestObserver
- The ping RestRequestObserver
to be
registered.public RestRequestObserver getPingRequestObserver()
RestRequestObserver
from the ping
RestRequestObserver
property.getPingRequestObserver
in interface PingRequestObserverAccessor
RestRequestObserver
stored by the ping
RestRequestObserver
property.protected String toHost(String aHost) throws UnknownHostException
aHost
- The value to be used when not null.UnknownHostException
- thrown in case the local machine's host
cannot be resolved when the provided host is null.protected String toVirtualHost(String aVirtualHost)
aVirtualHost
- The value to be used when not null.protected int[] toIpAddress(int[] aIpAddress) throws IOException
aIpAddress
- The value to be used when not null.IOException
- thrown in case the local machine's IP-Address cannot
be resolved when the provided IP-Address is null.protected String toAlias(String aAlias)
aAlias
- The value to be used when not null.protected org.refcodes.data.Scheme toScheme(org.refcodes.data.Scheme aScheme)
aScheme
- The value to be used when not null.protected int toPort(int aPort)
aPort
- The value to be used when not null.protected String toInstanceId(String aInstanceId, String aHost)
aInstanceId
- The value to be used when not null.aHost
- The value to be used when instance ID is null.protected String toPingPath(String aPingPath, String aDefaultPingPath)
aPingPath
- The value to be used when not null.aDefaultPingPath
- The value to be used when the ping path is null.protected org.refcodes.security.TrustStoreDescriptor toTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
aStoreDescriptor
- The value to be used when not null.protected org.refcodes.net.Url toHttpRegistryUrl(org.refcodes.net.Url aRegistryUrl)
aRegistryUrl
- The value to be used when not null.protected DESC toHttpServerDescriptor(DESC aServerDescriptor)
aServerDescriptor
- The value to be used when not null.protected RestRequestObserver toPingObserver(RestRequestObserver aPingRequestObserver)
aPingRequestObserver
- The value to be used when not null.Copyright © 2018. All rights reserved.