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(File aKeyStoreFile,
String aKeyStorePassword,
Integer aPort)
|
static HttpRestServer |
open(File aKeyStoreFile,
String aKeyStorePassword,
Integer aPort,
int aMaxConnections)
|
static HttpRestServer |
open(File aKeyStoreFile,
String aKeyStorePassword,
String aKeyPassword,
Integer aPort)
|
static HttpRestServer |
open(File aKeyStoreFile,
String aKeyStorePassword,
String aKeyPassword,
Integer aPort,
int aMaxConnections)
|
static HttpRestServer |
open(int aPort)
See
ConnectionOpenable.open(Object) |
static HttpRestServer |
open(int aPort,
int aMaxConnections)
|
static HttpRestServer |
open(String aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStorePassword,
Integer aPort)
|
static HttpRestServer |
open(String aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStorePassword,
Integer aPort,
int aMaxConnections)
|
static HttpRestServer |
open(String aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStoreType,
String aKeyStorePassword,
String aKeyPassword,
Integer aPort)
|
static HttpRestServer |
open(String aSecureSocketProtocol,
File aKeyStoreFile,
String aKeyStoreType,
String aKeyStorePassword,
String aKeyPassword,
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 withBaseLocator(String aBaseLocator)
aBaseLocator
- The base locatorHttpRestServer
public static HttpRestServer withRealm(String aRealm)
aRealm
- The realmHttpRestServer
public static HttpRestServer open(int aPort) throws org.refcodes.component.OpenException
ConnectionOpenable.open(Object)
aPort
- The portHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(int aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aPort
- The portaMaxConnections
- The max connectionsHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(String aSecureSocketProtocol, File aKeyStoreFile, String aKeyStoreType, String aKeyStorePassword, String aKeyPassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aSecureSocketProtocol
- The secure socket protocolaKeyStoreFile
- The key store fileaKeyStoreType
- The key store typeaKeyStorePassword
- The key store passwordaKeyPassword
- The key passwordaPort
- The portaMaxConnections
- The max connectionsHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(String aSecureSocketProtocol, File aKeyStoreFile, String aKeyStoreType, String aKeyStorePassword, String aKeyPassword, Integer aPort) throws org.refcodes.component.OpenException
aSecureSocketProtocol
- The secure socket protocolaKeyStoreFile
- The key store fileaKeyStoreType
- The key store typeaKeyStorePassword
- The key store passwordaKeyPassword
- The key passwordaPort
- The portHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(String aSecureSocketProtocol, File aKeyStoreFile, String aKeyStorePassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aSecureSocketProtocol
- The secure socket protocolaKeyStoreFile
- The key store fileaKeyStorePassword
- The key store passwordaPort
- The portaMaxConnections
- The max connectionsHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(String aSecureSocketProtocol, File aKeyStoreFile, String aKeyStorePassword, Integer aPort) throws org.refcodes.component.OpenException
aSecureSocketProtocol
- The secure socket protocolaKeyStoreFile
- The key store fileaKeyStorePassword
- The key store passwordaPort
- The portHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(File aKeyStoreFile, String aKeyStorePassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aKeyStoreFile
- The key store fileaKeyStorePassword
- The key store passwordaPort
- The portaMaxConnections
- The max connectionsHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(File aKeyStoreFile, String aKeyStorePassword, Integer aPort) throws org.refcodes.component.OpenException
aKeyStoreFile
- The key store fileaKeyStorePassword
- The key store passwordaPort
- The portHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(File aKeyStoreFile, String aKeyStorePassword, String aKeyPassword, Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aKeyStoreFile
- The key store fileaKeyStorePassword
- The key store passwordaKeyPassword
- The key passwordaPort
- The portaMaxConnections
- The max connectionsHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic static HttpRestServer open(File aKeyStoreFile, String aKeyStorePassword, String aKeyPassword, Integer aPort) throws org.refcodes.component.OpenException
aKeyStoreFile
- The key store fileaKeyStorePassword
- The key store passwordaKeyPassword
- The key passwordaPort
- The portHttpRestServer
org.refcodes.component.OpenException
- the open exceptionpublic 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 RestEndpointBuilder onRequest(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 onGet(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern
- The locator patternaRequestObserver
- The request observerRestEndpointBuilder
public static RestEndpointBuilder onPut(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 onDelete(String aLocatorPattern, RestRequestObserver aRequestObserver)
aLocatorPattern
- The locator patternaRequestObserver
- The request observerRestEndpointBuilder
public static HttpRestServer onBasicAuthRequest(org.refcodes.net.BasicAuthObserver aObserver)
BasicAuthObservable.onBasicAuthRequest(BasicAuthObserver)
aObserver
- The observerHttpRestServer
public static boolean unsubscribeObserver(RestEndpoint aEndpoint)
Observable.unsubscribeObserver(Object)
aEndpoint
- The endpointCopyright © 2017. All rights reserved.