|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl
public class HostProcessFilterImpl
A class representing a remote process filter string. This is a name pattern
for returning lists of remote processes when used as input to the
UniversalProcessMiner class.
Valid generic names are names with one or two asterisks
anywhere in the name, as in:
ABC*
or *ABC
or A*C
*ABC*
or *A*C
or A*C*
toString()
.
Clients may instantiate or subclass this class. When subclassing, clients need to
ensure that the subclass is always capable of performing a deep clone
operation with the clone()
method, so if they add fields of
complex type, these need to be dealt with by overriding clone()
.
Field Summary | |
---|---|
protected boolean |
_resolveVariables
|
static String |
ALL
|
protected boolean |
anystatus
|
protected String |
gid
|
protected long |
maxVM
|
protected long |
minVM
|
protected String |
name
|
protected String |
pid
|
protected String |
ppid
|
protected HashMap |
states
|
protected String |
status
|
protected String |
username
|
protected static char |
WILDCARD
|
Constructor Summary | |
---|---|
HostProcessFilterImpl()
Constructor to use when there is no existing filter string. |
|
HostProcessFilterImpl(boolean resolveVariables)
Constructor to use when there is no existing filter string. |
|
HostProcessFilterImpl(String input)
Constructor to use when filter string already exists. |
|
HostProcessFilterImpl(String input,
boolean resolveVariables)
Constructor to use when filter string already exists. |
Method Summary | |
---|---|
boolean |
allows(String status)
Returns whether this filter allows a process with the status line status to pass through. |
Object |
clone()
Return an identical (deep) copy of this filter. |
boolean |
getAnyStatus()
Returns true when all process states are selected. |
String |
getGid()
Return the process group id (gid) part of this filter string. |
String |
getMaxVM()
Returns the maximum VM size for processes allowed by this filter |
String |
getMinVM()
Returns the minimum VM size for processes allowed by this filter |
String |
getName()
Return the process name part of this filter string. |
String |
getPid()
Return the process id (pid) part of this filter string. |
String |
getPpid()
Return the process parent id (ppid) part of this filter string. |
boolean |
getSpecificState(String stateCode)
Check whether this filter requires that the given state is set. |
String |
getUsername()
Return the username part of this filter string. |
protected void |
init()
|
protected void |
initInput(String input)
|
protected void |
initStates()
|
boolean |
satisfiesState(String stateString)
Check whether a given process state String matches this filter. |
void |
setAnyStatus()
Select all/any process states |
void |
setGid(String obj)
Set the process group id (gid) part of this filter string. |
void |
setMaxVM(String strMaxVM)
Sets the maximum VM size for processes allowed by this filter |
void |
setMinVM(String strMinVM)
Sets the minimum VM size for processes allowed by this filter |
void |
setName(String obj)
Set the name part of this filter string. |
void |
setPid(String obj)
Set the process id part of this filter string. |
void |
setPpid(String obj)
Set the process parent id part of this filter string. |
void |
setSpecificState(String stateCode)
Change this filter such that it requires the given state to be set. |
void |
setUsername(String obj)
Set the user id (uid) part of this filter string. |
protected String |
toStateString()
|
String |
toString()
Convert this filter into a filter string. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ALL
protected static final char WILDCARD
protected String name
protected String username
protected String gid
protected String ppid
protected String pid
protected long minVM
protected long maxVM
protected boolean anystatus
protected String status
protected HashMap states
protected boolean _resolveVariables
Constructor Detail |
---|
public HostProcessFilterImpl()
public HostProcessFilterImpl(boolean resolveVariables)
public HostProcessFilterImpl(String input)
public HostProcessFilterImpl(String input, boolean resolveVariables)
Method Detail |
---|
protected void initStates()
protected void init()
protected void initInput(String input)
public String getName()
IHostProcessFilter
getName
in interface IHostProcessFilter
public String getUsername()
IHostProcessFilter
getUsername
in interface IHostProcessFilter
public String getGid()
IHostProcessFilter
getGid
in interface IHostProcessFilter
public String getPpid()
IHostProcessFilter
getPpid
in interface IHostProcessFilter
public String getPid()
IHostProcessFilter
getPid
in interface IHostProcessFilter
public boolean getAnyStatus()
IHostProcessFilter
getAnyStatus
in interface IHostProcessFilter
public String getMinVM()
IHostProcessFilter
getMinVM
in interface IHostProcessFilter
public String getMaxVM()
IHostProcessFilter
getMaxVM
in interface IHostProcessFilter
public void setName(String obj)
IHostProcessFilter
setName
in interface IHostProcessFilter
public void setUsername(String obj)
IHostProcessFilter
setUsername
in interface IHostProcessFilter
public void setGid(String obj)
IHostProcessFilter
setGid
in interface IHostProcessFilter
public void setPpid(String obj)
IHostProcessFilter
setPpid
in interface IHostProcessFilter
public void setPid(String obj)
IHostProcessFilter
setPid
in interface IHostProcessFilter
public void setAnyStatus()
IHostProcessFilter
setAnyStatus
in interface IHostProcessFilter
public void setMinVM(String strMinVM)
IHostProcessFilter
setMinVM
in interface IHostProcessFilter
public void setMaxVM(String strMaxVM)
IHostProcessFilter
setMaxVM
in interface IHostProcessFilter
public String toString()
toString
in class Object
protected String toStateString()
public boolean allows(String status)
IHostProcessFilter
status
to pass through. The status line contains some of the contents of
the status file contained in the processes numbered directory in
the /proc filesystem. For example, the status line of process 12345 is
the contents of the file /proc/12345/stat.
The status line must be structured as follows:
"pid|name|status|tgid|ppid|tracerpid|uid|username|gid|vmSize|vmRSS"
allows
in interface IHostProcessFilter
public boolean getSpecificState(String stateCode)
IHostProcessFilter
getSpecificState
in interface IHostProcessFilter
stateCode
- state code to check. One of the String constants
in ISystemProcessRemoteConstants.ALL_STATES_STR
.public void setSpecificState(String stateCode)
IHostProcessFilter
setSpecificState
in interface IHostProcessFilter
stateCode
- state code to check. One of the String constants
in ISystemProcessRemoteConstants.ALL_STATES_STR
.public boolean satisfiesState(String stateString)
IHostProcessFilter
satisfiesState
in interface IHostProcessFilter
stateString
- A state String, holding a list of state constants
from ISystemProcessRemoteConstants.ALL_STATES_STR
,
separated by comma (",").public Object clone()
clone
in class Object
|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |