Class AbstractHostPortTask

  • All Implemented Interfaces:
    Cloneable
    Direct Known Subclasses:
    Deploy, Ping, Undeploy

    public abstract class AbstractHostPortTask
    extends org.apache.tools.ant.Task
    An abstract host/port task
    Author:
    Jesper Pedersen
    • Field Summary

      • Fields inherited from class org.apache.tools.ant.Task

        target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • Constructor Detail

      • AbstractHostPortTask

        public AbstractHostPortTask()
        Constructor
    • Method Detail

      • getHost

        public String getHost()
        Get the host
        Returns:
        The value
      • setHost

        public void setHost​(String v)
        Set the host
        Parameters:
        v - The value
      • getPort

        public int getPort()
        Get the port
        Returns:
        The value
      • setPort

        public void setPort​(int v)
        Set the port
        Parameters:
        v - The value
      • isLocal

        protected boolean isLocal()
        Is local
        Returns:
        True if local; otherwise false
      • isCommandAvailable

        protected boolean isCommandAvailable​(String command)
                                      throws Throwable
        Is a command available
        Parameters:
        command - The command name
        Returns:
        True if available; otherwise false
        Throws:
        Throwable - If an error occurs
      • executeCommand

        protected Serializable executeCommand​(String command)
                                       throws Throwable
        Execute command
        Parameters:
        command - The command
        Returns:
        The result
        Throws:
        Throwable - If an error occurs
      • executeCommand

        protected Serializable executeCommand​(String command,
                                              Serializable[] arguments)
                                       throws Throwable
        Execute command
        Parameters:
        command - The command
        arguments - The arguments
        Returns:
        The result
        Throws:
        Throwable - If an error occurs
      • execute

        public abstract void execute()
                              throws org.apache.tools.ant.BuildException
        Execute
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException - If the build fails