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.component.Closable
, org.refcodes.component.Closable.CloseBuilder<RestServer>
, org.refcodes.component.ConnectionComponent<RestServer>
, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>
, org.refcodes.component.ConnectionOpenable<RestServer>
, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<RestEndpoint,RestServer>
, org.refcodes.component.ConnectionStatusAccessor
, HttpExceptionHandlerAccessor
, HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<RestServer>
, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator
, HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
, HttpExceptionHandlingAccessor
, HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<RestServer>
, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator
, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
, org.refcodes.net.HttpsConnectionRequestObservable<HttpRestServer>
, org.refcodes.security.KeyStoreDescriptorAccessor
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<HttpRestServer>
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorMutator
, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty
, org.refcodes.component.LinkComponent
, org.refcodes.io.MaxConnectionsAccessor
, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<HttpRestServer>
, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator
, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty
, org.refcodes.net.MediaTypeFactoryLookup
, org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
, org.refcodes.observer.Observable<RestServer>
, org.refcodes.observer.Observers<RestEndpoint,RestServer>
, org.refcodes.component.Openable
, org.refcodes.mixin.PortAccessor
, org.refcodes.mixin.PortAccessor.PortBuilder<HttpRestServer>
, org.refcodes.mixin.PortAccessor.PortMutator
, org.refcodes.mixin.PortAccessor.PortProperty
, org.refcodes.net.RealmAccessor
, org.refcodes.net.RealmAccessor.RealmBuilder<RestServer>
, org.refcodes.net.RealmAccessor.RealmMutator
, org.refcodes.net.RealmAccessor.RealmProperty
, org.refcodes.runtime.RequestCorrelation<RestServer>
, RestServer
, org.refcodes.net.SchemeAccessor
, org.refcodes.net.SchemeAccessor.SchemeBuilder<HttpRestServer>
, org.refcodes.net.SchemeAccessor.SchemeMutator
, org.refcodes.net.SchemeAccessor.SchemeProperty
, org.refcodes.runtime.SessionCorrelation<RestServer>
HttpRegistryRestServer<DESC,B>
AbstractHttpRegistryRestServerDecorator
, AbstractHttpRestServerDecorator
, HttpRestServerImpl
, HttpRestServerSingleton
public interface HttpRestServer extends RestServer, org.refcodes.component.LinkComponent, org.refcodes.component.ConnectionStatusAccessor, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>, org.refcodes.net.BasicAuthObservable<HttpRestServer>, org.refcodes.net.HttpsConnectionRequestObservable<HttpRestServer>, org.refcodes.mixin.PortAccessor.PortProperty, org.refcodes.mixin.PortAccessor.PortBuilder<HttpRestServer>, org.refcodes.net.SchemeAccessor.SchemeProperty, org.refcodes.net.SchemeAccessor.SchemeBuilder<HttpRestServer>, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorProperty, org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<HttpRestServer>, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<HttpRestServer>
RestServer
to be capable of opening a server socket on the
local host with the provided port number via ConnectionOpenable.open(Object)
or with an
additional maximum number of connections via open(int, int)
.
To open a HTTPS port, use the methods such as:
open(KeyStoreDescriptor, int)
or
open(KeyStoreDescriptor, int, int)
or
open(String, KeyStoreDescriptor, int)
or
open(String, KeyStoreDescriptor, int, int)
.
A HttpRestServer
can be shutdown via Closable.close()
.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.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
HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B extends HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B>>, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty
HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B extends HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B>>, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty
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.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.mixin.PortAccessor.PortBuilder<B extends org.refcodes.mixin.PortAccessor.PortBuilder<B>>, org.refcodes.mixin.PortAccessor.PortMutator, org.refcodes.mixin.PortAccessor.PortProperty
Modifier and Type | Method | Description |
---|---|---|
default void |
open() |
|
default void |
open(int aPort) |
Opens the HTTP sever connection (socket) at the given port
|
default void |
open(int aPort,
int aMaxConnections) |
Opens the HTTP sever connection (socket) at the given port allowing the
given number of maximum connections at the same time.
|
default void |
open(String aProtocol,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) |
Same as
open(String, KeyStoreDescriptor, int) but:
The number of maximum connections at the same time is decided upon by
the implementations's default value. |
default void |
open(String aProtocol,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
int aPort) |
Same as
open(String, KeyStoreDescriptor, int, int) but:
The number of maximum connections at the same time is decided upon by
the implementations's default value. |
void |
open(String aProtocol,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
int aPort,
int aMaxConnections) |
Opens the HTTPS sever connection (socket) at the given port allowing the
given number of maximum connections at the same time using the provided
HTTPS configuration parameters.
|
default void |
open(org.refcodes.data.Scheme aScheme,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) |
Same as
open(String, KeyStoreDescriptor, int) but:
The number of maximum connections at the same time is decided upon by
the implementations's default value. |
default void |
open(org.refcodes.data.Scheme aScheme,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
int aPort) |
Same as
open(String, KeyStoreDescriptor, int, int) but:
The number of maximum connections at the same time is decided upon by
the implementations's default value. |
default void |
open(org.refcodes.data.Scheme aScheme,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
int aPort,
int aMaxConnections) |
Opens the HTTPS sever connection (socket) at the given port allowing the
given number of maximum connections at the same time using the provided
HTTPS configuration parameters.
|
default void |
open(org.refcodes.net.HttpServerContext aConnection) |
|
default void |
open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) |
Same as
open(String, KeyStoreDescriptor, int) but:
The protocol for the underlying SSLContext used is set to
"TLS". |
default void |
open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
int aPort) |
Same as
open(String, KeyStoreDescriptor, int, int) but:
The protocol for the underlying SSLContext used is set to
"TLS". |
default void |
open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
int aPort,
int aMaxConnections) |
Same as
open(String, KeyStoreDescriptor, int, int) but:
The protocol for the underlying SSLContext used is set to
"TLS". |
default HttpRestServer |
withBaseLocator(String aBaseLocator) |
|
default HttpRestServer |
withClose() |
|
default HttpRestServer |
withCloseIn(int aCloseInMillis) |
|
default HttpRestServer |
withCloseQuietly() |
|
default HttpRestServer |
withDisableRequestCorrelation() |
|
default HttpRestServer |
withDisableSessionCorrelation() |
|
default HttpRestServer |
withEnableRequestCorrelation() |
|
default HttpRestServer |
withEnableSessionCorrelation() |
|
default HttpRestServer |
withHttpExceptionHandler(HttpExceptionHandler aHttpErrorHandler) |
Sets the
HttpExceptionHandler for the
HttpExceptionHandler property. |
default HttpRestServer |
withHttpExceptionHandling(HttpExceptionHandling aHttpErrorHandling) |
Sets the
HttpExceptionHandling for the HttpExceptionHandling
property. |
default HttpRestServer |
withKeyStoreDescriptor(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) |
|
default HttpRestServer |
withMaxConnections(int aMaxConnections) |
|
default HttpRestServer |
withOpen(int aPort) |
Builder method for opening the
HttpRestServer . |
default HttpRestServer |
withOpen(org.refcodes.net.HttpServerContext aConnection) |
|
default HttpRestServer |
withPort(int aPort) |
|
default HttpRestServer |
withProtocol(String aProtocol) |
|
default HttpRestServer |
withRealm(String aRealm) |
|
default HttpRestServer |
withRequestCorrelation(boolean hasRequestCorrelation) |
|
default HttpRestServer |
withScheme(org.refcodes.data.Scheme aScheme) |
|
default HttpRestServer |
withSessionCorrelation(boolean hasSessionCorrelation) |
setBaseLocator
close, closeIn, closeQuietly, closeUnchecked
withOpenUnchecked
getConnectionStatus, isConnectionOpened
getHttpExceptionHandler
withOnHttpException
onHttpException, setHttpExceptionHandler
getHttpExceptionHandling
setHttpExceptionHandling
onConnectionRequest
getKeyStoreDescriptor
setKeyStoreDescriptor
setMaxConnections
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
addMediaTypeFactory
hasObserverSubscription, subscribeObserver, unsubscribeObserver
disableObservers, enableObservers, isObserversActive, observers, setObserversActive
disableRequestCorrelation, enableRequestCorrelation, hasRequestCorrelation, setRequestCorrelation
onDelete, onGet, onPost, onPut, onRequest, onRequest, onRequest, withDisableObservers, withEnableObservers, withObserversActive
default HttpRestServer withHttpExceptionHandler(HttpExceptionHandler aHttpErrorHandler)
HttpExceptionHandler
for the
HttpExceptionHandler
property.withHttpExceptionHandler
in interface HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<RestServer>
aHttpErrorHandler
- The HttpExceptionHandler
to be
stored by the HttpExceptionHandler
property.default HttpRestServer withHttpExceptionHandling(HttpExceptionHandling aHttpErrorHandling)
HttpExceptionHandling
for the HttpExceptionHandling
property.withHttpExceptionHandling
in interface HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<RestServer>
aHttpErrorHandling
- The HttpExceptionHandling
to be stored
by the HttpExceptionHandling
property.default HttpRestServer withSessionCorrelation(boolean hasSessionCorrelation)
withSessionCorrelation
in interface RestServer
withSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestServer>
default HttpRestServer withEnableSessionCorrelation()
withEnableSessionCorrelation
in interface RestServer
withEnableSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestServer>
default HttpRestServer withDisableSessionCorrelation()
withDisableSessionCorrelation
in interface RestServer
withDisableSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestServer>
default HttpRestServer withRequestCorrelation(boolean hasRequestCorrelation)
withRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestServer>
withRequestCorrelation
in interface RestServer
default HttpRestServer withEnableRequestCorrelation()
withEnableRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestServer>
withEnableRequestCorrelation
in interface RestServer
default HttpRestServer withDisableRequestCorrelation()
withDisableRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestServer>
withDisableRequestCorrelation
in interface RestServer
default HttpRestServer withRealm(String aRealm)
withRealm
in interface org.refcodes.net.RealmAccessor.RealmBuilder<RestServer>
withRealm
in interface RestServer
default HttpRestServer withBaseLocator(String aBaseLocator)
withBaseLocator
in interface org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<RestServer>
withBaseLocator
in interface RestServer
default HttpRestServer withClose() throws org.refcodes.component.CloseException
withClose
in interface org.refcodes.component.Closable.CloseBuilder<RestServer>
org.refcodes.component.CloseException
default HttpRestServer withCloseQuietly()
withCloseQuietly
in interface org.refcodes.component.Closable.CloseBuilder<RestServer>
default HttpRestServer withCloseIn(int aCloseInMillis)
withCloseIn
in interface org.refcodes.component.Closable.CloseBuilder<RestServer>
default HttpRestServer withOpen(org.refcodes.net.HttpServerContext aConnection) throws org.refcodes.component.OpenException
withOpen
in interface org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<RestEndpoint,RestServer>
org.refcodes.component.OpenException
default HttpRestServer withOpen(int aPort) throws org.refcodes.component.OpenException
HttpRestServer
. Delegates to
open(int)
and returns this method.aPort
- The port on which to listen for requests.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default HttpRestServer withPort(int aPort)
withPort
in interface org.refcodes.mixin.PortAccessor.PortBuilder<HttpRestServer>
default HttpRestServer withScheme(org.refcodes.data.Scheme aScheme)
withScheme
in interface org.refcodes.net.SchemeAccessor.SchemeBuilder<HttpRestServer>
default HttpRestServer withProtocol(String aProtocol)
withProtocol
in interface org.refcodes.net.SchemeAccessor.SchemeBuilder<HttpRestServer>
default HttpRestServer withKeyStoreDescriptor(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor)
withKeyStoreDescriptor
in interface org.refcodes.security.KeyStoreDescriptorAccessor.KeyStoreDescriptorBuilder<HttpRestServer>
default HttpRestServer withMaxConnections(int aMaxConnections)
withMaxConnections
in interface org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<HttpRestServer>
default void open() throws org.refcodes.component.OpenException
open
in interface org.refcodes.component.Openable
org.refcodes.component.OpenException
default void open(int aPort) throws org.refcodes.component.OpenException
aPort
- The port on which to listen for requests.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(int aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same
time.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(String aProtocol, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, int aPort) throws org.refcodes.component.OpenException
open(String, KeyStoreDescriptor, int, int)
but:
aProtocol
- The protocol to use, e.g. "TLS".aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.aPort
- The port on which to listen for requests.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(String aProtocol, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) throws org.refcodes.component.OpenException
open(String, KeyStoreDescriptor, int)
but:
aProtocol
- The protocol to use, e.g. "TLS".aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, int aPort, int aMaxConnections) throws org.refcodes.component.OpenException
open(String, KeyStoreDescriptor, int, int)
but:
SSLContext
used is set to
"TLS".
KeyStore
is set to "JKS".
KeyStore
's key is assumed to be the same
as the provided KeyStore
password.
aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same
time.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, int aPort) throws org.refcodes.component.OpenException
open(String, KeyStoreDescriptor, int, int)
but:
SSLContext
used is set to
"TLS".
KeyStore
is set to "JKS".
aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.aPort
- The port on which to listen for requests.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) throws org.refcodes.component.OpenException
open(String, KeyStoreDescriptor, int)
but:
SSLContext
used is set to
"TLS".
KeyStore
is set to "JKS".
aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(org.refcodes.data.Scheme aScheme, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, int aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aScheme
- The Scheme
to use, e.g. Scheme.HTTPS
defaults to "TLS".aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same
time.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(org.refcodes.data.Scheme aScheme, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, int aPort) throws org.refcodes.component.OpenException
open(String, KeyStoreDescriptor, int, int)
but:
aScheme
- The Scheme
to use, e.g. Scheme.HTTPS
defaults to "TLS".aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.aPort
- The port on which to listen for requests.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(org.refcodes.data.Scheme aScheme, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) throws org.refcodes.component.OpenException
open(String, KeyStoreDescriptor, int)
but:
aScheme
- The Scheme
to use, e.g. Scheme.HTTPS
defaults to "TLS".aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.void open(String aProtocol, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, int aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aProtocol
- The protocol to use, e.g. "TLS".aStoreDescriptor
- The store descriptor describing your
KeyStore
required for HTTPS.aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same
time.org.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(org.refcodes.net.HttpServerContext aConnection) throws org.refcodes.component.OpenException
open
in interface org.refcodes.component.ConnectionOpenable<RestServer>
org.refcodes.component.OpenException
Copyright © 2018. All rights reserved.