RSE
Release 1.0

org.eclipse.rse.services.dstore.processes
Class DStoreProcessService

java.lang.Object
  extended byorg.eclipse.rse.services.processes.AbstractProcessService
      extended byorg.eclipse.rse.services.dstore.processes.DStoreProcessService
All Implemented Interfaces:
IProcessService, IService, ISystemProcessRemoteConstants, IUniversalProcessDataStoreConstants

public class DStoreProcessService
extends AbstractProcessService
implements IProcessService, IUniversalProcessDataStoreConstants, ISystemProcessRemoteConstants


Field Summary
protected  org.eclipse.dstore.core.model.DataElement _minerElement
           
protected  org.eclipse.dstore.core.model.DataElement _procMinerStatus
           
protected  org.eclipse.dstore.core.model.IDataStoreProvider _provider
           
protected  DStoreStatusMonitor _statusMonitor
           
protected  String[] _statusTypes
           
protected  String _userName
           
 
Fields inherited from interface org.eclipse.rse.dstore.universal.miners.processes.IUniversalProcessDataStoreConstants
C_PROCESS_FILTER_QUERY_ALL, C_PROCESS_KILL, C_PROCESS_QUERY_ALL_PROPERTIES, C_PROCESS_QUERY_USERNAME, UNIVERSAL_PROCESS_DESCRIPTOR, UNIVERSAL_PROCESS_FILTER, UNIVERSAL_PROCESS_MINER, UNIVERSAL_PROCESS_ROOT, UNIVERSAL_PROCESS_TEMP
 
Fields inherited from interface org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants
ALL_STATES, ALL_STATES_STR, PROCESS_ATTRIBUTES_COUNT, PROCESS_ATTRIBUTES_INDEX_EXENAME, PROCESS_ATTRIBUTES_INDEX_GID, PROCESS_ATTRIBUTES_INDEX_PID, PROCESS_ATTRIBUTES_INDEX_PPID, PROCESS_ATTRIBUTES_INDEX_STATUS, PROCESS_ATTRIBUTES_INDEX_TGID, PROCESS_ATTRIBUTES_INDEX_TRACERPID, PROCESS_ATTRIBUTES_INDEX_UID, PROCESS_ATTRIBUTES_INDEX_USERNAME, PROCESS_ATTRIBUTES_INDEX_VMRSS, PROCESS_ATTRIBUTES_INDEX_VMSIZE, PROCESS_MINER_ERROR_NO_HANDLER, PROCESS_MINER_SUCCESS, PROCESS_SIGNAL_TYPE_DEFAULT, STATE_ACTIVE, STATE_ACTIVE_INDEX, STATE_ENDING_INDEX, STATE_IDLE, STATE_IDLE_INDEX, STATE_NONEXISTENT, STATE_NONEXISTENT_INDEX, STATE_PAGING, STATE_PAGING_INDEX, STATE_RUNNING, STATE_RUNNING_INDEX, STATE_SLEEPING, STATE_SLEEPING_INDEX, STATE_STARTING_INDEX, STATE_TRACED, STATE_TRACED_INDEX, STATE_WAITING, STATE_WAITING_INDEX, STATE_ZOMBIE, STATE_ZOMBIE_INDEX, STATE_ZOS_ASYNCHRONOUSTHREAD, STATE_ZOS_ASYNCHRONOUSTHREAD_INDEX, STATE_ZOS_CANCELLED, STATE_ZOS_CANCELLED_INDEX, STATE_ZOS_COMSYSKERNELWAIT, STATE_ZOS_COMSYSKERNELWAIT_INDEX, STATE_ZOS_DETACHED, STATE_ZOS_DETACHED_INDEX, STATE_ZOS_ENDING_INDEX, STATE_ZOS_FILESYSKERNELWAIT, STATE_ZOS_FILESYSKERNELWAIT_INDEX, STATE_ZOS_FORKING, STATE_ZOS_FORKING_INDEX, STATE_ZOS_INITIALPROCESSTHREAD, STATE_ZOS_INITIALPROCESSTHREAD_INDEX, STATE_ZOS_MEDIUMWEIGHTTHREAD, STATE_ZOS_MEDIUMWEIGHTTHREAD_INDEX, STATE_ZOS_MSGQRECEIVEWAIT, STATE_ZOS_MSGQRECEIVEWAIT_INDEX, STATE_ZOS_MSGQSENDWAIT, STATE_ZOS_MSGQSENDWAIT_INDEX, STATE_ZOS_MULTITHREAD, STATE_ZOS_MULTITHREAD_INDEX, STATE_ZOS_MVSPAUSEWAIT, STATE_ZOS_MVSPAUSEWAIT_INDEX, STATE_ZOS_MVSWAIT, STATE_ZOS_MVSWAIT_INDEX, STATE_ZOS_OTHERKERNELWAIT, STATE_ZOS_OTHERKERNELWAIT_INDEX, STATE_ZOS_PTHREADCREATED, STATE_ZOS_PTHREADCREATED_INDEX, STATE_ZOS_PTHREADCREATEDTASKS, STATE_ZOS_PTHREADCREATEDTASKS_INDEX, STATE_ZOS_PTRACEKERNELWAIT, STATE_ZOS_PTRACEKERNELWAIT_INDEX, STATE_ZOS_QUIESCEFROZEN, STATE_ZOS_QUIESCEFROZEN_INDEX, STATE_ZOS_RUNNING, STATE_ZOS_RUNNING_INDEX, STATE_ZOS_SEMAPHOREWAIT, STATE_ZOS_SEMAPHOREWAIT_INDEX, STATE_ZOS_SINGLE, STATE_ZOS_SINGLE_INDEX, STATE_ZOS_SLEEPING, STATE_ZOS_SLEEPING_INDEX, STATE_ZOS_STARTING_INDEX, STATE_ZOS_STOPPED, STATE_ZOS_STOPPED_INDEX, STATE_ZOS_SWAPPEDOUT, STATE_ZOS_SWAPPEDOUT_INDEX, STATE_ZOS_WAITINGFORCHILD, STATE_ZOS_WAITINGFORCHILD_INDEX, STATE_ZOS_ZOMBIE, STATE_ZOS_ZOMBIE_INDEX
 
