com.ibm.sysmgt.sdk.remote
Class Process

java.lang.Object
  extended bycom.ibm.sysmgt.sdk.remote.Process
All Implemented Interfaces:
java.io.Serializable

public class Process
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int PROC_PRIORITY_BACKGROUND
           
static int PROC_PRIORITY_FOREGROUND
           
static int PROC_PRIORITY_HIGH
           
static int PROC_PRIORITY_IDLE
           
static int PROC_PRIORITY_LOW
           
static int PROC_PRIORITY_NORMAL
           
static int PROC_PRIORITY_REAL_TIME
           
static int PROC_PRIORITY_SERVER
           
static int PROC_PRIORITY_TIME_CRIT
           
static int PROC_PRIORITY_UNKNOWN
           
static int PROC_TYPE_APPLICATION
           
 
Constructor Summary
protected Process()
          Constructor
  Process(long pid, long moid)
          Constructor
 
Method Summary
static Process findById(LoginSession session, long pid, long moid)
          Finds the Process object matching the specified process id
static java.util.List getAllProcesses(LoginSession s, long moid)
           
 java.lang.String getCommand()
          Gets the command for the process executable
 java.lang.String getCPUTime()
          Gets the amount of CPU time the process has used
 java.lang.String getExecutableDate()
          Gets the date of the process executable
 java.lang.String getExecutableDescription()
          Gets the description for the process executable
 java.lang.String getExecutableVersion()
          Gets the version of the process executable
 java.lang.Long getMemoryusage()
          Gets the amount of memory used by the process
 long getMoid()
          Gets the Managed System ID for this process
 java.lang.Boolean getMonitored()
          Gets whether the process is being monitored by Director
 java.lang.String getName()
          Gets the name of this process
 java.lang.Long getParentId()
          Gets the parent process id for this process
 long getPid()
          Gets the process id for this process
 java.lang.Integer getPriority()
          Gets the priority of the process
 java.lang.String getStatus()
          getStatus - gets the status of the process
 java.lang.String getSubSystem()
          getSubSystem - gets the subsystem of the process
 java.lang.Integer getThreadcount()
          Gets the number of threads the process is using
 java.lang.String getUser()
          Gets the user name the process is running under
 void setCommand(java.lang.String command)
          Sets the command for the process executable
 void setCPUTime(java.lang.String CPUTime)
          Sets the amount of CPU time the process has used
 void setExecutableDate(java.lang.String executableDate)
          Sets the date of the process executable
 void setExecutableDescription(java.lang.String executableDescription)
          Sets the description for the process executable
 void setExecutableVersion(java.lang.String executableVersion)
          Sets the version of the process executable
 void setMemoryusage(java.lang.Long memoryusage)
          Sets the amount of memory used by the process
 void setMoid(long moid)
          Sets the Managed System id for this process
 void setMonitored(java.lang.Boolean monitored)
          Sets whether the process is being monitored by Director
 void setName(java.lang.String name)
          Sets the name of the process
 void setParentId(java.lang.Long parentId)
          Sets the parent process id for this process
 void setPid(long pid)
          Sets the process id for this process
 void setPriority(java.lang.Integer priority)
          Sets the priority of the process
 void setStatus(java.lang.String status)
          Sets the status of the process (os400 specific)
 void setSubSystem(java.lang.String subsystem)
          Sets the subsystem of the process (0s400 specific)
 void setThreadcount(java.lang.Integer threadcount)
          Sets the number of threads the process is using
 void setUser(java.lang.String user)
          Sets the user name the process is running under
static java.lang.Boolean terminate(LoginSession session, long pid, long moid, int type)
           
static java.lang.Boolean terminate(LoginSession session, Process proc, ManagedSystem ms)
           
 java.lang.String toString()
          Get the process information in the form of a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROC_PRIORITY_IDLE

public static final int PROC_PRIORITY_IDLE
See Also:
Constant Field Values

PROC_PRIORITY_LOW

public static final int PROC_PRIORITY_LOW
See Also:
Constant Field Values

PROC_PRIORITY_BACKGROUND

public static final int PROC_PRIORITY_BACKGROUND
See Also:
Constant Field Values

PROC_PRIORITY_NORMAL

public static final int PROC_PRIORITY_NORMAL
See Also:
Constant Field Values

PROC_PRIORITY_FOREGROUND

public static final int PROC_PRIORITY_FOREGROUND
See Also:
Constant Field Values

PROC_PRIORITY_HIGH

public static final int PROC_PRIORITY_HIGH
See Also:
Constant Field Values

PROC_PRIORITY_SERVER

public static final int PROC_PRIORITY_SERVER
See Also:
Constant Field Values

PROC_PRIORITY_TIME_CRIT

public static final int PROC_PRIORITY_TIME_CRIT
See Also:
Constant Field Values

PROC_PRIORITY_REAL_TIME

public static final int PROC_PRIORITY_REAL_TIME
See Also:
Constant Field Values

PROC_PRIORITY_UNKNOWN

public static final int PROC_PRIORITY_UNKNOWN
See Also:
Constant Field Values

PROC_TYPE_APPLICATION

public static final int PROC_TYPE_APPLICATION
See Also:
Constant Field Values
Constructor Detail

Process

protected Process()
Constructor


Process

public Process(long pid,
               long moid)
Constructor

Parameters:
pid - - the process id for the process
moid - - the Managed System id where the process is running
Method Detail

getAllProcesses

public static java.util.List getAllProcesses(LoginSession s,
                                             long moid)
                                      throws ServerCommunicationException,
                                             RequestFailedException
