org.objectweb.jonas.ant.cluster
Class ClusterTasks

java.lang.Object
  extended by org.objectweb.jonas.ant.jonasbase.Tasks
      extended by org.objectweb.jonas.ant.cluster.ClusterTasks
Direct Known Subclasses:
CarolCluster, ClusterDaemon, Common, DbCluster, DbmCluster, DiscoveryCluster, EjbLevel, HaCluster, JdbcRaCluster, JmsCluster, LibCluster, MailCluster, Script, ServicesCluster, WebContainerCluster, WebLevel, WsdlPublishCluster

public abstract class ClusterTasks
extends Tasks

Defines a common cluster task

Author:
Benoit Pelletier

Field Summary
protected static java.lang.String ARCH_BOTH_WEB_EJB
          Archictecture of the JOnAS's instances : contain both Web level and Ejb level
protected static java.lang.String ARCH_SEPARATED_WEB_EJB
          Archictecture of the JOnAS's instances : separate Web level and Ejb level
 
Constructor Summary
ClusterTasks()
          Constructor
 
Method Summary
 void addClusterTask(ClusterTasks ct)
          Add a task to the list of defined tasks
abstract  void generatesTasks()
          Abstract generatesTasks()
 java.lang.String getArch()
          Get architecture
 java.util.List getClusterTasks()
           
static java.lang.String getDestDir(java.lang.String destDirPrefix, int i)
          Build dest dir with an index
 java.lang.String getDestDirPrefix()
          Gets the prefix of the destination directory
 int getDestDirSuffixIndFirst()
          Gets the first index of the destDir suffix
 int getDestDirSuffixIndLast()
          Gets the last index of the destDir suffix
 java.lang.String getLogInfo()
          Gets logger info (to be displayed)
 org.apache.tools.ant.Task getRootTask()
          Get root Task
 void log(java.lang.String msg)
          Logging
 void setArch(java.lang.String arch)
          Set architecture
 void setDestDirPrefix(java.lang.String destDirPrefix)
          Set directory prefix
 void setDestDirSuffixIndFirst(int destDirSuffixIndFirst)
           
 void setDestDirSuffixIndLast(int destDirSuffixIndLast)
           
 void setLogInfo(java.lang.String logInfo)
          Set the info to be displayed by the logger
 void setRootTask(org.apache.tools.ant.Task rootTask)
          Set root task
 
Methods inherited from class org.objectweb.jonas.ant.jonasbase.Tasks
addTask, addTasks, addTasks, getTasks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARCH_BOTH_WEB_EJB

protected static final java.lang.String ARCH_BOTH_WEB_EJB
Archictecture of the JOnAS's instances : contain both Web level and Ejb level

See Also:
Constant Field Values

ARCH_SEPARATED_WEB_EJB

protected static final java.lang.String ARCH_SEPARATED_WEB_EJB
Archictecture of the JOnAS's instances : separate Web level and Ejb level

See Also:
Constant Field Values
Constructor Detail

ClusterTasks

public ClusterTasks()
Constructor

Method Detail

setDestDirPrefix

public void setDestDirPrefix(java.lang.String destDirPrefix)
Set directory prefix

Parameters:
destDirPrefix - The destDirPrefix to set.

getDestDirPrefix

public java.lang.String getDestDirPrefix()
Gets the prefix of the destination directory

Returns:
the prefix of the destination directory

setDestDirSuffixIndFirst

public void setDestDirSuffixIndFirst(int destDirSuffixIndFirst)
Parameters:
destDirSuffixIndFirst - The destDirSuffixIndFirst to set.

getDestDirSuffixIndFirst

public int getDestDirSuffixIndFirst()
Gets the first index of the destDir suffix

Returns:
the first index of the destDir suffix

setDestDirSuffixIndLast

public void setDestDirSuffixIndLast(int destDirSuffixIndLast)
Parameters:
destDirSuffixIndLast - The destDirSuffixIndLast to set.

getDestDirSuffixIndLast

public int getDestDirSuffixIndLast()
Gets the last index of the destDir suffix

Returns:
the last index of the destDir suffix

getLogInfo

public java.lang.String getLogInfo()
Gets logger info (to be displayed)

Returns:
logger info
See Also:
BaseTaskItf.getLogInfo()

setLogInfo

public void setLogInfo(java.lang.String logInfo)
Set the info to be displayed by the logger

Parameters:
logInfo - information to be displayed
See Also:
BaseTaskItf.setLogInfo(java.lang.String)

getDestDir

public static java.lang.String getDestDir(java.lang.String destDirPrefix,
                                          int i)
Build dest dir with an index

Parameters:
destDirPrefix - destination directory prefix
i - index
Returns:
destination directory

setArch

public void setArch(java.lang.String arch)
Set architecture

Parameters:
arch - the architecture

getArch

public java.lang.String getArch()
Get architecture

Returns:
architecture

setRootTask

public void setRootTask(org.apache.tools.ant.Task rootTask)
Set root task

Parameters:
rootTask - root task

getRootTask

public org.apache.tools.ant.Task getRootTask()
Get root Task

Returns:
rootTask root task

addClusterTask

public void addClusterTask(ClusterTasks ct)
Add a task to the list of defined tasks

Parameters:
ct - task to add

getClusterTasks

public java.util.List getClusterTasks()
Returns:
a list of all tasks to do

log

public void log(java.lang.String msg)
Logging

Parameters:
msg - message to log

generatesTasks

public abstract void generatesTasks()
Abstract generatesTasks()