Class ContextSession

java.lang.Object
org.apache.juneau.ContextSession
Direct Known Subclasses:
BeanSession, RestOpSession, RestSession

public abstract class ContextSession extends Object
A one-time-use non-thread-safe object that's meant to be used once and then thrown away.
Notes:
  • This class is not typically thread safe.
See Also:
  • Constructor Details

  • Method Details

    • getSessionProperties

      public final JsonMap getSessionProperties()
      Returns the session properties on this session.
      Returns:
      The session properties on this session. Never null.
    • getContext

      public Context getContext()
      Returns the context that created this session.
      Returns:
      The context that created this session.
    • addWarning

      public void addWarning(String msg, Object... args)
      Logs a warning message.
      Parameters:
      msg - The warning message.
      args - Optional MessageFormat-style arguments.
    • getWarnings

      public final List<String> getWarnings()
      Returns the warnings that occurred in this session.
      Returns:
      The warnings that occurred in this session, or null if no warnings occurred.
    • checkForWarnings

      public void checkForWarnings()
      Throws a BeanRuntimeException if any warnings occurred in this session and debug is enabled.
    • isDebug

      public boolean isDebug()
      Debug mode enabled.
      Returns:
      true if debug mode is enabled.
      See Also:
    • properties

      protected JsonMap properties()
      Returns the properties on this bean as a map for debugging.
      Returns:
      The properties on this bean as a map for debugging.
    • toString

      public String toString()
      Overrides:
      toString in class Object