org.refcodes.net.BaseLocatorAccessor, org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<RestServer>, org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator, org.refcodes.net.BaseLocatorAccessor.BaseLocatorProperty, HttpExceptionHandlerAccessor, HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<RestServer>, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty, HttpExceptionHandlingAccessor, HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<RestServer>, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty, org.refcodes.net.MediaTypeFactoryLookup, org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup, org.refcodes.observer.Observable<RestEndpoint>, org.refcodes.observer.Observers<RestEndpoint,RestServer>, org.refcodes.net.RealmAccessor, org.refcodes.net.RealmAccessor.RealmBuilder<RestServer>, org.refcodes.net.RealmAccessor.RealmMutator, org.refcodes.net.RealmAccessor.RealmProperty, org.refcodes.runtime.RequestCorrelation<RestServer>, org.refcodes.runtime.SessionCorrelation<RestServer>HttpRegistryRestServer<DESC,B>, HttpRestServer, LoopbackRestServerAbstractHttpRegistryRestServerDecorator, AbstractHttpRestServerDecorator, AbstractRestServer, HttpRestServerImpl, HttpRestServerSingleton, LoopbackRestServerImpl, LoopbackRestServerSingletonpublic interface RestServer extends HttpExceptionHandlerAccessor.HttpExceptionHandlerProperty, HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<RestServer>, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty, HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<RestServer>, org.refcodes.observer.Observable<RestEndpoint>, org.refcodes.observer.Observers<RestEndpoint,RestServer>, org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup, org.refcodes.net.RealmAccessor.RealmProperty, org.refcodes.net.RealmAccessor.RealmBuilder<RestServer>, org.refcodes.net.BaseLocatorAccessor.BaseLocatorProperty, org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<RestServer>, org.refcodes.runtime.RequestCorrelation<RestServer>, org.refcodes.runtime.SessionCorrelation<RestServer>
RestServer acts as the target for clients issuing REST
requests. RestEndpointBuilder instances, most easily being created
with the onRequest(HttpMethod, String, RestRequestObserver) method
(or the like), are registered as listeners to the RestServer (
HttpRestServer). The RestServer
(HttpRestServer) fires RestRequestEvent events to the
RestRequestObservers of an RestEndpoint dedicated to an
according locator (pattern) for a specific HttpMethod.org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<B extends org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<B>>, org.refcodes.net.BaseLocatorAccessor.BaseLocatorMutator, org.refcodes.net.BaseLocatorAccessor.BaseLocatorPropertyHttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B extends HttpExceptionHandlerAccessor.HttpExceptionHandlerBuilder<B>>, HttpExceptionHandlerAccessor.HttpExceptionHandlerMutator, HttpExceptionHandlerAccessor.HttpExceptionHandlerPropertyHttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B extends HttpExceptionHandlingAccessor.HttpExceptionHandlingBuilder<B>>, HttpExceptionHandlingAccessor.HttpExceptionHandlingMutator, HttpExceptionHandlingAccessor.HttpExceptionHandlingProperty| Modifier and Type | Method | Description |
|---|---|---|
default RestEndpointBuilder |
onDelete(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
Even more convenient: Everything done here can also be done using
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming DELETE methods. |
default RestEndpointBuilder |
onGet(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
Even more convenient: Everything done here can also be done using
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming GET methods. |
default RestEndpointBuilder |
onPost(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
Even more convenient: Everything done here can also be done using
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming POST methods. |
default RestEndpointBuilder |
onPut(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
Even more convenient: Everything done here can also be done using
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming PUT methods. |
default RestEndpointBuilder |
onRequest(String aLocatorPattern,
RestRequestObserver aRequestObserver) |
Registers a pre-configured
RestEndpoint, triggerd by any HTTP
method, and returns its instance. |
default RestEndpointBuilder |
onRequest(org.refcodes.net.HttpMethod aHttpMethod,
String aLocatorPattern,
RestRequestObserver aRequestObserver) |
Registers a pre-configured
RestEndpoint with the least required
attributes and returns its instance. |
default boolean |
onRequest(RestEndpoint aRestEndpoint) |
For the sake of unified naming, this method just delegates to
Observable.subscribeObserver(Object). |
default RestServer |
withBaseLocator(String aBaseLocator) |
|
default RestServer |
withDisableObservers() |
|
default RestServer |
withDisableRequestCorrelation() |
|
default RestServer |
withDisableSessionCorrelation() |
|
default RestServer |
withEnableObservers() |
|
default RestServer |
withEnableRequestCorrelation() |
|
default RestServer |
withEnableSessionCorrelation() |
|
default RestServer |
withObserversActive(boolean isActive) |
|
default RestServer |
withRealm(String aRealm) |
|
default RestServer |
withRequestCorrelation(boolean hasRequestCorrelation) |
|
default RestServer |
withSessionCorrelation(boolean hasSessionCorrelation) |
setBaseLocatorgetHttpExceptionHandlerwithHttpExceptionHandler, withOnHttpExceptiononHttpException, setHttpExceptionHandlergetHttpExceptionHandlingwithHttpExceptionHandlingsetHttpExceptionHandlinggetFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactoryaddMediaTypeFactoryhasObserverSubscription, subscribeObserver, unsubscribeObserverdisableObservers, enableObservers, isObserversActive, observers, setObserversActivedefault RestServer withObserversActive(boolean isActive)
withObserversActive in interface org.refcodes.observer.Observers<RestEndpoint,RestServer>default RestServer withEnableObservers()
withEnableObservers in interface org.refcodes.observer.Observers<RestEndpoint,RestServer>default RestServer withDisableObservers()
withDisableObservers in interface org.refcodes.observer.Observers<RestEndpoint,RestServer>default RestServer withSessionCorrelation(boolean hasSessionCorrelation)
withSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<RestServer>default RestServer withEnableSessionCorrelation()
withEnableSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<RestServer>default RestServer withDisableSessionCorrelation()
withDisableSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<RestServer>default RestServer withRequestCorrelation(boolean hasRequestCorrelation)
withRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<RestServer>default RestServer withEnableRequestCorrelation()
withEnableRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<RestServer>default RestServer withDisableRequestCorrelation()
withDisableRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<RestServer>default boolean onRequest(RestEndpoint aRestEndpoint)
Observable.subscribeObserver(Object).aRestEndpoint - the rest endpointdefault RestServer withBaseLocator(String aBaseLocator)
withBaseLocator in interface org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<RestServer>default RestServer withRealm(String aRealm)
withRealm in interface org.refcodes.net.RealmAccessor.RealmBuilder<RestServer>default RestEndpointBuilder onRequest(String aLocatorPattern, RestRequestObserver aRequestObserver)
RestEndpoint, triggerd by any HTTP
method, and returns its instance. To unsubscribe via
Observable.unsubscribeObserver(Object), use the returned instance.
Attention: Invoke Openable.open() to activate this
endpoint!aLocatorPattern - The local Locator-Pattern to which this
RestEndpoint is bound.aRequestObserver - The listener processing a request targeted at
this RestEndpoint.RestEndpoint which acts as handle to
unsubscribe the RestEndpoint via
Observable.unsubscribeObserver(Object).default RestEndpointBuilder onRequest(org.refcodes.net.HttpMethod aHttpMethod, String aLocatorPattern, RestRequestObserver aRequestObserver)
RestEndpoint with the least required
attributes and returns its instance. To unsubscribe via
Observable.unsubscribeObserver(Object), use the returned instance.
Attention: Invoke Openable.open() to activate this
endpoint!aHttpMethod - The HTTP-Method to which this RestEndpoint is
bound. A value of null means that any HTTP-Method may
trigger this RestEndpoint.aLocatorPattern - The local Locator-Pattern to which this
RestEndpoint is bound. A value of null means
that any locator may trigger this RestEndpoint.aRequestObserver - The listener processing a request targeted at
this RestEndpoint.RestEndpoint which acts as handle to
unsubscribe the RestEndpoint via
Observable.unsubscribeObserver(Object).default RestEndpointBuilder onGet(String aLocatorPattern, RestRequestObserver aRequestObserver)
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming GET methods.
Attention: Invoke Openable.open() to activate this
endpoint!aLocatorPattern - The local Locator-Pattern to which this
RestEndpoint is bound.aRequestObserver - The listener processing a request targeted at
this RestEndpoint.RestEndpoint which acts as handle to
unsubscribe the RestEndpoint via
Observable.unsubscribeObserver(Object).default RestEndpointBuilder onPut(String aLocatorPattern, RestRequestObserver aRequestObserver)
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming PUT methods.
Attention: Invoke Openable.open() to activate this
endpoint!aLocatorPattern - The local Locator-Pattern to which this
RestEndpoint is bound.aRequestObserver - The listener processing a request targeted at
this RestEndpoint.RestEndpoint which acts as handle to
unsubscribe the RestEndpoint via
Observable.unsubscribeObserver(Object).default RestEndpointBuilder onPost(String aLocatorPattern, RestRequestObserver aRequestObserver)
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming POST methods.
Attention: Invoke Openable.open() to activate this
endpoint!aLocatorPattern - The local Locator-Pattern to which this
RestEndpoint is bound.aRequestObserver - The listener processing a request targeted at
this RestEndpoint.RestEndpoint which acts as handle to
unsubscribe the RestEndpoint via
Observable.unsubscribeObserver(Object).default RestEndpointBuilder onDelete(String aLocatorPattern, RestRequestObserver aRequestObserver)
onRequest(HttpMethod, String, RestRequestObserver):
Registers a RestRequestObserver with the given Locator-Pattern to
incoming DELETE methods.
Attention: Invoke Openable.open() to activate this
endpoint!aLocatorPattern - The local Locator-Pattern to which this
RestEndpoint is bound.aRequestObserver - The listener processing a request targeted at
this RestEndpoint.RestEndpoint which acts as handle to
unsubscribe the RestEndpoint via
Observable.unsubscribeObserver(Object).Copyright © 2018. All rights reserved.