public class HttpRestServerSugar extends Object
import static org.refcodes.rest.HttpRestServerSugar.*;
Constructor and Description |
---|
HttpRestServerSugar() |
Modifier and Type | Method and 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(org.refcodes.net.HttpMethod aHttpMethod,
String aLocatorPattern,
RestRequestObserver aRequestObserver)
|
static RestEndpointBuilder |
onRequest(String aLocatorPattern,
RestRequestObserver aRequestObserver)
|
static HttpRestServer |
open(org.refcodes.net.HttpServerContext aCtx)
See
ConnectionOpenable.open(Object) |
static HttpRestServer |
open(int aPort)
|
static HttpRestServer |
open(int 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(String aSecureSocketProtocol,
org.refcodes.security.KeyStoreDescriptor aStoreDescriptor,
Integer aPort)
|
static HttpRestServer |
open(String aSecureSocketProtocol,
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()
HttpRestServer
org.refcodes.component.CloseException
- 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.net.BasicAuthObserver aObserver)
BasicAuthObservable.onBasicAuthRequest(BasicAuthObserver)
aObserver
- The observerHttpRestServer
public static RestEndpointBuilder onDelete(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern
- The locator patternaRequestObserver
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onGet(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern
- The locator patternaRequestObserver
- The request observerRestEndpointBuilder
public 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 observerRestEndpointBuilder
public static RestEndpointBuilder onRequest(org.refcodes.net.HttpMethod aHttpMethod, String aLocatorPattern, RestRequestObserver aRequestObserver)
aHttpMethod
- The HTTP-MethodaLocatorPattern
- The locator patternaRequestObserver
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onRequest(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern
- The locator patternaRequestObserver
- The request observerRestEndpointBuilder
public 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.HttpRestServer
org.refcodes.component.OpenException
- thrown in case the open operation caused problems.public static HttpRestServer open(int aPort) throws org.refcodes.component.OpenException
aPort
- The portHttpRestServer
org.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 connectionsHttpRestServer
org.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 portHttpRestServer
org.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 connectionsHttpRestServer
org.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 portHttpRestServer
org.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 connectionsHttpRestServer
org.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 locatorHttpRestServer
public static HttpRestServer withRealm(String aRealm)
aRealm
- The realmHttpRestServer
Copyright © 2018. All rights reserved.