Parameters:
s - - the login session
moid - - the id of the Managed System to retrieve the processes from
Returns:
List - a list of all processes running on the Managed System, null if we can't access the system.
Throws:
ServerCommunicationException
RequestFailedException

terminate

public static java.lang.Boolean terminate(LoginSession session,
                                          Process proc,
                                          ManagedSystem ms)
                                   throws ServerCommunicationException,
                                          RequestFailedException
Parameters:
session - - the login session
ms - - the Managed System object where the process is running
Returns:
true/false - true if the terminate command was handled ok, false if not.
Throws:
ServerCommunicationException
RequestFailedException

terminate

public static java.lang.Boolean terminate(LoginSession session,
                                          long pid,
                                          long moid,
                                          int type)
                                   throws ServerCommunicationException,
                                          RequestFailedException
Parameters:
session - - the login session
pid - - the process id to terminate
moid - - the Managed System id where the process is running
Returns:
true/false - true if the terminate command was handled ok, false if not.
Throws:
ServerCommunicationException
RequestFailedException

findById

public static Process findById(LoginSession session,
                               long pid,
                               long moid)
                        throws ServerCommunicationException,
                               RequestFailedException
Finds the Process object matching the specified process id

Parameters:
pid - - the process id to search for
moid - - the managed system id where the process is running
Returns:
Process - the process with the matching pid
Throws:
ServerCommunicationException
RequestFailedException

getMoid

public long getMoid()
Gets the Managed System ID for this process

Returns:
moid - the managed object ID

setMoid

public void setMoid(long moid)
Sets the Managed System id for this process

Parameters:
moid - - the managed object ID

getPid

public long getPid()
Gets the process id for this process

Returns:
moid - the managed object ID

setPid

public void setPid(long pid)
Sets the process id for this process


getName

public java.lang.String getName()
Gets the name of this process

Returns:
name - the name of the process

setName

public void setName(java.lang.String name)
Sets the name of the process

Parameters:
name - - the name of the process

getUser

public java.lang.String getUser()
Gets the user name the process is running under

Returns:
user - the user ID the process is running under

setUser

public void setUser(java.lang.String user)
Sets the user name the process is running under

Parameters:
user - - the user ID the process is running under

getParentId

public java.lang.Long getParentId()
Gets the parent process id for this process

Returns:
parentId - the parent process id

setParentId

public void setParentId(java.lang.Long parentId)
Sets the parent process id for this process

Parameters:
parentId - - the parent process id

getThreadcount

public java.lang.Integer getThreadcount()
Gets the number of threads the process is using

Returns:
threadcount - the number of threads the process is using

setThreadcount

public void setThreadcount(java.lang.Integer threadcount)
Sets the number of threads the process is using

Parameters:
threadcount - - the number of threads the process is using

getPriority

public java.lang.Integer getPriority()
Gets the priority of the process

Returns:
priority - the priority of the process

setPriority

public void setPriority(java.lang.Integer priority)
Sets the priority of the process

Parameters:
priority - - the priority of the process

getMonitored

public java.lang.Boolean getMonitored()
Gets whether the process is being monitored by Director

Returns:
monitored - true/false whether the process is monitored by Director

setMonitored

public void setMonitored(java.lang.Boolean monitored)
Sets whether the process is being monitored by Director

Parameters:
monitored - - true/false whether the process is monitored by Director

getMemoryusage

public java.lang.Long getMemoryusage()
Gets the amount of memory used by the process

Returns:
memoryusage - the amount of memory the process is using

setMemoryusage

public void setMemoryusage(java.lang.Long memoryusage)
Sets the amount of memory used by the process

Parameters:
memoryusage - - the amount of memory the process is using

getCPUTime

public java.lang.String getCPUTime()
Gets the amount of CPU time the process has used

Returns:
CPUTime - the amount of CPUTime the process is using

setCPUTime

public void setCPUTime(java.lang.String CPUTime)
Sets the amount of CPU time the process has used

Parameters:
CPUTime - - the amount of CPU time the process is using

getExecutableVersion

public java.lang.String getExecutableVersion()
Gets the version of the process executable

Returns:
executableVersion - the version of the process executable

setExecutableVersion

public void setExecutableVersion(java.lang.String executableVersion)
Sets the version of the process executable

Parameters:
executableVersion - - the version of the process executable

getExecutableDate

public java.lang.String getExecutableDate()
Gets the date of the process executable

Returns:
executableDate - the date of the process executable

setExecutableDate

public void setExecutableDate(java.lang.String executableDate)
Sets the date of the process executable

Parameters:
executableDate - - the date of the process executable

getExecutableDescription

public java.lang.String getExecutableDescription()
Gets the description for the process executable

Returns:
executableDescription - the description of the process executable

setExecutableDescription

public void setExecutableDescription(java.lang.String executableDescription)
Sets the description for the process executable

Parameters:
executableDescription - - the description for the process executable

getCommand

public java.lang.String getCommand()
Gets the command for the process executable

Returns:
command - the command for the process executable

setCommand

public void setCommand(java.lang.String command)
Sets the command for the process executable

Parameters:
command - - the command for the process executable

getStatus

public java.lang.String getStatus()
getStatus - gets the status of the process

Returns:
status

setStatus

public void setStatus(java.lang.String status)
Sets the status of the process (os400 specific)

Parameters:
status - - status of the process

getSubSystem

public java.lang.String getSubSystem()
getSubSystem - gets the subsystem of the process

Returns:
subsystem

setSubSystem

public void setSubSystem(java.lang.String subsystem)
Sets the subsystem of the process (0s400 specific)

Parameters:
subsystem - - subsystem of the process

toString

public java.lang.String toString()
Get the process information in the form of a string.

Returns:
processinfo - process information in the form of a string