Class PIDHelper
- java.lang.Object
-
- com.levigo.jadice.server.msoffice.processid.PIDHelper
-
public class PIDHelper extends Object
Helper class to find all PIDs for a given Converter. This class respects that some processes with the same name might run even before this converter starts. Therefore the methodinitBeforeStart()
must be called afore.
-
-
Constructor Summary
Constructors Constructor Description PIDHelper(CommandReceiver converter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
assembleCommandString(Collection<Integer> pids)
Concatenate all PIDs with a pipe sign (|)static Collection<Integer>
disassembleCommandString(String assembledPids)
Collection<Integer>
findPIDs()
void
initBeforeStart()
-
-
-
Constructor Detail
-
PIDHelper
public PIDHelper(CommandReceiver converter)
-
-
Method Detail
-
initBeforeStart
public void initBeforeStart()
-
findPIDs
public Collection<Integer> findPIDs()
-
assembleCommandString
public static String assembleCommandString(Collection<Integer> pids)
Concatenate all PIDs with a pipe sign (|)- Parameters:
pids
-- Returns:
- all PIDs concatenated as one string
-
disassembleCommandString
public static Collection<Integer> disassembleCommandString(String assembledPids) throws NumberFormatException
- Throws:
NumberFormatException
-
-