jason.infra.centralised
Class CentralisedMASLauncherAnt

Package class diagram package CentralisedMASLauncherAnt
java.lang.Object
  extended by jason.infra.centralised.CentralisedMASLauncherAnt
All Implemented Interfaces:
MASLauncherInfraTier, java.lang.Runnable
Direct Known Subclasses:
JadeMASLauncherAnt, SaciMASLauncherAnt

public class CentralisedMASLauncherAnt
extends java.lang.Object
implements MASLauncherInfraTier

Write the Ant script to run the MAS in centralised infrastructure and start this script.


Field Summary
static java.lang.String bindir
           
protected  RunProjectListener listener
           
protected  java.lang.Process masProcess
           
protected  java.io.OutputStream processOut
           
protected  MAS2JProject project
           
protected  boolean stop
           
 
Constructor Summary
CentralisedMASLauncherAnt()
           
CentralisedMASLauncherAnt(java.lang.String task)
          create the launcher for a specific ant task
 
Method Summary
 java.lang.String[] getStartCommandArray()
          returns the operating system command that runs the MAS
protected  boolean hasCBuild()
           
static java.lang.String replace(java.lang.String s, java.lang.String p, java.lang.String n)
           
protected  java.lang.String replaceMarks(java.lang.String script, boolean debug)
           
 void run()
           
 void setListener(RunProjectListener listener)
          Sets the object that wants to be informed about the changes in the execution state.
 void setProject(MAS2JProject project)
          Sets the description of the project to be run.
 void stopMAS()
          Stops the MAS execution.
 boolean writeScripts(boolean debug)
          write the scripts necessary to run the project
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

protected MAS2JProject project

listener

protected RunProjectListener listener

stop

protected boolean stop

masProcess

protected java.lang.Process masProcess

processOut

protected java.io.OutputStream processOut

bindir

public static java.lang.String bindir
Constructor Detail

CentralisedMASLauncherAnt

public CentralisedMASLauncherAnt()

CentralisedMASLauncherAnt

public CentralisedMASLauncherAnt(java.lang.String task)
create the launcher for a specific ant task

Method Detail

setProject

public void setProject(MAS2JProject project)
Description copied from interface: MASLauncherInfraTier
Sets the description of the project to be run.

Specified by:
setProject in interface MASLauncherInfraTier

setListener

public void setListener(RunProjectListener listener)
Description copied from interface: MASLauncherInfraTier
Sets the object that wants to be informed about the changes in the execution state. This object normally is the JasonIDE, that wants to change available buttons as the project is being executed.

Specified by:
setListener in interface MASLauncherInfraTier

run

public void run()
Specified by:
run in interface java.lang.Runnable

stopMAS

public void stopMAS()
Description copied from interface: MASLauncherInfraTier
Stops the MAS execution.

Specified by:
stopMAS in interface MASLauncherInfraTier

getStartCommandArray

public java.lang.String[] getStartCommandArray()
returns the operating system command that runs the MAS


writeScripts

public boolean writeScripts(boolean debug)
write the scripts necessary to run the project

Specified by:
writeScripts in interface MASLauncherInfraTier

replaceMarks

protected java.lang.String replaceMarks(java.lang.String script,
                                        boolean debug)

replace

public static java.lang.String replace(java.lang.String s,
                                       java.lang.String p,
                                       java.lang.String n)

hasCBuild

protected boolean hasCBuild()