Class SessionsTask

  • All Implemented Interfaces:
    java.lang.Cloneable

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

      • idle

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

      • SessionsTask

        public SessionsTask()
        Default constructor.
    • Method Detail

      • getIdle

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

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

        public java.lang.StringBuilder createQueryString​(java.lang.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