From be5b092695e4708fe962e852815866e6603ea429 Mon Sep 17 00:00:00 2001
From: Martin Oberhuber < martin.oberhuber@windriver.com>
Date: Fri, 25 Aug 2006 09:11:51 +0000
Subject: [PATCH] [cleanup] Fix javadoc errors
---
.../processes/AbstractHostProcess.java | 30 ++++++++++++-------
.../processes/AbstractProcessService.java | 12 +++++---
.../services/processes/IProcessService.java | 26 +++++++++++++---
3 files changed, 49 insertions(+), 19 deletions(-)
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java
index 2b723d36525..a77438f5321 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java
@@ -29,23 +29,26 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
*/
public AbstractHostProcess()
{
- _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = " ";
+ _properties[PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
_properties[PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
_properties[PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
_properties[PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" ");
+ _properties[PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
_properties[PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
_properties[PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
_properties[PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = " ";
+ _properties[PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
_properties[PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
_properties[PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
- _properties[PROCESS_ATTRIBUTES_COUNT] = " "; //set the label
+ _properties[PROCESS_ATTRIBUTES_COUNT] = " "; //set the label //$NON-NLS-1$
}
/**
* create a new AbstractHostProcess with initial Attributes.
- * This is equivalent to constructing the object, then calling setAllProperties(initialAttributes)
+ * This is equivalent to constructing the object, then calling
+ * setAllProperties(initialAttributes).
+ * @param initialAttributes String of initial attributes
+ * @see #setAllProperties(String)
*/
public AbstractHostProcess(String initialAttributes)
{
@@ -150,9 +153,11 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
}
/**
- * You can also set all attributes at once with your own string passed as a parameter, as long
- * as the string is in the same format as outlined below (pass in null to use the DataElement's string):
- *
The string contains properties of the object in the following order
+ * This method allows to set all attributes at once with your own string
+ * passed as a parameter, as long as the string is in the same format as
+ * outlined below (pass in null to use the DataElement's string).
+ *
The string contains properties of the object in the following order,
+ * separated by {@link IServiceConstants#TOKEN_SEPARATOR}:
*
* - Process Id (pid) - long
*
- Executable name - String
@@ -166,6 +171,7 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
*
- VM Size - long
*
- VM RSS - long
*
+ * @param allProperties Property String as defined above
*/
public void setAllProperties(String allProperties)
{
@@ -173,7 +179,7 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
if (s != null && s.length() > 0)
{
- String[] str = s.split("\\"+TOKEN_SEPARATOR);
+ String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$
int numOfExpectedTokens = PROCESS_ATTRIBUTES_COUNT;
int tokens = str.length;
if (tokens == numOfExpectedTokens)
@@ -275,11 +281,13 @@ public class AbstractHostProcess implements IHostProcess, IServiceConstants, ISy
/**
* Return all the properties of this data structure in one string.
- * Properties are separated by IUniversalDataStoreConstants.TOKEN_SEPARATOR;
+ * Properties are separated by {@link IServiceConstants#TOKEN_SEPARATOR}.
+ * @see #setAllProperties(String)
+ * @return String of Properties
*/
public String getAllProperties()
{
- String properties = "";
+ String properties = ""; //$NON-NLS-1$
for (int i = 0; i < PROCESS_ATTRIBUTES_COUNT; i++)
{
properties = properties + _properties[i].toString();
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
index 7ddbbbca6da..48d436bb452 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
@@ -41,7 +41,11 @@ public abstract class AbstractProcessService implements IProcessService
}
/**
- * At this point there is only one root process, the 'init' process with pid 1
+ * Return a single IHostProcess object for the 'init' process with pid 1.
+ * @param monitor Progress monitor
+ * @return Array with 1 element, the IHostProcess object for the root process
+ * @throws SystemMessageException
+ * @see org.eclipse.rse.services.processes.IProcessService#listRootProcesses(org.eclipse.core.runtime.IProgressMonitor)
*/
public IHostProcess[] listRootProcesses(IProgressMonitor monitor) throws SystemMessageException
{
@@ -52,7 +56,7 @@ public abstract class AbstractProcessService implements IProcessService
public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID) throws SystemMessageException
{
- String pPidString = "" + parentPID;
+ String pPidString = "" + parentPID; //$NON-NLS-1$
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
rpfs.setPpid(pPidString);
@@ -61,7 +65,7 @@ public abstract class AbstractProcessService implements IProcessService
public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID, IHostProcessFilter filter) throws SystemMessageException
{
- String pPidString = "" + parentPID;
+ String pPidString = "" + parentPID; //$NON-NLS-1$
filter.setPpid(pPidString);
return listAllProcesses(monitor, filter);
@@ -74,7 +78,7 @@ public abstract class AbstractProcessService implements IProcessService
public IHostProcess getProcess(IProgressMonitor monitor, long PID) throws SystemMessageException
{
- String pidString = "" + PID;
+ String pidString = "" + PID; //$NON-NLS-1$
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
rpfs.setPid(pidString);
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
index 4c48a8437b6..04fe7f4a19e 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
@@ -36,28 +36,36 @@ public interface IProcessService extends IService
/**
* Return a list of all processes on the remote system.
* @param monitor A progress monitor to which progress will be reported
+ * @return List of all processes
+ * @throws SystemMessageException
*/
public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException;
/**
- * Return a list of all processes on the remote system.
+ * Return a filtered list of all processes on the remote system.
* @param monitor A progress monitor to which progress will be reported
* @param filter An object to filter results by
+ * @return Filtered list of processes
+ * @throws SystemMessageException
*/
public IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter) throws SystemMessageException;
/**
- * Return a list of all processes on the remote system.
+ * Return a filtered list of all processes on the remote system.
* @param monitor A progress monitor to which progress will be reported
* @param exeNameFilter The executable name to filter results by, or null if no exeName filtering
* @param userNameFilter The user name to filter results by, or null if no userName filtering
* @param stateFilter The state code to filter results by, or null if no state filtering
+ * @return Filtered list of processes
+ * @throws SystemMessageException
*/
public IHostProcess[] listAllProcesses(IProgressMonitor monitor, String exeNameFilter, String userNameFilter, String stateFilter) throws SystemMessageException;
/**
* Returns root processes on the remote system
* @param monitor A progress monitor to which progress will be reported
+ * @return List of root processes
+ * @throws SystemMessageException
*/
public IHostProcess[] listRootProcesses(IProgressMonitor monitor) throws SystemMessageException;
@@ -65,14 +73,18 @@ public interface IProcessService extends IService
* Return a list of all remote child processes of the given parent process on the remote system
* @param monitor A progress monitor to which progress will be reported
* @param parentPID The ID of the parent process whose children are to be listed
+ * @return List of child processes
+ * @throws SystemMessageException
*/
public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID) throws SystemMessageException;
/**
- * Return a list of all remote child processes of the given parent process on the remote system
+ * Return a filtered list of remote child processes of the given parent process on the remote system
* @param monitor A progress monitor to which progress will be reported
* @param parentPID The ID of the parent process whose children are to be listed
* @param filter A filter to narrow results by
+ * @return Filtered list of child processes
+ * @throws SystemMessageException
*/
public IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID, IHostProcessFilter filter) throws SystemMessageException;
@@ -80,6 +92,8 @@ public interface IProcessService extends IService
* Given a process, return its parent process object.
* @param monitor A progress monitor to which progress will be reported
* @param PID the ID of the process to return parent of.
+ * @return The parent process
+ * @throws SystemMessageException
*/
public IHostProcess getParentProcess(IProgressMonitor monitor, long PID) throws SystemMessageException;
@@ -87,6 +101,8 @@ public interface IProcessService extends IService
* Given a pid, return an IHostProcess object for it.
* @param monitor A progress monitor to which progress will be reported
* @param PID The process ID of the desired process
+ * @return IHostProcess object for the given pid
+ * @throws SystemMessageException
*/
public IHostProcess getProcess(IProgressMonitor monitor, long PID) throws SystemMessageException;
@@ -95,7 +111,9 @@ public interface IProcessService extends IService
* @param monitor A progress monitor to which progress will be reported
* @param PID the ID of the process to be killed.
* @param signal the signal to send to the process
- * @return false if the given process doesn't exist, else true. Throws an exception if anything fails.
+ * @return false
if the given process doesn't exist, else true
.
+ * Throws an exception if anything fails.
+ * @throws SystemMessageException
*/
public boolean kill(IProgressMonitor monitor, long PID, String signal) throws SystemMessageException;