Class AbstractHostPortTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.jboss.jca.sjc.ant.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 Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Execute
    protected Serializable
    Execute command
    protected Serializable
    executeCommand(String command, Serializable[] arguments)
    Execute command
    Get the host
    int
    Get the port
    protected boolean
    Is a command available
    protected boolean
    Is local
    void
    Set the host
    void
    setPort(int v)
    Set the port

    Methods inherited from class org.apache.tools.ant.Task

    bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractHostPortTask

      public AbstractHostPortTask()
      Constructor
  • Method Details

    • 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