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.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
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.net.BaseLocatorAccessor.BaseLocatorBuilder<B extends org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<B>>, org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator, org.refcodes.net.BaseLocatorAccessor.BaseLocatorProperty
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
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.SchemeAccessor.SchemeBuilder<B extends org.refcodes.net.SchemeAccessor.SchemeBuilder<B>>, org.refcodes.net.SchemeAccessor.SchemeMutator, org.refcodes.net.SchemeAccessor.SchemeProperty
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.io.MaxConnectionsAccessor.MaxConnectionsBuilder<B extends org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsBuilder<B>>, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsMutator, org.refcodes.io.MaxConnectionsAccessor.MaxConnectionsProperty
Modifier and Type | Method and Description |
---|---|
default void |
open() |
default void |
open(org.refcodes.net.HttpServerContext aConnection) |
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(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 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(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 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 |
withKeyStoreDescriptor(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor) |
default HttpRestServer |
withMaxConnections(int aMaxConnections) |
default HttpRestServer |
withOpen(org.refcodes.net.HttpServerContext aConnection) |
default HttpRestServer |
withOpen(int aPort)
Builder method for opening the
HttpRestServer . |
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) |
onDelete, onGet, onPost, onPut, onRequest, onRequest, onRequest, withDisableObservers, withEnableObservers, withObserversActive
hasObserverSubscription, subscribeObserver, unsubscribeObserver
disableObservers, enableObservers, isObserversActive, observers, setObserversActive
addMediaTypeFactory
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
setBaseLocator
disableRequestCorrelation, enableRequestCorrelation, hasRequestCorrelation, setRequestCorrelation
disableSessionCorrelation, enableSessionCorrelation, hasSessionCorrelation, setSessionCorrelation
getConnectionStatus, isConnectionOpened
close, closeIn, closeQuietly, closeUnchecked
withOpenUnchecked
onConnectionRequest
setProtocol, setScheme
getKeyStoreDescriptor
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<org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>>
org.refcodes.component.CloseException
default HttpRestServer withCloseQuietly()
withCloseQuietly
in interface org.refcodes.component.Closable.CloseBuilder<org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>>
default HttpRestServer withCloseIn(int aCloseInMillis)
withCloseIn
in interface org.refcodes.component.Closable.CloseBuilder<org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>>
default HttpRestServer withOpen(org.refcodes.net.HttpServerContext aConnection) throws org.refcodes.component.OpenException
withOpen
in interface org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<org.refcodes.net.HttpServerContext,org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<org.refcodes.net.HttpServerContext,HttpRestServer>>
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<org.refcodes.net.HttpServerContext>
org.refcodes.component.OpenException
Copyright © 2018. All rights reserved.