Package jason.infra.local
Class LocalMASLauncherAnt
java.lang.Object
jason.infra.local.LocalMASLauncherAnt
- All Implemented Interfaces:
MASLauncherInfraTier
,java.lang.Runnable
- Direct Known Subclasses:
JadeMASLauncherAnt
public class LocalMASLauncherAnt extends java.lang.Object implements MASLauncherInfraTier
Write the Ant script to run the MAS in Local infrastructure and
start this script.
- Author:
- Jomi
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
bindir
protected RunProjectListener
listener
protected java.lang.Process
masProcess
protected java.io.OutputStream
processOut
protected MAS2JProject
project
protected boolean
stop
private java.lang.String
task
protected boolean
useBuildFileName
-
Constructor Summary
Constructors Constructor Description LocalMASLauncherAnt()
LocalMASLauncherAnt(java.lang.String task)
create the launcher for a specific ant task -
Method Summary
Modifier and Type Method Description java.lang.String
getBuildFileName()
java.lang.String
getCustomBuildFileName()
java.lang.String[]
getStartCommandArray()
returns the operating system command that runs the MASprotected 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
setTask(java.lang.String t)
void
stopMAS()
Stops the MAS execution.boolean
writeScripts(boolean debug, boolean useBuildFileName)
write the scripts necessary to run the projectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
project
-
listener
-
stop
protected boolean stop -
masProcess
protected java.lang.Process masProcess -
processOut
protected java.io.OutputStream processOut -
useBuildFileName
protected boolean useBuildFileName -
bindir
public static java.lang.String bindir -
task
private java.lang.String task
-
-
Constructor Details
-
LocalMASLauncherAnt
public LocalMASLauncherAnt() -
LocalMASLauncherAnt
public LocalMASLauncherAnt(java.lang.String task)create the launcher for a specific ant task
-
-
Method Details
-
setProject
Description copied from interface:MASLauncherInfraTier
Sets the description of the project to be run.- Specified by:
setProject
in interfaceMASLauncherInfraTier
-
setListener
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 interfaceMASLauncherInfraTier
-
setTask
public void setTask(java.lang.String t) -
run
public void run()- Specified by:
run
in interfacejava.lang.Runnable
-
stopMAS
public void stopMAS()Description copied from interface:MASLauncherInfraTier
Stops the MAS execution.- Specified by:
stopMAS
in interfaceMASLauncherInfraTier
-
getStartCommandArray
public java.lang.String[] getStartCommandArray()returns the operating system command that runs the MAS -
getBuildFileName
public java.lang.String getBuildFileName() -
getCustomBuildFileName
public java.lang.String getCustomBuildFileName() -
writeScripts
public boolean writeScripts(boolean debug, boolean useBuildFileName)write the scripts necessary to run the project- Specified by:
writeScripts
in interfaceMASLauncherInfraTier
-
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()
-