Class Endpoint


  • public class Endpoint
    extends java.lang.Object
    Class that can be used to set the HTTP endpoint name of a response.
    • Constructor Summary

      Constructors 
      Constructor Description
      Endpoint()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String currentName()
      Return the current HTTP endpoint name.
      static <T> T withName​(java.lang.String endpointName, scala.Function0<T> f)
      Used to wrap response creation with an HTTP endpoint name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Endpoint

        public Endpoint()
    • Method Detail

      • currentName

        public static java.lang.String currentName()
        Return the current HTTP endpoint name.

        Returns:
        the current HTTP enpoint name or "" if none is set
      • withName

        public static <T> T withName​(java.lang.String endpointName,
                                     scala.Function0<T> f)
        Used to wrap response creation with an HTTP endpoint name.

        Type Parameters:
        T - return type of the function
        Parameters:
        endpointName - the HTTP endpoint name
        f - the function to perform
        Returns:
        the result of evaluating f