Class ServiceTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.commons.modeler.ant.ServiceTask
All Implemented Interfaces:
Cloneable

public class ServiceTask extends org.apache.tools.ant.Task
Group a set of mbeans in a service, and perform actions on it.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) String
     
    private static org.apache.commons.logging.Log
     
    (package private) List
     
    (package private) String
     

    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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
     
    void
    setAction(String action)
    Set action to be executed on the mbean collection.
    void
    Perform the action on a previously declared service

    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
  • Field Details

    • log

      private static org.apache.commons.logging.Log log
    • mbeans

      List mbeans
    • action

      String action
    • refId

      String refId
  • Constructor Details

    • ServiceTask

      public ServiceTask()
  • Method Details

    • addMbean

      public void addMbean(MLETTask mbean)
    • getMbeans

      public List getMbeans()
    • setAction

      public void setAction(String action)
      Set action to be executed on the mbean collection. If null - we'll perform init and start.
      Parameters:
      action -
    • setRefId

      public void setRefId(String ref)
      Perform the action on a previously declared service
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Overrides:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException