Skip to main content
Package: com.phoenix_int.aserver.util Class Hierarchy
Implemented Interfaces
  • com.phoenix_int.aserver.util.IPHXStreamRegExListener

Declaration
This is a utility class that extends java.lang.Process with a system dependent process ID. This is combined with the phxspawn and phxps utilities to provide information on sub-processes in a semi-platform independent way.

Constructor Summary

Method Summary

Methods inherited from class java.lang.Process

destroyForcibly, isAlive, waitFor

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PHXProcess

Constructs a PHXProcess out of a process and optionally reads the PID of the sub-process. Typically you do not create instances of this class yourself, but use PHXRuntime.exec2() to generate instances. Parameters:
  • readPID - If true, the PID of this process will be read off of the process’s standard output. The pid should be a number and should be on the very first line of output all by itself.

PHXProcess

PHXProcess

Constructs a PHXProcess out of a regular process but does not provide extended functionality because the process ID will not be known. Use PHXRuntime to execute processes and automatically generate correct PHXProcess instances.

Method Detail

matchFound

Description copied from interface: com.phoenix_int.aserver.util.IPHXStreamRegExListener. Signals that a match was found. Specified by:
  • matchFound in interface com.phoenix_int.aserver.util.IPHXStreamRegExListener
Parameters:
  • patNum - The index of the pattern that matched
  • pat - The matching pattern
  • line - The matching line
  • match - The MatchResult object which describes the match
Returns:
  • true to continue searching for this pattern, false to remove the pattern from the pattern list.

getJobID

getJobNode

getProcess

Returns the java Process instance for this PHXProcess

getProcessID

Returns the platform dependent process ID associated with this process. If there was any error reading the process ID, or there is no process ID, an exception explaining the problem will be thrown (every time you call this function). Throws:
  • java.io.IOException

listProcesses

This function lists all the processes and sub-processes of this PHXProcess. This is a suitable list to return from IPHXMonitorable.listProcesses(). Throws:
  • java.io.IOException

destroy

Specified by:
  • destroy in class java.lang.Process

exitValue

Specified by:
  • exitValue in class java.lang.Process

waitFor

Specified by:
  • waitFor in class java.lang.Process
Throws:
  • java.lang.InterruptedException

wrapInputStream

wrapErrorStream

getInputStream

Specified by:
  • getInputStream in class java.lang.Process

getErrorStream

Specified by:
  • getErrorStream in class java.lang.Process

getOutputStream

Specified by:
  • getOutputStream in class java.lang.Process

getTempScriptFileName