Interface RestServer

    • Method Detail

      • withObserversActive

        default RestServer withObserversActive​(boolean isActive)
        Specified by:
        withObserversActive in interface org.refcodes.observer.Observers<RestEndpoint,RestServer>
      • withEnableObservers

        default RestServer withEnableObservers​()
        Specified by:
        withEnableObservers in interface org.refcodes.observer.Observers<RestEndpoint,RestServer>
      • withDisableObservers

        default RestServer withDisableObservers​()
        Specified by:
        withDisableObservers in interface org.refcodes.observer.Observers<RestEndpoint,RestServer>
      • withSessionCorrelation

        default RestServer withSessionCorrelation​(boolean hasSessionCorrelation)
        Specified by:
        withSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<RestServer>
      • withEnableSessionCorrelation

        default RestServer withEnableSessionCorrelation​()
        Specified by:
        withEnableSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<RestServer>
      • withDisableSessionCorrelation

        default RestServer withDisableSessionCorrelation​()
        Specified by:
        withDisableSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<RestServer>
      • withRequestCorrelation

        default RestServer withRequestCorrelation​(boolean hasRequestCorrelation)
        Specified by:
        withRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<RestServer>
      • withEnableRequestCorrelation

        default RestServer withEnableRequestCorrelation​()
        Specified by:
        withEnableRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<RestServer>
      • withDisableRequestCorrelation

        default RestServer withDisableRequestCorrelation​()
        Specified by:
        withDisableRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<RestServer>
      • onRequest

        default boolean onRequest​(RestEndpoint aRestEndpoint)
        For the sake of unified naming, this method just delegates to Observable.subscribeObserver(Object).
        Parameters:
        aRestEndpoint - the rest endpoint
        Returns:
        true, if successful
      • withBaseLocator

        default RestServer withBaseLocator​(java.lang.String aBaseLocator)
        Specified by:
        withBaseLocator in interface org.refcodes.net.BaseLocatorAccessor.BaseLocatorBuilder<RestServer>
      • withRealm

        default RestServer withRealm​(java.lang.String aRealm)
        Specified by:
        withRealm in interface org.refcodes.net.RealmAccessor.RealmBuilder<RestServer>
      • onRequest

        default RestEndpointBuilder onRequest​(java.lang.String aLocatorPathPattern,
                                              RestRequestObserver aRequestObserver)
        Registers a pre-configured 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!
        Parameters:
        aLocatorPathPattern - The local locator (regular expression) pattern to which this RestEndpoint is bound.
        aRequestObserver - The listener processing a request targeted at this RestEndpoint.
        Returns:
        The pre-configured RestEndpoint which acts as handle to unsubscribe the RestEndpoint via Observable.unsubscribeObserver(Object).
      • onRequest

        default RestEndpointBuilder onRequest​(java.util.regex.Pattern aLocatorRegExp,
                                              RestRequestObserver aRequestObserver)
        Registers a pre-configured 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!
        Parameters:
        aLocatorRegExp - The local locator (regular expression) pattern to which this RestEndpoint is bound.
        aRequestObserver - The listener processing a request targeted at this RestEndpoint.
        Returns:
        The pre-configured RestEndpoint which acts as handle to unsubscribe the RestEndpoint via Observable.unsubscribeObserver(Object).
      • onRequest

        default RestEndpointBuilder onRequest​(org.refcodes.net.HttpMethod aHttpMethod,
                                              java.lang.String aLocatorPathPattern,
                                              RestRequestObserver aRequestObserver)
        Registers a pre-configured 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!
        Parameters:
        aHttpMethod - The HTTP-Method to which this RestEndpoint is bound. A value of null means that any HTTP-Method may trigger this RestEndpoint.
        aLocatorPathPattern - 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.
        Returns:
        The pre-configured RestEndpoint which acts as handle to unsubscribe the RestEndpoint via Observable.unsubscribeObserver(Object).
      • onRequest

        default RestEndpointBuilder onRequest​(org.refcodes.net.HttpMethod aHttpMethod,
                                              java.util.regex.Pattern aLocatorRegExp,
                                              RestRequestObserver aRequestObserver)
        Registers a pre-configured 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!
        Parameters:
        aHttpMethod - The HTTP-Method to which this RestEndpoint is bound. A value of null means that any HTTP-Method may trigger this RestEndpoint.
        aLocatorRegExp - The local locator (regular expression) 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.
        Returns:
        The pre-configured RestEndpoint which acts as handle to unsubscribe the RestEndpoint via Observable.unsubscribeObserver(Object).