Class Current


  • public class Current
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.URI buildFullLRAUrl​(java.lang.String baseURI, java.net.URI parentId)  
      static void clearContext​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers)  
      static java.util.List<java.lang.Object> getContexts()  
      static java.lang.String getFirstParent​(java.net.URI parent)  
      static <T> T getLast​(java.util.List<T> objects)  
      static java.lang.Object getState​(java.lang.String key)  
      static java.net.URI peek()  
      static java.net.URI pop()  
      static boolean pop​(java.net.URI lra)  
      static void popAll()  
      static void push​(java.net.URI lraId)
      push the current context onto the stack of contexts for this thread
      static java.lang.Object putState​(java.lang.String key, java.lang.Object value)  
      static void updateLRAContext​(java.net.URI lraId, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers)  
      static void updateLRAContext​(javax.ws.rs.client.ClientRequestContext context)
      If there is an LRA context on the calling thread then make it available as a header on outgoing JAX-RS invocations
      static void updateLRAContext​(javax.ws.rs.container.ContainerResponseContext responseContext)
      If there is an LRA context on the calling thread then add it to the provided headers
      java.lang.Object updateState​(java.lang.String key, java.lang.Object value)  
      • Methods inherited from class java.lang.Object

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

      • putState

        public static java.lang.Object putState​(java.lang.String key,
                                                java.lang.Object value)
      • getState

        public static java.lang.Object getState​(java.lang.String key)
      • buildFullLRAUrl

        public static java.net.URI buildFullLRAUrl​(java.lang.String baseURI,
                                                   java.net.URI parentId)
                                            throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • getFirstParent

        public static java.lang.String getFirstParent​(java.net.URI parent)
                                               throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
      • updateState

        public java.lang.Object updateState​(java.lang.String key,
                                            java.lang.Object value)
      • peek

        public static java.net.URI peek()
      • pop

        public static java.net.URI pop()
      • pop

        public static boolean pop​(java.net.URI lra)
      • push

        public static void push​(java.net.URI lraId)
        push the current context onto the stack of contexts for this thread
        Parameters:
        lraId - id of context to push (must not be null)
      • getContexts

        public static java.util.List<java.lang.Object> getContexts()
      • updateLRAContext

        public static void updateLRAContext​(javax.ws.rs.container.ContainerResponseContext responseContext)
        If there is an LRA context on the calling thread then add it to the provided headers
        Parameters:
        responseContext - the header map to add the KRA context to
      • updateLRAContext

        public static void updateLRAContext​(java.net.URI lraId,
                                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers)
      • updateLRAContext

        public static void updateLRAContext​(javax.ws.rs.client.ClientRequestContext context)
        If there is an LRA context on the calling thread then make it available as a header on outgoing JAX-RS invocations
        Parameters:
        context - the context for the JAX-RS request
      • popAll

        public static void popAll()
      • clearContext

        public static void clearContext​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers)
      • getLast

        public static <T> T getLast​(java.util.List<T> objects)