Class SessionsTask

All Implemented Interfaces:
Cloneable

public class SessionsTask extends AbstractCatalinaCommandTask
Ant task that implements the /sessions command supported by the Tomcat manager application.
  • Field Details

    • idle

      protected String idle
      Minimum idle time in minutes for sessions to be included in the response.
  • Constructor Details

    • SessionsTask

      public SessionsTask()
      Default constructor.
  • Method Details

    • getIdle

      public String getIdle()
      Returns the minimum idle time in minutes for sessions to be included.
      Returns:
      the minimum idle time
    • setIdle

      public void setIdle(String idle)
      Sets the minimum idle time in minutes for sessions to be included.
      Parameters:
      idle - the minimum idle time
    • createQueryString

      public StringBuilder createQueryString(String command)
      Appends the idle parameter to the query string if both path and idle are set.
      Overrides:
      createQueryString in class AbstractCatalinaCommandTask
      Parameters:
      command - the command being executed
      Returns:
      the query string buffer
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Description copied from class: AbstractCatalinaTask
      Execute the specified command. This logic only performs the common attribute validation required by all subclasses; it does not perform any functional logic directly.
      Overrides:
      execute in class AbstractCatalinaTask
      Throws:
      org.apache.tools.ant.BuildException - if a validation error occurs