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.net.BasicAuthObserver aObserver) |
See
BasicAuthObservable.onBasicAuthRequest(BasicAuthObserver) |
static RestEndpointBuilder |
onDelete(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
|
static RestEndpointBuilder |
onGet(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
|
static RestEndpointBuilder |
onPost(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
|
static RestEndpointBuilder |
onPut(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
|
static RestEndpointBuilder |
onRequest(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
|
static RestEndpointBuilder |
onRequest(org.refcodes.net.HttpMethod aHttpMethod,
String aLocatorPattern,
RestRequestObserver aRequestObserver) |
|
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.net.HttpServerContext aCtx) |
See
ConnectionOpenable.open(Object) |
static HttpRestServer |
open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
Integer aPort) |
|
static HttpRestServer |
open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
Integer aPort,
int aMaxConnections) |
|
static boolean |
unsubscribeObserver(RestEndpoint aEndpoint) |
See
Observable.unsubscribeObserver(Object) |
static HttpRestServer |
withBaseLocator(String aBaseLocator) |
|
static HttpRestServer |
withRealm(String aRealm) |
public static HttpRestServer close() throws org.refcodes.component.CloseException
Closable.close()HttpRestServerorg.refcodes.component.CloseException - the close exceptionpublic static HttpRestServer closeIn(int aCloseInMillis)
Closable.closeIn(int)aCloseInMillis - The close in millisHttpRestServerpublic static HttpRestServer closeQuietly()
Closable.closeQuietly()HttpRestServerpublic static HttpRestServer onBasicAuthRequest(org.refcodes.net.BasicAuthObserver aObserver)
BasicAuthObservable.onBasicAuthRequest(BasicAuthObserver)aObserver - The observerHttpRestServerpublic static RestEndpointBuilder onDelete(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern - The locator patternaRequestObserver - The request observerRestEndpointBuilderpublic static RestEndpointBuilder onGet(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern - The locator patternaRequestObserver - The request observerRestEndpointBuilderpublic static RestEndpointBuilder onPost(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern - The locator patternaRequestObserver - The request observerRestEndpointBuilder See
RestServer.onPost(String, RestRequestObserver)public static RestEndpointBuilder onPut(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern - The locator patternaRequestObserver - The request observerRestEndpointBuilderpublic static RestEndpointBuilder onRequest(org.refcodes.net.HttpMethod aHttpMethod, String aLocatorPattern, RestRequestObserver aRequestObserver)
aHttpMethod - The HTTP-MethodaLocatorPattern - The locator patternaRequestObserver - The request observerRestEndpointBuilderpublic static RestEndpointBuilder onRequest(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern - The locator patternaRequestObserver - The request observerRestEndpointBuilderpublic static HttpRestServer open(org.refcodes.net.HttpServerContext aCtx) throws org.refcodes.component.OpenException
ConnectionOpenable.open(Object)aCtx - The context describing the parameters required to open the
connection.HttpRestServerorg.refcodes.component.OpenException - thrown in case the open operation caused problems.public static HttpRestServer open(int aPort) throws org.refcodes.component.OpenException
aPort - The portHttpRestServerorg.refcodes.component.OpenException - thrown in case the open operation caused problems.public static HttpRestServer open(int aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aPort - The portaMaxConnections - The max connectionsHttpRestServerorg.refcodes.component.OpenException - thrown in case the open operation caused problems.public static HttpRestServer open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort) throws org.refcodes.component.OpenException
aStoreDescriptor - The store descriptor describing your
KeyStore required by HTTP.aPort - The portHttpRestServerorg.refcodes.component.OpenException - thrown in case the open operation caused problems.public static HttpRestServer open(org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aStoreDescriptor - The store descriptor describing your
KeyStore required by HTTP.aPort - The portaMaxConnections - The max connectionsHttpRestServerorg.refcodes.component.OpenException - thrown in case the open operation caused problems.public static HttpRestServer open(String aSecureSocketProtocol, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort) throws org.refcodes.component.OpenException
aSecureSocketProtocol - The secure socket protocolaStoreDescriptor - The store descriptor describing your
KeyStore required by HTTP.aPort - The portHttpRestServerorg.refcodes.component.OpenException - thrown in case the open operation caused problems.public static HttpRestServer open(String aSecureSocketProtocol, org.refcodes.security.KeyStoreDescriptor aStoreDescriptor, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aSecureSocketProtocol - The secure socket protocolaStoreDescriptor - The store descriptor describing your
KeyStore required by HTTP.aPort - The portaMaxConnections - The max connectionsHttpRestServerorg.refcodes.component.OpenException - 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 locatorHttpRestServerpublic static HttpRestServer withRealm(String aRealm)
aRealm - The realmHttpRestServerCopyright © 2018. All rights reserved.