eu.lindenbaum.maven.erlang
Class RunProjectScript

java.lang.Object
  extended by eu.lindenbaum.maven.erlang.RunProjectScript
All Implemented Interfaces:
Script<GenericScriptResult>

public class RunProjectScript
extends Object

A Script starting a list of erlang applications on a specific node.

Author:
Tobias Schlager , Olle Törnström , Timo Koepke

Field Summary
protected  String script
           
 
Fields inherited from interface eu.lindenbaum.maven.erlang.Script
NL
 
Constructor Summary
RunProjectScript(String node, List<String> applications)
          Creates a Script trying to start a set of erlang applications.
RunProjectScript(String node, List<String> applications, File sysConfigFile)
          Creates a Script trying to start a set of erlang applications.
 
Method Summary
 String get()
          Returns an evaluateable String containing the erlang script of the implementing class.
 GenericScriptResult handle(com.ericsson.otp.erlang.OtpErlangObject result)
          Converts the result of the Script execution into an object capable of logging the script output as well as returning whether the script succeeded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

script

protected final String script
Constructor Detail

RunProjectScript

public RunProjectScript(String node,
                        List<String> applications)
                 throws org.apache.maven.plugin.MojoExecutionException
Creates a Script trying to start a set of erlang applications.

Parameters:
node - to start the applications on
applications - to start
Throws:
org.apache.maven.plugin.MojoExecutionException

RunProjectScript

public RunProjectScript(String node,
                        List<String> applications,
                        File sysConfigFile)
                 throws org.apache.maven.plugin.MojoExecutionException
Creates a Script trying to start a set of erlang applications.

Parameters:
node - to start the applications on
applications - to start
sysConfigFile - a system configuration file to load before starting the applications
Throws:
org.apache.maven.plugin.MojoExecutionException
Method Detail

get

public String get()
Description copied from interface: Script
Returns an evaluateable String containing the erlang script of the implementing class.

Returns:
An erlang script that can be evaluated.

handle

public GenericScriptResult handle(com.ericsson.otp.erlang.OtpErlangObject result)
Converts the result of the Script execution into an object capable of logging the script output as well as returning whether the script succeeded.

Parameters:
result - The return term of the Script execution.
Returns:
An object capable of delivering the results transparently.


Copyright © 2012 Lindenbaum GmbH. All Rights Reserved.