SmartFrog 3.10.000

org.smartfrog.services.shellscript
Interface SFProcessExecution

All Superinterfaces:
SFExecution
All Known Implementing Classes:
SFProcessExecutionImpl

public interface SFProcessExecution
extends SFExecution

Interface that provides the API to the script component, allowing other co-located components to submit script commands. The interface provides for the submission of lines of script and the ability to lock a script component for unique use for a period. This ensures that sequences of script commands will not be interleaved with other script requets to the component. The operational model is asynchronous, in that the execute operation only queues the execute request and does not wait until it is complete. An object implementing the ScriptResult interface is returned, and this can be queried to find if the script has completed and obtain the resultant output, both error and normal. Commands to be executed are passed in as a list the following format. Each element is either a string, in which case it is treated as a command, or a list in which case the command is the space-separated "toString" of its elements.


Field Summary
static java.lang.String ATR_AUTO_START
          This indicates if the component should start during deploy phase.
 
Fields inherited from interface org.smartfrog.services.shellscript.SFExecution
ATR_EXEC, ATR_EXEC_EXIT_CODE, ATR_EXEC_EXIT_CODES, ATR_NAME, ATR_NUMBER_OF_EXECS
 
Method Summary
 java.io.InputStream getStdErrStream()
          Gets the error stream of the subprocess.
 java.io.OutputStream getStdInpStream()
          Gets the output stream of the subprocess.
 java.io.InputStream getStdOutStream()
          Gets the input stream of the subprocess.
 boolean isRunning()
          Is the process running?
 void kill()
          Kill the process
 void restart()
          Restarts the process
 
Methods inherited from interface org.smartfrog.services.shellscript.SFExecution
readConfig
 

Field Detail

ATR_AUTO_START

static final java.lang.String ATR_AUTO_START
This indicates if the component should start during deploy phase. String name for attribute. Value "autoStart".

See Also:
Constant Field Values
Method Detail

getStdOutStream

java.io.InputStream getStdOutStream()
Gets the input stream of the subprocess. The stream obtains data piped from the standard output stream of the process (Process) object.

Implementation note: It is a good idea for the input stream to be buffered.

Returns:
the input stream connected to the normal output of the subprocess.

getStdErrStream

java.io.InputStream getStdErrStream()
Gets the error stream of the subprocess. The stream obtains data piped from the error output stream of the process (Process) object.

Implementation note: It is a good idea for the input stream to be buffered.

Returns:
the input stream connected to the error stream of the subprocess.

getStdInpStream

java.io.OutputStream getStdInpStream()
Gets the output stream of the subprocess. Output to the stream is piped into the standard input stream of the process (Process) object.

Implementation note: It is a good idea for the output stream to be buffered.

Returns:
the output stream connected to the normal input of the subprocess.

kill

void kill()
Kill the process


restart

void restart()
             throws SmartFrogException
Restarts the process

Throws:
SmartFrogException

isRunning

boolean isRunning()
Is the process running?

Returns:
boolean

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP