Class Location

  • All Implemented Interfaces:
    ContextLifecycle, ViewCapable

    public class Location
    extends Object
    implements ViewCapable, ContextLifecycle
    The Location class provides information about the current location of the request relative to the point where it originally entered the system. As the request hops from one region of the system to the next (from thread to thread or from process to process) the Location is updated to reflect the changes in location.
    • Constructor Detail

      • Location

        protected Location​(View aView)
    • Method Detail

      • getOrigin

        public String getOrigin()
        Returns:
        The original unique identifier for the request. This identifier is generated by the process where the request was originally submitted.
      • getLocationId

        public String getLocationId()
        Returns:
        a unique String illustrating the shortest path between the original location where the request entered the system and current location.
      • contextChanged

        public void contextChanged​(Object replacementContext)
        Description copied from interface: ContextLifecycle
        Informs the receiver that a new context is taking its place in the ContextMap
        Specified by:
        contextChanged in interface ContextLifecycle
        Parameters:
        replacementContext - The replacement context.
      • contextAdded

        public void contextAdded()
        Description copied from interface: ContextLifecycle
        Informs this Context that it was added to the ContextMap. This notification is particularly valuable when this Context was automatically added to a ContextMap during deserialization.
        Specified by:
        contextAdded in interface ContextLifecycle
      • contextToPropagate

        public ViewCapable contextToPropagate()
        Description copied from interface: ContextLifecycle
        Sent to a Context just before it is propagated.
        Specified by:
        contextToPropagate in interface ContextLifecycle
        Returns:
        The context to propagate. It could be this, another context, or null if the receiver wants to prevent this context propagation.