Constructor Summary
DStoreProcessService(org.eclipse.dstore.core.model.IDataStoreProvider provider)
           
 
Method Summary
protected  IHostProcess[] convertObjsToHostProcesses(IHostProcessFilter processFilter, Object[] objs)
          Helper method to convert DataElement objects to IRemoteClientProcess objects.
protected  org.eclipse.dstore.core.model.DataStore getDataStore()
          Helper method to return the DataStore object needed by comm layer.
 String getDescription()
           
protected  org.eclipse.dstore.core.model.DataElement getMinerElement()
           
protected  String getMinerId()
           
 String getName()
           
protected  String getProcessMinerId()
           
 String getRemoteUserName()
          Get the username used to connect to the remote machine
 int getServerMinor()
           
 int getServerVersion()
           
 String[] getSignalTypes()
          Returns a list of the types of signals that can be sent to a process on the remote system.
protected  org.eclipse.dstore.core.model.DataElement getSignalTypesMinerElement()
           
 DStoreStatusMonitor getStatusMonitor(org.eclipse.dstore.core.model.DataStore dataStore)
           
protected  void initMiner(IProgressMonitor monitor)
           
 void initService(IProgressMonitor monitor)
           
 boolean isInitialized()
           
 boolean kill(IProgressMonitor monitor, long PID, String signal)
          Kills a process.
 IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter)
          Return a filtered list of all processes on the remote system.
 void uninitService(IProgressMonitor monitor)
           
protected  void waitForInitialize(IProgressMonitor monitor)
           
 
Methods inherited from class org.eclipse.rse.services.processes.AbstractProcessService
getMessage, getParentProcess, getProcess, listAllProcesses, listAllProcesses, listChildProcesses, listChildProcesses, listRootProcesses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.services.processes.IProcessService
getParentProcess, getProcess, listAllProcesses, listAllProcesses, listChildProcesses, listChildProcesses, listRootProcesses
 
Methods inherited from interface org.eclipse.rse.services.IService
getMessage
 

Field Detail

_provider

protected org.eclipse.dstore.core.model.IDataStoreProvider _provider

_minerElement

protected org.eclipse.dstore.core.model.DataElement _minerElement

_statusMonitor

protected DStoreStatusMonitor _statusMonitor

_procMinerStatus

protected org.eclipse.dstore.core.model.DataElement _procMinerStatus

_statusTypes

protected String[] _statusTypes

_userName

protected String _userName
Constructor Detail

DStoreProcessService

public DStoreProcessService(org.eclipse.dstore.core.model.IDataStoreProvider provider)
Method Detail

getName

public String getName()
Specified by:
getName in interface IService

getDescription

public String getDescription()
Specified by:
getDescription in interface IService

listAllProcesses

public IHostProcess[] listAllProcesses(IProgressMonitor monitor,
                                       IHostProcessFilter filter)
                                throws SystemMessageException
Description copied from interface: IProcessService
Return a filtered list of all processes on the remote system.

Specified by:
listAllProcesses in interface IProcessService
Parameters:
monitor - A progress monitor to which progress will be reported
filter - An object to filter results by
Returns:
Filtered list of processes
Throws:
SystemMessageException

convertObjsToHostProcesses

protected IHostProcess[] convertObjsToHostProcesses(IHostProcessFilter processFilter,
                                                    Object[] objs)
Helper method to convert DataElement objects to IRemoteClientProcess objects.


getDataStore

protected org.eclipse.dstore.core.model.DataStore getDataStore()
Helper method to return the DataStore object needed by comm layer.


getMinerElement

protected org.eclipse.dstore.core.model.DataElement getMinerElement()

getStatusMonitor

public DStoreStatusMonitor getStatusMonitor(org.eclipse.dstore.core.model.DataStore dataStore)

kill

public boolean kill(IProgressMonitor monitor,
                    long PID,
                    String signal)
             throws SystemMessageException
Description copied from interface: IProcessService
Kills a process.

Specified by:
kill in interface IProcessService
Parameters:
monitor - A progress monitor to which progress will be reported
PID - the ID of the process to be killed.
signal - the signal to send to the process
Returns:
false if the given process doesn't exist, else true. Throws an exception if anything fails.
Throws:
SystemMessageException

getSignalTypes

public String[] getSignalTypes()
Description copied from interface: IProcessService
Returns a list of the types of signals that can be sent to a process on the remote system.

Specified by:
getSignalTypes in interface IProcessService
Returns:
the signal types, or null if there are none, or they cannot be found.

getSignalTypesMinerElement

protected org.eclipse.dstore.core.model.DataElement getSignalTypesMinerElement()

initService

public void initService(IProgressMonitor monitor)
Specified by:
initService in interface IService

uninitService

public void uninitService(IProgressMonitor monitor)
Specified by:
uninitService in interface IService

isInitialized

public boolean isInitialized()

waitForInitialize

protected void waitForInitialize(IProgressMonitor monitor)

initMiner

protected void initMiner(IProgressMonitor monitor)

getRemoteUserName

public String getRemoteUserName()
Get the username used to connect to the remote machine


getMinerId

protected String getMinerId()

getServerVersion

public int getServerVersion()

getServerMinor

public int getServerMinor()

getProcessMinerId

protected String getProcessMinerId()

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.