Class Endpoints


  • public final class Endpoints
    extends Object
    Convenience class for creating Handlers from classes that contain annotated methods that handle requests.
    Since:
    13.0.0
    • Method Detail

      • from

        public static org.forgerock.http.Handler from​(Object obj)
        Produce a Handler from the annotated methods on the provided object.

        This method currently only distinguishes requests by their method type. In future this should be extended to support selection by request and response media types, and request path.

        Parameters:
        obj - The object containing annotated methods.
        Returns:
        A new Handler.
      • from

        public static org.forgerock.http.Handler from​(Class<?> cls)
        Convenience method that produces a Handler using the from(Object) method and an object obtained from Guice.
        Parameters:
        cls - The class to use.
        Returns:
        A new Handler.
      • from

        public static org.forgerock.http.Handler from​(com.google.inject.Key key)
        Convenience method that produces a Handler using the from(Object) method and an object obtained from Guice.
        Parameters:
        key - The Guice key to use.
        Returns:
        A new Handler.