|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensolaris.os.dtrace.ProcessState
public final class ProcessState
State of a target process designated by Consumer.createProcess(String command)
or Consumer.grabProcess(int pid)
.
Immutable. Supports persistence using XMLEncoder
.
ConsumerListener.processStateChanged(ProcessEvent e)
,
Serialized FormNested Class Summary | |
---|---|
static class |
ProcessState.State
State of a target process. |
Constructor Summary | |
---|---|
ProcessState(int pid,
ProcessState.State processState,
int processTerminationSignal,
java.lang.String processTerminationSignalName,
java.lang.Integer processExitStatus,
java.lang.String msg)
Creates a ProcessState instance with the given state. |
|
ProcessState(int pid,
java.lang.String processStateName,
int processTerminationSignal,
java.lang.String processTerminationSignalName,
java.lang.Integer processExitStatus,
java.lang.String msg)
Supports XML persistence. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this ProcessState
instance for equality. |
java.lang.Integer |
getExitStatus()
Gets the process exit status. |
java.lang.String |
getMessage()
Gets the message from DTrace describing this process state. |
int |
getProcessID()
Gets the process ID. |
ProcessState.State |
getState()
Gets the process state. |
int |
getTerminationSignal()
Gets the signal that terminated the process. |
java.lang.String |
getTerminationSignalName()
Gets the name of the signal that terminated the process. |
int |
hashCode()
Overridden to ensure that equal instances have equal hash codes. |
java.lang.String |
toString()
Gets a string representation of this process state useful for logging and not intended for display. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProcessState(int pid, ProcessState.State processState, int processTerminationSignal, java.lang.String processTerminationSignalName, java.lang.Integer processExitStatus, java.lang.String msg)
ProcessState
instance with the given state.
pid
- non-negative target process IDprocessState
- target process stateprocessTerminationSignal
- signal that terminated the target
process, -1
if the process was not terminated by a signal
or if the terminating signal is unknownprocessTerminationSignalName
- name of the signal that
terminated the target process, null
if the process was
not terminated by a signal or if the terminating signal is
unknownprocessExitStatus
- target process exit status, null
if the process has not exited or the exit status is unknownmsg
- message included by DTrace, if any
java.lang.NullPointerException
- if the given process state is null
java.lang.IllegalArgumentException
- if the given process ID is negativepublic ProcessState(int pid, java.lang.String processStateName, int processTerminationSignal, java.lang.String processTerminationSignalName, java.lang.Integer processExitStatus, java.lang.String msg)
java.lang.IllegalArgumentException
- if there is no ProcessState.State
value with the given state name.ProcessState(int pid, State processState, int
processTerminationSignal, String processTerminationSignalName,
Integer processExitStatus, String msg)
Method Detail |
---|
public int getProcessID()
public ProcessState.State getState()
public int getTerminationSignal()
-1
if the process was not
terminated by a signal or if the terminating signal is unknownpublic java.lang.String getTerminationSignalName()
null
if the process was
not terminated by a signal or if the terminating signal is
unknownpublic java.lang.Integer getExitStatus()
null
if the process has not
exited or the exit status is unknownpublic java.lang.String getMessage()
null
if DTrace did not include
a message with this process statepublic boolean equals(java.lang.Object o)
ProcessState
instance for equality. Defines equality as having the same
attributes.
equals
in class java.lang.Object
true
if and only if the specified object is also
a ProcessState
and both instances have the same
attributespublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
class-name[property1 = value1, property2 = value2]
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |