public class HttpRestServerSugar extends Object
import static org.refcodes.rest.HttpRestServerSugar.*;
Constructor | Description |
---|---|
HttpRestServerSugar() |
Modifier and Type | Method | Description |
---|---|---|
static HttpRestServer |
close() |
See
Closable.close() |
static HttpRestServer |
closeIn(int aCloseInMillis) |
See
Closable.closeIn(int) |
static HttpRestServer |
closeQuietly() |
See
Closable.closeQuietly() |
static HttpRestServer |
onBasicAuthRequest(org.refcodes.web.BasicAuthObserver aObserver) |
See
BasicAuthObservable.onBasicAuthRequest(BasicAuthObserver) |
static RestEndpointBuilder |
onDelete(String aLocatorPathPattern,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onDelete(Pattern aLocatorRegExp,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onGet(String aLocatorPathPattern,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onGet(Pattern aLocatorRegExp,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onPost(String aLocatorPathPattern,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onPost(Pattern aLocatorRegExp,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onPut(String aLocatorPathPattern,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onPut(Pattern aLocatorRegExp,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onRequest(String aLocatorPathPattern,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onRequest(Pattern aLocatorRegExp,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onRequest(org.refcodes.web.HttpMethod aHttpMethod,
String aLocatorPathPattern,
RestRequestConsumer aRequestConsumer) |
|
static RestEndpointBuilder |
onRequest(org.refcodes.web.HttpMethod aHttpMethod,
Pattern aLocatorRegExp,
RestRequestConsumer aRequestConsumer) |
|
static HttpRestServer |
open(int aPort) |
|
static HttpRestServer |
open(int aPort,
int aMaxConnections) |
|
static HttpRestServer |
open(String aSecureSocketProtocol,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
Integer aPort) |
|
static HttpRestServer |
open(String aSecureSocketProtocol,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
Integer aPort,
int aMaxConnections) |
|
static HttpRestServer |
open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
Integer aPort) |
|
static HttpRestServer |
open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
Integer aPort,
int aMaxConnections) |
|
static HttpRestServer |
open(org.refcodes.web.HttpServerContext aCtx) |
See
ConnectionOpenable.open(Object) |
static boolean |
unsubscribeObserver(RestEndpoint aEndpoint) |
See
Observable.unsubscribeObserver(Object) |
static HttpRestServer |
withBaseLocator(String aBaseLocator) |
|
static HttpRestServer |
withRealm(String aRealm) |
public static HttpRestServer close() throws IOException
Closable.close()
HttpRestServer
IOException
- the close exceptionpublic static HttpRestServer closeIn(int aCloseInMillis)
Closable.closeIn(int)
aCloseInMillis
- The close in millisHttpRestServer
public static HttpRestServer closeQuietly()
Closable.closeQuietly()
HttpRestServer
public static HttpRestServer onBasicAuthRequest(org.refcodes.web.BasicAuthObserver aObserver)
BasicAuthObservable.onBasicAuthRequest(BasicAuthObserver)
aObserver
- The observerHttpRestServer
public static RestEndpointBuilder onDelete(String aLocatorPathPattern, RestRequestConsumer aRequestConsumer)
aLocatorPathPattern
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onGet(String aLocatorPathPattern, RestRequestConsumer aRequestConsumer)
aLocatorPathPattern
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onPost(String aLocatorPathPattern, RestRequestConsumer aRequestConsumer)
aLocatorPathPattern
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
See
RestServer.onPost(String, RestRequestConsumer)
public static RestEndpointBuilder onPut(String aLocatorPathPattern, RestRequestConsumer aRequestConsumer)
aLocatorPathPattern
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onRequest(org.refcodes.web.HttpMethod aHttpMethod, String aLocatorPathPattern, RestRequestConsumer aRequestConsumer)
aHttpMethod
- The HTTP-MethodaLocatorPathPattern
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onRequest(String aLocatorPathPattern, RestRequestConsumer aRequestConsumer)
aLocatorPathPattern
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onDelete(Pattern aLocatorRegExp, RestRequestConsumer aRequestConsumer)
aLocatorRegExp
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onGet(Pattern aLocatorRegExp, RestRequestConsumer aRequestConsumer)
aLocatorRegExp
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onPost(Pattern aLocatorRegExp, RestRequestConsumer aRequestConsumer)
aLocatorRegExp
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
See
RestServer.onPost(String, RestRequestConsumer)
public static RestEndpointBuilder onPut(Pattern aLocatorRegExp, RestRequestConsumer aRequestConsumer)
aLocatorRegExp
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onRequest(org.refcodes.web.HttpMethod aHttpMethod, Pattern aLocatorRegExp, RestRequestConsumer aRequestConsumer)
aHttpMethod
- The HTTP-MethodaLocatorRegExp
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onRequest(Pattern aLocatorRegExp, RestRequestConsumer aRequestConsumer)
aLocatorRegExp
- The locator patternaRequestConsumer
- The request observerRestEndpointBuilder
public static HttpRestServer open(org.refcodes.web.HttpServerContext aCtx) throws IOException
ConnectionOpenable.open(Object)
aCtx
- The context describing the parameters required to open the
connection.HttpRestServer
IOException
- thrown in case the open operation caused problems.public static HttpRestServer open(int aPort) throws IOException
aPort
- The portHttpRestServer
IOException
- thrown in case the open operation caused problems.public static HttpRestServer open(int aPort, int aMaxConnections) throws IOException
aPort
- The portaMaxConnections
- The max connectionsHttpRestServer
IOException
- thrown in case the open operation caused problems.public static HttpRestServer open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort) throws IOException
aStoreDescriptor
- The store descriptor describing your
KeyStore
required by HTTP.aPort
- The portHttpRestServer
IOException
- thrown in case the open operation caused problems.public static HttpRestServer open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort, int aMaxConnections) throws IOException
aStoreDescriptor
- The store descriptor describing your
KeyStore
required by HTTP.aPort
- The portaMaxConnections
- The max connectionsHttpRestServer
IOException
- thrown in case the open operation caused problems.public static HttpRestServer open(String aSecureSocketProtocol, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort) throws IOException
aSecureSocketProtocol
- The secure socket protocolaStoreDescriptor
- The store descriptor describing your
KeyStore
required by HTTP.aPort
- The portHttpRestServer
IOException
- thrown in case the open operation caused problems.public static HttpRestServer open(String aSecureSocketProtocol, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort, int aMaxConnections) throws IOException
aSecureSocketProtocol
- The secure socket protocolaStoreDescriptor
- The store descriptor describing your
KeyStore
required by HTTP.aPort
- The portaMaxConnections
- The max connectionsHttpRestServer
IOException
- thrown in case the open operation caused problems.public static boolean unsubscribeObserver(RestEndpoint aEndpoint)
Observable.unsubscribeObserver(Object)
aEndpoint
- The endpointpublic static HttpRestServer withBaseLocator(String aBaseLocator)
aBaseLocator
- The base locatorHttpRestServer
public static HttpRestServer withRealm(String aRealm)
aRealm
- The realmHttpRestServer
Copyright © 2021. All rights reserved.