org.ow2.jonas.ant.cluster
Class ClusterTasks

java.lang.Object
  extended by org.ow2.jonas.ant.jonasbase.Tasks
      extended by org.ow2.jonas.ant.cluster.ClusterTasks
Direct Known Subclasses:
CarolCluster, ClusterDaemon, CmiCluster, Common, DbCluster, DbmCluster, DeployableCluster, DeploymentCluster, 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 String ARCH_BOTH_WEB_EJB
          Architecture of the JOnAS's instances : contain both Web level and Ejb level.
protected static String ARCH_SEPARATED_WEB_EJB
          Architecture 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().
 String getArch()
          Get architecture.
 List<ClusterTasks> getClusterTasks()
           
static String getDestDir(String destDirPrefix, int i)
          Build dest dir with an index.
 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.
 int getEjbInstNb()
          Get the ejb instances number.
 String getLogInfo()
          Gets logger info (to be displayed).
 org.apache.tools.ant.Task getRootTask()
          Get root Task.
 int getWebInstNb()
          Get the web instances number.
 void log(String msg)
          Logging.
 void setArch(String arch)
          Set architecture.
 void setDestDirPrefix(String destDirPrefix)
          Set directory prefix.
 void setDestDirSuffixIndFirst(int destDirSuffixIndFirst)
           
 void setDestDirSuffixIndLast(int destDirSuffixIndLast)
           
 void setEjbInstNb(int ejbInstNb)
          Set the ejb instances number.
 void setLogInfo(String logInfo)
          Set the info to be displayed by the logger.
 void setRootTask(org.apache.tools.ant.Task rootTask)
          Set root task.
 void setWebInstNb(int webInstNb)
          Set the web instances number.
 
Methods inherited from class org.ow2.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 String ARCH_BOTH_WEB_EJB
Architecture of the JOnAS's instances : contain both Web level and Ejb level.

See Also:
Constant Field Values

ARCH_SEPARATED_WEB_EJB

protected static final String ARCH_SEPARATED_WEB_EJB
Architecture 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(String destDirPrefix)
Set directory prefix.

Parameters:
destDirPrefix - The destDirPrefix to set.

getDestDirPrefix

public 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 String getLogInfo()
Gets logger info (to be displayed).

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

setLogInfo

public void setLogInfo(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 String getDestDir(String destDirPrefix,
                                int i)
Build dest dir with an index.

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

setArch

public void setArch(String arch)
Set architecture.

Parameters:
arch - the architecture

getArch

public String getArch()
Get architecture.

Returns:
architecture

setWebInstNb

public void setWebInstNb(int webInstNb)
Set the web instances number.

Parameters:
webInstNb - number of web instances

getWebInstNb

public int getWebInstNb()
Get the web instances number.

Returns:
number of web instances

setEjbInstNb

public void setEjbInstNb(int ejbInstNb)
Set the ejb instances number.

Parameters:
ejbInstNb - number of ejb instances

getEjbInstNb

public int getEjbInstNb()
Get the ejb instances number.

Returns:
number of ejb instances

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 List<ClusterTasks> getClusterTasks()
Returns:
a list of all tasks to do

log

public void log(String msg)
Logging.

Parameters:
msg - message to log

generatesTasks

public abstract void generatesTasks()
Abstract generatesTasks().



Copyright © 2010 OW2 Consortium. All Rights Reserved.