public interface HttpRestServer extends RestServer, org.refcodes.component.ConnectionComponent<Integer>, org.refcodes.net.BasicAuthObservable<HttpRestServer>, org.refcodes.net.HttpsConnectionRequestObservable<HttpRestServer>
RestServer
to be capable of opening a server socket on the
local host with the provided port number via #open(Integer)
or with
an additional maximum number of connections via open(Integer, int)
.
To open a HTTPS port, use the methods such as:
open(File, String, Integer)
or
open(File, String, String, Integer)
or
open(String, File, String, String, String, Integer, 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.ConnectionComponent.ConnectionAutomaton<CON>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_KEYSTORE_FORMAT |
static String |
DEFAULT_SSL_PROTOCOL |
Modifier and Type | Method and Description |
---|---|
default void |
open(File aKeyStoreFile,
String aPassword,
Integer aPort)
Same as
open(String, File, String, String, String, Integer, int)
but:
The protocol fore the underlying SSLContext used is set to
"TLS". |
default void |
open(File aKeyStoreFile,
String aKeyStorePassword,
Integer aPort,
int aMaxConnections)
Same as
open(String, File, String, String, String, Integer, int)
but:
The protocol fore the underlying SSLContext used is set to
"TLS". |
default void |
open(File aKeyStoreFile,
String aKeyStorePassword,
String aKeyPassword,
Integer aPort)
Same as
open(String, File, String, String, String, Integer, int)
but:
The protocol fore the underlying SSLContext used is set to
"TLS". |
default void |
open(File aKeyStoreFile,
String aKeyStorePassword,
String aKeyPassword,
Integer aPort,
int aMaxConnections)
Same as
open(String, File, String, String, String, Integer, int)
but:
The protocol fore the underlying SSLContext used is set to
"TLS". |
void |
open(Integer 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 aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStorePassword,
Integer aPort)
Same as
open(String, File, String, String, String, Integer, int)
but:
The type of KeyStore is set to "JKS". |
default void |
open(String aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStorePassword,
Integer aPort,
int aMaxConnections)
Same as
open(String, File, String, String, String, Integer, int)
but:
The type of KeyStore is set to "JKS". |
default void |
open(String aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStoreType,
String aKeyStorePassword,
String aKeyPassword,
Integer aPort)
Same as
open(String, File, String, String, String, Integer, int)
but:
The number of maximum connections at the same time is decided upon by
the implementations's default value. |
void |
open(String aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStoreType,
String aKeyStorePassword,
String aKeyPassword,
Integer 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 |
withDisableRequestCorrelation() |
default HttpRestServer |
withDisableSessionCorrelation() |
default HttpRestServer |
withEnableRequestCorrelation() |
default HttpRestServer |
withEnableSessionCorrelation() |
default HttpRestServer |
withRealm(String aRealm) |
default HttpRestServer |
withRequestCorrelation(boolean hasRequestCorrelation) |
default HttpRestServer |
withSessionCorrelation(boolean hasSessionCorrelation) |
onDelete, onGet, onPost, onPut, onRequest, onRequest, onRequest
hasObserverSubscription, subscribeObserver, unsubscribeObserver
addMediaTypeFactory
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
setBaseLocator
disableRequestCorrelation, enableRequestCorrelation, hasRequestCorrelation, setRequestCorrelation
static final String DEFAULT_SSL_PROTOCOL
static final String DEFAULT_KEYSTORE_FORMAT
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
void open(Integer 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 timeorg.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.void open(String aSecureSocketProtocol, File aKeyStoreFile, String aKeyStoreType, String aKeyStorePassword, String aKeyPassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aSecureSocketProtocol
- The protocol to use, e.g. "TLS".aKeyStoreFile
- The file pointing to your KeyStore
.aKeyStoreType
- The type of KeyStore
, e.g. "JKS" format.aKeyStorePassword
- The password for the KeyStore
.aKeyPassword
- The password for the KeyStore
's key.aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same timeorg.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(String aSecureSocketProtocol, File aKeyStoreFile, String aKeyStoreType, String aKeyStorePassword, String aKeyPassword, Integer aPort) throws org.refcodes.component.OpenException
open(String, File, String, String, String, Integer, int)
but:
aSecureSocketProtocol
- The protocol to use, e.g. "TLS".aKeyStoreFile
- The file pointing to your KeyStore
.aKeyStoreType
- The type of KeyStore
, e.g. "JKS" format.aKeyStorePassword
- The password for the KeyStore
.aKeyPassword
- The password for the KeyStore
's key.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 aSecureSocketProtocol, File aKeyStoreFile, String aKeyStorePassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aSecureSocketProtocol
- The protocol to use, e.g. "TLS".aKeyStoreFile
- The file pointing to your KeyStore
.aKeyStorePassword
- The password for the KeyStore
.aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same timeorg.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(String aSecureSocketProtocol, File aKeyStoreFile, String aKeyStorePassword, Integer aPort) throws org.refcodes.component.OpenException
aSecureSocketProtocol
- The protocol to use, e.g. "TLS".aKeyStoreFile
- The file pointing to your KeyStore
.aKeyStorePassword
- The password for the KeyStore
.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(File aKeyStoreFile, String aKeyStorePassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
open(String, File, String, String, String, Integer, 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.
aKeyStoreFile
- The file pointing to your KeyStore
.aKeyStorePassword
- The password for the KeyStore
.aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same timeorg.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(File aKeyStoreFile, String aKeyStorePassword, String aKeyPassword, Integer aPort) throws org.refcodes.component.OpenException
open(String, File, String, String, String, Integer, int)
but:
SSLContext
used is set to
"TLS".
KeyStore
is set to "JKS".
aKeyStoreFile
- The file pointing to your KeyStore
.aKeyStorePassword
- The password for the KeyStore
.aKeyPassword
- The password for the KeyStore
's key.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(File aKeyStoreFile, String aKeyStorePassword, String aKeyPassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
open(String, File, String, String, String, Integer, int)
but:
SSLContext
used is set to
"TLS".
KeyStore
is set to "JKS".
aKeyStoreFile
- The file pointing to your KeyStore
.aKeyStorePassword
- The password for the KeyStore
.aKeyPassword
- The password for the KeyStore
's key.aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same timeorg.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.default void open(File aKeyStoreFile, String aPassword, Integer aPort) throws org.refcodes.component.OpenException
open(String, File, String, String, String, Integer, 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.
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
Copyright © 2017. All rights reserved.