mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 04:35:45 +02:00
[180562] [api] Classes should not implement interfaces just to bring constants into namespace. Do not implement ISystemProcessPropertyConstants and ISystemProcessRemoteConstants.
This commit is contained in:
parent
5de9a79807
commit
3789c71626
14 changed files with 168 additions and 167 deletions
|
@ -30,7 +30,7 @@ import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConst
|
||||||
* @author mjberger
|
* @author mjberger
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SystemProcessStatesContentProvider implements ISystemProcessRemoteConstants, IStructuredContentProvider
|
public class SystemProcessStatesContentProvider implements IStructuredContentProvider
|
||||||
{
|
{
|
||||||
private HashMap strIndices;
|
private HashMap strIndices;
|
||||||
|
|
||||||
|
@ -43,9 +43,9 @@ public class SystemProcessStatesContentProvider implements ISystemProcessRemoteC
|
||||||
// construct a mapping from unique state names to integers. Each integer
|
// construct a mapping from unique state names to integers. Each integer
|
||||||
// is the index of the associated state name in the array of translated
|
// is the index of the associated state name in the array of translated
|
||||||
// state name strings.
|
// state name strings.
|
||||||
for (int i = 0; i < ALL_STATES_STR.length; i++)
|
for (int i = 0; i < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
|
||||||
{
|
{
|
||||||
strIndices.put(ALL_STATES_STR[i], new Integer(i));
|
strIndices.put(ISystemProcessRemoteConstants.ALL_STATES_STR[i], new Integer(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ import org.eclipse.ui.views.properties.PropertyDescriptor;
|
||||||
|
|
||||||
public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
|
public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
|
||||||
implements ISystemViewElementAdapter, ISystemRemoteElementAdapter,
|
implements ISystemViewElementAdapter, ISystemRemoteElementAdapter,
|
||||||
ISystemProcessPropertyConstants, ISystemProcessRemoteConstants
|
ISystemProcessPropertyConstants
|
||||||
{
|
{
|
||||||
private SystemCopyToClipboardAction copyClipboardAction;
|
private SystemCopyToClipboardAction copyClipboardAction;
|
||||||
public boolean canDrag(Object element)
|
public boolean canDrag(Object element)
|
||||||
|
|
|
@ -55,7 +55,7 @@ import org.eclipse.swt.widgets.Text;
|
||||||
|
|
||||||
|
|
||||||
public class SystemProcessFilterStringEditPane extends
|
public class SystemProcessFilterStringEditPane extends
|
||||||
SystemFilterStringEditPane implements ISystemProcessRemoteConstants
|
SystemFilterStringEditPane
|
||||||
{
|
{
|
||||||
|
|
||||||
// GUI widgets
|
// GUI widgets
|
||||||
|
@ -406,9 +406,9 @@ public class SystemProcessFilterStringEditPane extends
|
||||||
chkStatus.setAllChecked(rffs.getAnyStatus());
|
chkStatus.setAllChecked(rffs.getAnyStatus());
|
||||||
|
|
||||||
String[] stateTypes = SystemProcessStatesContentProvider.getStates();
|
String[] stateTypes = SystemProcessStatesContentProvider.getStates();
|
||||||
for (int i = 0; i < ALL_STATES_STR.length; i++)
|
for (int i = 0; i < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
|
||||||
{
|
{
|
||||||
chkStatus.setChecked(stateTypes[i], rffs.getSpecificState(ALL_STATES_STR[i]));
|
chkStatus.setChecked(stateTypes[i], rffs.getSpecificState(ISystemProcessRemoteConstants.ALL_STATES_STR[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -685,9 +685,9 @@ public class SystemProcessFilterStringEditPane extends
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] stateStrings = SystemProcessStatesContentProvider.getStates();
|
String[] stateStrings = SystemProcessStatesContentProvider.getStates();
|
||||||
for (int i = 0; i < ALL_STATES_STR.length; i++)
|
for (int i = 0; i < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
|
||||||
{
|
{
|
||||||
if (chkStatus.getChecked(stateStrings[i])) rpfs.setSpecificState(ALL_STATES_STR[i]);
|
if (chkStatus.getChecked(stateStrings[i])) rpfs.setSpecificState(ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
|
||||||
}
|
}
|
||||||
return rpfs.toString();
|
return rpfs.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ import org.eclipse.rse.services.clientserver.processes.handlers.UniversalServerP
|
||||||
* Miner for getting process information from a remote system.
|
* Miner for getting process information from a remote system.
|
||||||
* @author mjberger
|
* @author mjberger
|
||||||
*/
|
*/
|
||||||
public class UniversalProcessMiner extends Miner implements IUniversalProcessDataStoreConstants, IUniversalDataStoreConstants, ISystemProcessRemoteConstants
|
public class UniversalProcessMiner extends Miner implements IUniversalProcessDataStoreConstants, IUniversalDataStoreConstants
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String MINER_ID = UniversalProcessMiner.class.getName();
|
public static final String MINER_ID = UniversalProcessMiner.class.getName();
|
||||||
|
@ -231,7 +231,7 @@ public class UniversalProcessMiner extends Miner implements IUniversalProcessDat
|
||||||
|
|
||||||
_dataStore.refresh(subject);
|
_dataStore.refresh(subject);
|
||||||
status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
|
status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
|
||||||
status.setAttribute(DE.A_VALUE, PROCESS_MINER_SUCCESS);
|
status.setAttribute(DE.A_VALUE, ISystemProcessRemoteConstants.PROCESS_MINER_SUCCESS);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ public class UniversalProcessMiner extends Miner implements IUniversalProcessDat
|
||||||
{
|
{
|
||||||
// we need to synchronize the list of data elements with the fresh
|
// we need to synchronize the list of data elements with the fresh
|
||||||
// results coming back from the query
|
// results coming back from the query
|
||||||
if (handler == null) throw new Exception(PROCESS_MINER_ERROR_NO_HANDLER);
|
if (handler == null) throw new Exception(ISystemProcessRemoteConstants.PROCESS_MINER_ERROR_NO_HANDLER);
|
||||||
SortedSet processes = handler.lookupProcesses(fsObj);
|
SortedSet processes = handler.lookupProcesses(fsObj);
|
||||||
|
|
||||||
// sort the data elements
|
// sort the data elements
|
||||||
|
@ -389,7 +389,7 @@ public class UniversalProcessMiner extends Miner implements IUniversalProcessDat
|
||||||
{
|
{
|
||||||
String statusLine = subject.getValue();
|
String statusLine = subject.getValue();
|
||||||
UniversalServerProcessImpl usp = new UniversalServerProcessImpl(statusLine);
|
UniversalServerProcessImpl usp = new UniversalServerProcessImpl(statusLine);
|
||||||
if (handler == null) throw new Exception(PROCESS_MINER_ERROR_NO_HANDLER);
|
if (handler == null) throw new Exception(ISystemProcessRemoteConstants.PROCESS_MINER_ERROR_NO_HANDLER);
|
||||||
IHostProcess result = handler.kill(usp, subject.getSource());
|
IHostProcess result = handler.kill(usp, subject.getSource());
|
||||||
|
|
||||||
if (result == null) _dataStore.deleteObject(subject.getParent(), subject);
|
if (result == null) _dataStore.deleteObject(subject.getParent(), subject);
|
||||||
|
@ -408,7 +408,7 @@ public class UniversalProcessMiner extends Miner implements IUniversalProcessDat
|
||||||
|
|
||||||
_dataStore.refresh(subject.getParent());
|
_dataStore.refresh(subject.getParent());
|
||||||
status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
|
status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
|
||||||
status.setAttribute(DE.A_VALUE, PROCESS_MINER_SUCCESS);
|
status.setAttribute(DE.A_VALUE, ISystemProcessRemoteConstants.PROCESS_MINER_SUCCESS);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.dstore.core.model.DE;
|
||||||
import org.eclipse.dstore.core.model.DataElement;
|
import org.eclipse.dstore.core.model.DataElement;
|
||||||
import org.eclipse.dstore.core.model.DataStore;
|
import org.eclipse.dstore.core.model.DataStore;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
||||||
|
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class implements the IRemoteClientProcess interface by wrappering a DataElement
|
* This class implements the IRemoteClientProcess interface by wrappering a DataElement
|
||||||
|
@ -34,7 +35,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
||||||
* @author mjberger
|
* @author mjberger
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants, IAdaptable, org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants
|
public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants, IAdaptable
|
||||||
{
|
{
|
||||||
public static final boolean ROOT_TRUE = true;
|
public static final boolean ROOT_TRUE = true;
|
||||||
public static final boolean ROOT_FALSE = false;
|
public static final boolean ROOT_FALSE = false;
|
||||||
|
@ -125,25 +126,25 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
setPid(str[PROCESS_ATTRIBUTES_INDEX_PID]);
|
setPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]);
|
||||||
|
|
||||||
setName(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
setName(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
||||||
|
|
||||||
setTgid(str[PROCESS_ATTRIBUTES_INDEX_TGID]);
|
setTgid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]);
|
||||||
|
|
||||||
setPPid(str[PROCESS_ATTRIBUTES_INDEX_PPID]);
|
setPPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]);
|
||||||
|
|
||||||
if (_ppid == 0) _isRoot = true;
|
if (_ppid == 0) _isRoot = true;
|
||||||
|
|
||||||
setTracerPid(str[PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
|
setTracerPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
|
||||||
|
|
||||||
setUid(str[PROCESS_ATTRIBUTES_INDEX_UID]);
|
setUid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]);
|
||||||
|
|
||||||
setUsername(str[PROCESS_ATTRIBUTES_INDEX_USERNAME]);
|
setUsername(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME]);
|
||||||
|
|
||||||
setGid(str[PROCESS_ATTRIBUTES_INDEX_GID]);
|
setGid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]);
|
||||||
|
|
||||||
setLabel(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
setLabel(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
||||||
}
|
}
|
||||||
catch (ArrayIndexOutOfBoundsException e)
|
catch (ArrayIndexOutOfBoundsException e)
|
||||||
{
|
{
|
||||||
|
@ -192,7 +193,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
|
||||||
|
|
||||||
public String getState()
|
public String getState()
|
||||||
{
|
{
|
||||||
String state = getSubAttribute(PROCESS_ATTRIBUTES_INDEX_STATUS);
|
String state = getSubAttribute(ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS);
|
||||||
if (state == null)
|
if (state == null)
|
||||||
{
|
{
|
||||||
//SystemPlugin.logError("Error in UniversalProcessImpl.getAttributes(): status of process " + getPid() + " is not given.");
|
//SystemPlugin.logError("Error in UniversalProcessImpl.getAttributes(): status of process " + getPid() + " is not given.");
|
||||||
|
@ -279,7 +280,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
|
||||||
|
|
||||||
protected void setState(String newState)
|
protected void setState(String newState)
|
||||||
{
|
{
|
||||||
setSubAttribute(PROCESS_ATTRIBUTES_INDEX_STATUS, newState);
|
setSubAttribute(ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS, newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setTgid(long tgid)
|
protected void setTgid(long tgid)
|
||||||
|
@ -395,7 +396,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
|
||||||
*/
|
*/
|
||||||
public long getVmSizeInKB()
|
public long getVmSizeInKB()
|
||||||
{
|
{
|
||||||
String sizeStr = getSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMSIZE);
|
String sizeStr = getSubAttribute(ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE);
|
||||||
if (sizeStr == null) return 0;
|
if (sizeStr == null) return 0;
|
||||||
long vmsize = 0;
|
long vmsize = 0;
|
||||||
try
|
try
|
||||||
|
@ -415,7 +416,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
|
||||||
*/
|
*/
|
||||||
public long getVmRSSInKB()
|
public long getVmRSSInKB()
|
||||||
{
|
{
|
||||||
String sizeStr = getSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMRSS);
|
String sizeStr = getSubAttribute(ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS);
|
||||||
if (sizeStr == null) return 0;
|
if (sizeStr == null) return 0;
|
||||||
long vmrss = 0;
|
long vmrss = 0;
|
||||||
try
|
try
|
||||||
|
@ -438,7 +439,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
|
||||||
{
|
{
|
||||||
String sizeStr = ""; //$NON-NLS-1$
|
String sizeStr = ""; //$NON-NLS-1$
|
||||||
sizeStr = sizeStr + size;
|
sizeStr = sizeStr + size;
|
||||||
setSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMSIZE, sizeStr);
|
setSubAttribute(ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE, sizeStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -448,7 +449,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
|
||||||
{
|
{
|
||||||
String sizeStr = ""; //$NON-NLS-1$
|
String sizeStr = ""; //$NON-NLS-1$
|
||||||
sizeStr = sizeStr + size;
|
sizeStr = sizeStr + size;
|
||||||
setSubAttribute(PROCESS_ATTRIBUTES_INDEX_VMRSS, sizeStr);
|
setSubAttribute(ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS, sizeStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.eclipse.rse.services.processes.AbstractProcessService;
|
||||||
import org.eclipse.rse.services.processes.IProcessService;
|
import org.eclipse.rse.services.processes.IProcessService;
|
||||||
|
|
||||||
|
|
||||||
public class DStoreProcessService extends AbstractProcessService implements IProcessService, IUniversalProcessDataStoreConstants, ISystemProcessRemoteConstants
|
public class DStoreProcessService extends AbstractProcessService implements IProcessService, IUniversalProcessDataStoreConstants
|
||||||
{
|
{
|
||||||
protected IDataStoreProvider _provider;
|
protected IDataStoreProvider _provider;
|
||||||
protected DataElement _minerElement = null;
|
protected DataElement _minerElement = null;
|
||||||
|
@ -101,7 +101,7 @@ public class DStoreProcessService extends AbstractProcessService implements IPro
|
||||||
Object[] results = nested.toArray();
|
Object[] results = nested.toArray();
|
||||||
|
|
||||||
String message = status.getAttribute(DE.A_VALUE);
|
String message = status.getAttribute(DE.A_VALUE);
|
||||||
if (!message.equals(PROCESS_MINER_SUCCESS))
|
if (!message.equals(ISystemProcessRemoteConstants.PROCESS_MINER_SUCCESS))
|
||||||
{
|
{
|
||||||
throw new SystemMessageException(getMessage("RSEPG1301")); //$NON-NLS-1$
|
throw new SystemMessageException(getMessage("RSEPG1301")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ public class DStoreProcessService extends AbstractProcessService implements IPro
|
||||||
|
|
||||||
// get results
|
// get results
|
||||||
String message = status.getAttribute(DE.A_VALUE);
|
String message = status.getAttribute(DE.A_VALUE);
|
||||||
if (message.equals(PROCESS_MINER_SUCCESS)) return true;
|
if (message.equals(ISystemProcessRemoteConstants.PROCESS_MINER_SUCCESS)) return true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SystemMessage msg = getMessage("RSEPG1300"); //$NON-NLS-1$
|
SystemMessage msg = getMessage("RSEPG1300"); //$NON-NLS-1$
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.eclipse.rse.services.clientserver.NamePatternMatcher;
|
||||||
* To get the actual filter string back from objects of this class, just call {@link #toString()}.
|
* To get the actual filter string back from objects of this class, just call {@link #toString()}.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class HostProcessFilterImpl implements IHostProcessFilter, Cloneable, ISystemProcessRemoteConstants
|
public class HostProcessFilterImpl implements IHostProcessFilter, Cloneable
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String ALL = "*"; //$NON-NLS-1$
|
public static final String ALL = "*"; //$NON-NLS-1$
|
||||||
|
@ -72,9 +72,9 @@ public class HostProcessFilterImpl implements IHostProcessFilter, Cloneable, ISy
|
||||||
protected void initStates()
|
protected void initStates()
|
||||||
{
|
{
|
||||||
states = new HashMap();
|
states = new HashMap();
|
||||||
for (int i = 0; i < ALL_STATES_STR.length; i++)
|
for (int i = 0; i < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
|
||||||
{
|
{
|
||||||
states.put(ALL_STATES_STR[i], new Boolean(false));
|
states.put(ISystemProcessRemoteConstants.ALL_STATES_STR[i], new Boolean(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,10 +381,10 @@ public class HostProcessFilterImpl implements IHostProcessFilter, Cloneable, ISy
|
||||||
|
|
||||||
if (!anystatus)
|
if (!anystatus)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ALL_STATES_STR.length; i++)
|
for (int i = 0; i < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
|
||||||
{
|
{
|
||||||
Boolean currentState = (Boolean) states.get(ALL_STATES_STR[i]);
|
Boolean currentState = (Boolean) states.get(ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
|
||||||
if (currentState.booleanValue()) s = s + ALL_STATES_STR[i];
|
if (currentState.booleanValue()) s = s + ISystemProcessRemoteConstants.ALL_STATES_STR[i];
|
||||||
if (currentState.booleanValue()) s = s + ","; //$NON-NLS-1$
|
if (currentState.booleanValue()) s = s + ","; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
if (!s.trim().equals("")) s = s.trim(); //$NON-NLS-1$
|
if (!s.trim().equals("")) s = s.trim(); //$NON-NLS-1$
|
||||||
|
@ -406,34 +406,34 @@ public class HostProcessFilterImpl implements IHostProcessFilter, Cloneable, ISy
|
||||||
{
|
{
|
||||||
NamePatternMatcher matcher = null;
|
NamePatternMatcher matcher = null;
|
||||||
String[] tokens = status.split("\\|"); //$NON-NLS-1$
|
String[] tokens = status.split("\\|"); //$NON-NLS-1$
|
||||||
if (tokens.length < (PROCESS_ATTRIBUTES_COUNT -1)) return false;
|
if (tokens.length < (ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT -1)) return false;
|
||||||
|
|
||||||
matcher = new NamePatternMatcher(gid, true, false);
|
matcher = new NamePatternMatcher(gid, true, false);
|
||||||
if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_GID])) return false;
|
if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID])) return false;
|
||||||
|
|
||||||
matcher = new NamePatternMatcher(name, true, false);
|
matcher = new NamePatternMatcher(name, true, false);
|
||||||
if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_EXENAME])) return false;
|
if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME])) return false;
|
||||||
|
|
||||||
String state = tokens[PROCESS_ATTRIBUTES_INDEX_STATUS].trim();
|
String state = tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS].trim();
|
||||||
if (!satisfiesState(state)) return false;
|
if (!satisfiesState(state)) return false;
|
||||||
|
|
||||||
if (getUsername().equals("${user.id}")) //$NON-NLS-1$
|
if (getUsername().equals("${user.id}")) //$NON-NLS-1$
|
||||||
matcher = new NamePatternMatcher(ALL, true, false);
|
matcher = new NamePatternMatcher(ALL, true, false);
|
||||||
else
|
else
|
||||||
matcher = new NamePatternMatcher(getUsername(), true, false);
|
matcher = new NamePatternMatcher(getUsername(), true, false);
|
||||||
if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_USERNAME])) return false;
|
if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME])) return false;
|
||||||
matcher = new NamePatternMatcher(ppid, true, false);
|
matcher = new NamePatternMatcher(ppid, true, false);
|
||||||
if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_PPID])) return false;
|
if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID])) return false;
|
||||||
matcher = new NamePatternMatcher(pid, true, false);
|
matcher = new NamePatternMatcher(pid, true, false);
|
||||||
if (!matcher.matches(tokens[PROCESS_ATTRIBUTES_INDEX_PID])) return false;
|
if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID])) return false;
|
||||||
long vmSize = 0;
|
long vmSize = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
vmSize = Long.parseLong(tokens[PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
|
vmSize = Long.parseLong(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
if (tokens[PROCESS_ATTRIBUTES_INDEX_VMSIZE].trim().equals("")) vmSize = 0; //$NON-NLS-1$
|
if (tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE].trim().equals("")) vmSize = 0; //$NON-NLS-1$
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
if (!(vmSize >= minVM)) return false;
|
if (!(vmSize >= minVM)) return false;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
||||||
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
||||||
|
|
||||||
|
|
||||||
public class UniversalAIXProcessHandler implements ProcessHandler, ISystemProcessRemoteConstants
|
public class UniversalAIXProcessHandler implements ProcessHandler
|
||||||
{
|
{
|
||||||
private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","s","rss"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
|
private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","s","rss"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
|
||||||
private static final String firstColumnHeader = "PID"; //$NON-NLS-1$
|
private static final String firstColumnHeader = "PID"; //$NON-NLS-1$
|
||||||
|
@ -42,9 +42,9 @@ public class UniversalAIXProcessHandler implements ProcessHandler, ISystemProces
|
||||||
public UniversalAIXProcessHandler()
|
public UniversalAIXProcessHandler()
|
||||||
{
|
{
|
||||||
stateMap = new HashMap();
|
stateMap = new HashMap();
|
||||||
for (int i = STATE_STARTING_INDEX; i < STATE_ENDING_INDEX; i++)
|
for (int i = ISystemProcessRemoteConstants.STATE_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ENDING_INDEX; i++)
|
||||||
{
|
{
|
||||||
stateMap.put(new Character(ALL_STATES[i]), ALL_STATES_STR[i]);
|
stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ public class UniversalAIXProcessHandler implements ProcessHandler, ISystemProces
|
||||||
public IHostProcess kill(IHostProcess process, String type)
|
public IHostProcess kill(IHostProcess process, String type)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
if (type.equals(PROCESS_SIGNAL_TYPE_DEFAULT)) type = ""; //$NON-NLS-1$
|
if (type.equals(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT)) type = ""; //$NON-NLS-1$
|
||||||
else type = "-" + type; //$NON-NLS-1$
|
else type = "-" + type; //$NON-NLS-1$
|
||||||
// formulate command to send kill signal
|
// formulate command to send kill signal
|
||||||
String cmdLine = "kill " + type + " " + process.getPid(); //$NON-NLS-1$ //$NON-NLS-2$
|
String cmdLine = "kill " + type + " " + process.getPid(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
||||||
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
||||||
|
|
||||||
public class UniversalLinuxProcessHandler implements ProcessHandler, IServiceConstants, ISystemProcessRemoteConstants
|
public class UniversalLinuxProcessHandler implements ProcessHandler, IServiceConstants
|
||||||
{
|
{
|
||||||
|
|
||||||
protected HashMap _usernamesByUid;
|
protected HashMap _usernamesByUid;
|
||||||
|
@ -45,9 +45,9 @@ public class UniversalLinuxProcessHandler implements ProcessHandler, IServiceCon
|
||||||
public UniversalLinuxProcessHandler()
|
public UniversalLinuxProcessHandler()
|
||||||
{
|
{
|
||||||
stateMap = new HashMap();
|
stateMap = new HashMap();
|
||||||
for (int i = STATE_STARTING_INDEX; i < STATE_ENDING_INDEX; i++)
|
for (int i = ISystemProcessRemoteConstants.STATE_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ENDING_INDEX; i++)
|
||||||
{
|
{
|
||||||
stateMap.put(new Character(ALL_STATES[i]), ALL_STATES_STR[i]);
|
stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public class UniversalLinuxProcessHandler implements ProcessHandler, IServiceCon
|
||||||
*/
|
*/
|
||||||
public IHostProcess kill(IHostProcess process, String type) throws Exception
|
public IHostProcess kill(IHostProcess process, String type) throws Exception
|
||||||
{
|
{
|
||||||
if (type.equals(PROCESS_SIGNAL_TYPE_DEFAULT)) type = ""; //$NON-NLS-1$
|
if (type.equals(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT)) type = ""; //$NON-NLS-1$
|
||||||
else type = "-" + type; //$NON-NLS-1$
|
else type = "-" + type; //$NON-NLS-1$
|
||||||
// formulate command to send kill signal
|
// formulate command to send kill signal
|
||||||
String cmdLine = "kill " + type + " " + process.getPid(); //$NON-NLS-1$ //$NON-NLS-2$
|
String cmdLine = "kill " + type + " " + process.getPid(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
|
@ -22,27 +22,27 @@ import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConst
|
||||||
/**
|
/**
|
||||||
* @author mjberger
|
* @author mjberger
|
||||||
*/
|
*/
|
||||||
public class UniversalServerProcessImpl implements IRemoteServerProcess, IServiceConstants, ISystemProcessRemoteConstants
|
public class UniversalServerProcessImpl implements IRemoteServerProcess, IServiceConstants
|
||||||
{
|
{
|
||||||
protected Object[] _properties = new Object[PROCESS_ATTRIBUTES_COUNT+1];
|
protected Object[] _properties = new Object[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT+1];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a new UniversalServerProcessImpl with the default property set
|
* create a new UniversalServerProcessImpl with the default property set
|
||||||
*/
|
*/
|
||||||
public UniversalServerProcessImpl()
|
public UniversalServerProcessImpl()
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_COUNT] = " "; //set the label //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT] = " "; //set the label //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,18 +84,18 @@ public class UniversalServerProcessImpl implements IRemoteServerProcess, IServic
|
||||||
|
|
||||||
public void setPid(String pid)
|
public void setPid(String pid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPPid(String ppid)
|
public void setPPid(String ppid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name)
|
public void setName(String name)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -103,52 +103,52 @@ public class UniversalServerProcessImpl implements IRemoteServerProcess, IServic
|
||||||
*/
|
*/
|
||||||
public String getLabel()
|
public String getLabel()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_COUNT];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLabel(String label)
|
public void setLabel(String label)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_COUNT] = label;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT] = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setState(String state)
|
public void setState(String state)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTgid(String tgid)
|
public void setTgid(String tgid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTracerPid(String tracerpid)
|
public void setTracerPid(String tracerpid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUid(String uid)
|
public void setUid(String uid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsername(String username)
|
public void setUsername(String username)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGid(String gid)
|
public void setGid(String gid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVmSizeInKB(String size)
|
public void setVmSizeInKB(String size)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVmRSSInKB(String size)
|
public void setVmRSSInKB(String size)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = getLongAttribute(size, 0);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS] = getLongAttribute(size, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,33 +176,33 @@ public class UniversalServerProcessImpl implements IRemoteServerProcess, IServic
|
||||||
if (s != null && s.length() > 0)
|
if (s != null && s.length() > 0)
|
||||||
{
|
{
|
||||||
String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
|
String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
|
||||||
int numOfExpectedTokens = PROCESS_ATTRIBUTES_COUNT;
|
int numOfExpectedTokens = ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT;
|
||||||
int tokens = str.length;
|
int tokens = str.length;
|
||||||
if (tokens == numOfExpectedTokens)
|
if (tokens == numOfExpectedTokens)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
setPid(str[PROCESS_ATTRIBUTES_INDEX_PID]);
|
setPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]);
|
||||||
|
|
||||||
setName(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
setName(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
||||||
|
|
||||||
setTgid(str[PROCESS_ATTRIBUTES_INDEX_TGID]);
|
setTgid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]);
|
||||||
|
|
||||||
setPPid(str[PROCESS_ATTRIBUTES_INDEX_PPID]);
|
setPPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]);
|
||||||
|
|
||||||
setTracerPid(str[PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
|
setTracerPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
|
||||||
|
|
||||||
setUid(str[PROCESS_ATTRIBUTES_INDEX_UID]);
|
setUid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]);
|
||||||
|
|
||||||
setUsername(str[PROCESS_ATTRIBUTES_INDEX_USERNAME]);
|
setUsername(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME]);
|
||||||
|
|
||||||
setGid(str[PROCESS_ATTRIBUTES_INDEX_GID]);
|
setGid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]);
|
||||||
|
|
||||||
setVmSizeInKB(str[PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
|
setVmSizeInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
|
||||||
|
|
||||||
setVmRSSInKB(str[PROCESS_ATTRIBUTES_INDEX_VMRSS]);
|
setVmRSSInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS]);
|
||||||
|
|
||||||
setState(str[PROCESS_ATTRIBUTES_INDEX_STATUS]);
|
setState(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS]);
|
||||||
|
|
||||||
setLabel(getName());
|
setLabel(getName());
|
||||||
|
|
||||||
|
@ -217,47 +217,47 @@ public class UniversalServerProcessImpl implements IRemoteServerProcess, IServic
|
||||||
|
|
||||||
public long getPid()
|
public long getPid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getPPid()
|
public long getPPid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME];
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getState()
|
public String getState()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_INDEX_STATUS];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS];
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTgid()
|
public long getTgid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTracerPid()
|
public long getTracerPid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUid()
|
public long getUid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUsername()
|
public String getUsername()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME];
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getGid()
|
public long getGid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRoot()
|
public boolean isRoot()
|
||||||
|
@ -267,12 +267,12 @@ public class UniversalServerProcessImpl implements IRemoteServerProcess, IServic
|
||||||
|
|
||||||
public long getVmSizeInKB()
|
public long getVmSizeInKB()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getVmRSSInKB()
|
public long getVmRSSInKB()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -282,10 +282,10 @@ public class UniversalServerProcessImpl implements IRemoteServerProcess, IServic
|
||||||
public String getAllProperties()
|
public String getAllProperties()
|
||||||
{
|
{
|
||||||
String properties = ""; //$NON-NLS-1$
|
String properties = ""; //$NON-NLS-1$
|
||||||
for (int i = 0; i < PROCESS_ATTRIBUTES_COUNT; i++)
|
for (int i = 0; i < ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT; i++)
|
||||||
{
|
{
|
||||||
properties = properties + _properties[i].toString();
|
properties = properties + _properties[i].toString();
|
||||||
if (i != PROCESS_ATTRIBUTES_COUNT - 1)
|
if (i != ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT - 1)
|
||||||
properties = properties + TOKEN_SEPARATOR;
|
properties = properties + TOKEN_SEPARATOR;
|
||||||
}
|
}
|
||||||
return properties;
|
return properties;
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
|
import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
|
||||||
|
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
||||||
|
|
||||||
|
|
||||||
public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
|
public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
|
||||||
|
@ -38,9 +39,9 @@ public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
stateMap = new HashMap();
|
stateMap = new HashMap();
|
||||||
for (int i = STATE_ZOS_STARTING_INDEX; i < STATE_ZOS_ENDING_INDEX; i++)
|
for (int i = ISystemProcessRemoteConstants.STATE_ZOS_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ZOS_ENDING_INDEX; i++)
|
||||||
{
|
{
|
||||||
stateMap.put(new Character(ALL_STATES[i]), ALL_STATES_STR[i]);
|
stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,27 +20,27 @@ import org.eclipse.rse.services.clientserver.IServiceConstants;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
||||||
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
||||||
|
|
||||||
public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISystemProcessRemoteConstants
|
public class AbstractHostProcess implements IHostProcess, IServiceConstants
|
||||||
{
|
{
|
||||||
protected Object[] _properties = new Object[PROCESS_ATTRIBUTES_COUNT+1];
|
protected Object[] _properties = new Object[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT+1];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create a new AbstractHostProcess with the default property set
|
* create a new AbstractHostProcess with the default property set
|
||||||
*/
|
*/
|
||||||
public AbstractHostProcess()
|
public AbstractHostProcess()
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
|
||||||
_properties[PROCESS_ATTRIBUTES_COUNT] = " "; //set the label //$NON-NLS-1$
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT] = " "; //set the label //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,18 +85,18 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
|
||||||
|
|
||||||
public void setPid(String pid)
|
public void setPid(String pid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPPid(String ppid)
|
public void setPPid(String ppid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name)
|
public void setName(String name)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -104,52 +104,52 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
|
||||||
*/
|
*/
|
||||||
public String getLabel()
|
public String getLabel()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_COUNT];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLabel(String label)
|
public void setLabel(String label)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_COUNT] = label;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT] = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setState(String state)
|
public void setState(String state)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTgid(String tgid)
|
public void setTgid(String tgid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTracerPid(String tracerpid)
|
public void setTracerPid(String tracerpid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUid(String uid)
|
public void setUid(String uid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsername(String username)
|
public void setUsername(String username)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGid(String gid)
|
public void setGid(String gid)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVmSizeInKB(String size)
|
public void setVmSizeInKB(String size)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVmRSSInKB(String size)
|
public void setVmRSSInKB(String size)
|
||||||
{
|
{
|
||||||
_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = getLongAttribute(size, 0);
|
_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS] = getLongAttribute(size, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -180,33 +180,33 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
|
||||||
if (s != null && s.length() > 0)
|
if (s != null && s.length() > 0)
|
||||||
{
|
{
|
||||||
String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
|
String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
|
||||||
int numOfExpectedTokens = PROCESS_ATTRIBUTES_COUNT;
|
int numOfExpectedTokens = ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT;
|
||||||
int tokens = str.length;
|
int tokens = str.length;
|
||||||
if (tokens == numOfExpectedTokens)
|
if (tokens == numOfExpectedTokens)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
setPid(str[PROCESS_ATTRIBUTES_INDEX_PID]);
|
setPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]);
|
||||||
|
|
||||||
setName(str[PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
setName(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME]);
|
||||||
|
|
||||||
setTgid(str[PROCESS_ATTRIBUTES_INDEX_TGID]);
|
setTgid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]);
|
||||||
|
|
||||||
setPPid(str[PROCESS_ATTRIBUTES_INDEX_PPID]);
|
setPPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]);
|
||||||
|
|
||||||
setTracerPid(str[PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
|
setTracerPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
|
||||||
|
|
||||||
setUid(str[PROCESS_ATTRIBUTES_INDEX_UID]);
|
setUid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]);
|
||||||
|
|
||||||
setUsername(str[PROCESS_ATTRIBUTES_INDEX_USERNAME]);
|
setUsername(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME]);
|
||||||
|
|
||||||
setGid(str[PROCESS_ATTRIBUTES_INDEX_GID]);
|
setGid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]);
|
||||||
|
|
||||||
setVmSizeInKB(str[PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
|
setVmSizeInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
|
||||||
|
|
||||||
setVmRSSInKB(str[PROCESS_ATTRIBUTES_INDEX_VMRSS]);
|
setVmRSSInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS]);
|
||||||
|
|
||||||
setState(str[PROCESS_ATTRIBUTES_INDEX_STATUS]);
|
setState(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS]);
|
||||||
|
|
||||||
setLabel(getName());
|
setLabel(getName());
|
||||||
|
|
||||||
|
@ -221,47 +221,47 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
|
||||||
|
|
||||||
public long getPid()
|
public long getPid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getPPid()
|
public long getPPid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME];
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getState()
|
public String getState()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_INDEX_STATUS];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS];
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTgid()
|
public long getTgid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTracerPid()
|
public long getTracerPid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUid()
|
public long getUid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUsername()
|
public String getUsername()
|
||||||
{
|
{
|
||||||
return (String) _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME];
|
return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME];
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getGid()
|
public long getGid()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRoot()
|
public boolean isRoot()
|
||||||
|
@ -271,12 +271,12 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
|
||||||
|
|
||||||
public long getVmSizeInKB()
|
public long getVmSizeInKB()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getVmRSSInKB()
|
public long getVmRSSInKB()
|
||||||
{
|
{
|
||||||
return ((Long)_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS]).longValue();
|
return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS]).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -288,10 +288,10 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
|
||||||
public String getAllProperties()
|
public String getAllProperties()
|
||||||
{
|
{
|
||||||
String properties = ""; //$NON-NLS-1$
|
String properties = ""; //$NON-NLS-1$
|
||||||
for (int i = 0; i < PROCESS_ATTRIBUTES_COUNT; i++)
|
for (int i = 0; i < ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT; i++)
|
||||||
{
|
{
|
||||||
properties = properties + _properties[i].toString();
|
properties = properties + _properties[i].toString();
|
||||||
if (i != PROCESS_ATTRIBUTES_COUNT - 1)
|
if (i != ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT - 1)
|
||||||
properties = properties + TOKEN_SEPARATOR;
|
properties = properties + TOKEN_SEPARATOR;
|
||||||
}
|
}
|
||||||
return properties;
|
return properties;
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
|
||||||
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
|
|
||||||
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
|
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
|
||||||
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
|
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
|
||||||
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
|
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
|
||||||
|
@ -36,7 +35,7 @@ import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSyst
|
||||||
* @author mjberger
|
* @author mjberger
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteConstants
|
public class RemoteProcessImpl implements IRemoteProcess
|
||||||
{
|
{
|
||||||
public static final char CONNECTION_DELIMITER = ':';
|
public static final char CONNECTION_DELIMITER = ':';
|
||||||
protected IRemoteProcessContext _context;
|
protected IRemoteProcessContext _context;
|
||||||
|
|
|
@ -33,7 +33,7 @@ import org.eclipse.rse.services.shells.IShellService;
|
||||||
* Helper class that helps to get state code and user name info most of the code
|
* Helper class that helps to get state code and user name info most of the code
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class LinuxProcessHelper implements ISystemProcessRemoteConstants {
|
public class LinuxProcessHelper {
|
||||||
private HashMap stateMap;
|
private HashMap stateMap;
|
||||||
|
|
||||||
private HashMap _usernamesByUid;
|
private HashMap _usernamesByUid;
|
||||||
|
@ -48,8 +48,8 @@ public class LinuxProcessHelper implements ISystemProcessRemoteConstants {
|
||||||
public LinuxProcessHelper() {
|
public LinuxProcessHelper() {
|
||||||
super();
|
super();
|
||||||
stateMap = new HashMap();
|
stateMap = new HashMap();
|
||||||
for (int i = STATE_STARTING_INDEX; i < STATE_ENDING_INDEX; i++) {
|
for (int i = ISystemProcessRemoteConstants.STATE_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ENDING_INDEX; i++) {
|
||||||
stateMap.put(new Character(ALL_STATES[i]), ALL_STATES_STR[i]);
|
stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue