public interface HTTPSupport
Modifier and Type | Field and Description |
---|---|
static String |
BASIC_AUTHENTICATOR
Basic authenticator.
|
static String |
CERTIFICATE_AUTHENTICATOR
Certificate authenticator.
|
static String |
DIGEST_AUTHENTICATOR
Digest authenticator.
|
Modifier and Type | Method and Description |
---|---|
void |
destroyServer()
Destroys the server.
|
Optional<String> |
getListenerAddress(int index)
Gets the listener address.
|
int |
getListenerCount()
Gets the listener count.
|
int |
getListenerPort(int index)
Gets the listener port.
|
boolean |
isServerStarted()
Asks if the server is started.
|
boolean |
setUpContext(String path,
Optional<String> resource,
Map<String,String> servlets,
Optional<String> realmName,
Optional<String> authenticator,
boolean confidential,
String[] roles,
Optional<EventListener> eventListener)
Sets up a context.
|
boolean |
setUpListener(String address,
int port,
int confidentialPort,
Optional<ServerSecurityContext> securityContext)
Sets up a listener.
|
boolean |
setUpRealm(String realmName,
KeyedGroups realmProperties,
SecurityContext securityContext)
Sets up a realm.
|
boolean |
setUpServer(HTTPServerAppImpl httpServerAppImpl)
Sets up the server.
|
void |
startServer()
Starts the server.
|
void |
stopServer()
Stops the server.
|
static final String BASIC_AUTHENTICATOR
static final String CERTIFICATE_AUTHENTICATOR
static final String DIGEST_AUTHENTICATOR
void destroyServer() throws Exception
Exception
- Thrown by the server.@Nonnull @CheckReturnValue Optional<String> getListenerAddress(int index)
index
- The listener index.@CheckReturnValue int getListenerCount()
@CheckReturnValue int getListenerPort(int index)
index
- The listener index.@CheckReturnValue boolean isServerStarted()
@CheckReturnValue boolean setUpContext(@Nonnull String path, @Nonnull Optional<String> resource, @Nonnull Map<String,String> servlets, @Nonnull Optional<String> realmName, @Nonnull Optional<String> authenticator, boolean confidential, @Nonnull String[] roles, @Nonnull Optional<EventListener> eventListener)
path
- The context path.resource
- The optional resource base.servlets
- The servlets map.realmName
- The optional realm name.authenticator
- The optional authenticator identification.confidential
- Confidential channel needed.roles
- The allowed roles (may be empty).eventListener
- The optional context event listener.@CheckReturnValue boolean setUpListener(@Nonnull String address, int port, int confidentialPort, @Nonnull Optional<ServerSecurityContext> securityContext)
address
- The host interface address.port
- The interface port.confidentialPort
- A confidential port.securityContext
- An optional security context.@CheckReturnValue boolean setUpRealm(@Nonnull String realmName, @Nonnull KeyedGroups realmProperties, @Nonnull SecurityContext securityContext)
realmName
- The realm name.realmProperties
- The the realm configuration properties.securityContext
- The security context.@CheckReturnValue boolean setUpServer(@Nonnull HTTPServerAppImpl httpServerAppImpl)
httpServerAppImpl
- The HTTP server application implementation.void startServer() throws Exception
Exception
- Thrown by the server.void stopServer() throws Exception
Exception
- Thrown by the server.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.