Class ContextImpl

  • All Implemented Interfaces:
    ViewCapable, Context

    public class ContextImpl
    extends Object
    implements Context, ViewCapable
    Base implementation of org.glassfish.diagnostics.context.Context. Delegates to a org.glassfish.contextpropagation.View
    • Method Detail

      • getLocation

        public Location getLocation()
        Description copied from interface: Context
        Get the Location of this Context.
        Specified by:
        getLocation in interface Context
      • put

        public <T> T put​(String name,
                         String value,
                         boolean propagates)
        Description copied from interface: Context
        Put a named value in this Context.
        Specified by:
        put in interface Context
        Parameters:
        name - The name of the item of data.
        value - The value of item of data.
        propagates - If true then the data item will be propagated.
        Returns:
        The previous value associated with this name (if there is one).
      • put

        public <T> T put​(String name,
                         Number value,
                         boolean propagates)
        Description copied from interface: Context
        Put a named value in this Context.
        Specified by:
        put in interface Context
        Parameters:
        name - The name of the item of data.
        value - The value of item of data.
        propagates - If true then the data item will be propagated.
        Returns:
        The previous value associated with this name (if there is one).
      • get

        public <T> T get​(String name)
        Description copied from interface: Context
        Get a named value from this Context.
        Specified by:
        get in interface Context
        Parameters:
        name - The name of the item of data.
        Returns:
        The value associated with this name if there is one, otherwise null.
      • remove

        public <T> T remove​(String name)
        Description copied from interface: Context
        Remove the named value from this Context.
        Specified by:
        remove in interface Context
        Parameters:
        name - The name of the item of data.
        Returns:
        The value being removed if there is one, otherwise null.