|
RSE Release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.rse.core.model.RSEPersistableObject
org.eclipse.rse.core.model.PropertySetContainer
org.eclipse.rse.core.model.RSEModelObject
org.eclipse.rse.core.subsystems.SubSystem
org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl
Default implementation of the IRemoteProcessSubSystem interface.
Some of the methods are simply convenience methods - these are implemented here, whereas the real work takes place in the ProcessServiceSubSystem.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.rse.core.subsystems.SubSystem |
SubSystem.ChangeStatusJob, SubSystem.ConnectJob, SubSystem.DisconnectJob, SubSystem.DisplayErrorMessageJob, SubSystem.GetPropertiesJob, SubSystem.GetPropertyJob, SubSystem.ResolveAbsoluteJob, SubSystem.ResolveAbsolutesJob, SubSystem.ResolveRelativeJob, SubSystem.SetPropertiesJob, SubSystem.SetPropertyJob, SubSystem.SubSystemOperationJob, SubSystem.SystemMessageDialogRunnable |
| Field Summary |
| Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
NO_CHILDREN |
| Constructor Summary | |
RemoteProcessSubSystemImpl(IHost host,
IConnectorService connectorService)
|
|
| Method Summary | |
void |
communicationsStateChange(CommunicationsEvent e)
This method is invoked whenever the communications state is invoked immediately before and after the state of the communications changes. |
Object |
getObjectWithAbsoluteName(String key,
IProgressMonitor monitor)
Return the remote object that corresponds to the specified unique ID. |
IRemoteProcess |
getParentProcess(IRemoteProcess process)
Given a process, return its parent process object. |
IRemoteProcessSubSystemConfiguration |
getParentRemoteProcessSubSystemConfiguration()
Return parent subsystem factory, cast to a RemoteProcessSubSystemConfiguration |
void |
initializeSubSystem(IProgressMonitor monitor)
Called on each subsystem associated with a particular IConnectorService after it connects successfully. |
protected Object[] |
internalResolveFilterString(String filterString,
IProgressMonitor monitor)
Resolve an absolute filter string. |
boolean |
isCaseSensitive()
Return true if names are case-sensitive. |
boolean |
isPassiveCommunicationsListener()
This method determines if the communications listener is a passive or active listener. |
IRemoteProcess[] |
listRoots(IRemoteProcessContext context,
IProgressMonitor monitor)
At this point there is only one root process, the 'init' process with pid 1 |
void |
uninitializeSubSystem(IProgressMonitor monitor)
Called on each subsystem associated with a particular IConnectorService after it disconnects |
| Methods inherited from class org.eclipse.rse.core.model.RSEModelObject |
getDescription |
| Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer |
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from class org.eclipse.rse.core.model.RSEPersistableObject |
compareStrings, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| 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.subsystems.processes.core.subsystem.IRemoteProcessSubSystem |
getRemoteProcessObject, getSignalTypes, kill, listAllProcesses, listChildProcesses, listChildProcesses |
| Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectResolver |
getObjectWithAbsoluteName |
| Methods inherited from interface org.eclipse.core.runtime.jobs.ISchedulingRule |
contains, isConflicting |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEModelObject |
getDescription |
| Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer |
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| Constructor Detail |
public RemoteProcessSubSystemImpl(IHost host,
IConnectorService connectorService)
| Method Detail |
public IRemoteProcessSubSystemConfiguration getParentRemoteProcessSubSystemConfiguration()
IRemoteProcessSubSystem
getParentRemoteProcessSubSystemConfiguration in interface IRemoteProcessSubSystempublic boolean isCaseSensitive()
IRemoteProcessSubSystem
isCaseSensitive in interface IRemoteProcessSubSystempublic void communicationsStateChange(CommunicationsEvent e)
ICommunicationsListener
communicationsStateChange in interface ICommunicationsListenerpublic void initializeSubSystem(IProgressMonitor monitor)
ISubSystemIConnectorService after it connects successfully. This call is
always made on a background Thread, so it's allowed to be long-running.
initializeSubSystem in interface ISubSysteminitializeSubSystem in class SubSystemmonitor - a progress monitor that can be used to show progress
during long-running operation. Cancellation is typically not
supported since it might leave the system in an inconsistent
state.public void uninitializeSubSystem(IProgressMonitor monitor)
ISubSystemIConnectorService after it disconnects
uninitializeSubSystem in interface ISubSystemuninitializeSubSystem in class SubSystemmonitor - a progress monitor that can be used to show progress
during long-running operation. Cancellation is typically not
supported since it might leave the system in an inconsistent
state.public IRemoteProcess getParentProcess(IRemoteProcess process)
IRemoteProcessSubSystem
getParentProcess in interface IRemoteProcessSubSystemprocess - the process to return parent of.
protected Object[] internalResolveFilterString(String filterString,
IProgressMonitor monitor)
throws InvocationTargetException,
InterruptedException
SubSystemSubSystemConfiguration.supportsFilters(),
which is the default. Otherwise, SubSystem.getChildren()
is called when the subsystem itself is expanded.
When a user expands a filter this method is invoked for each filter string and the
results are concatenated and displayed to the user. You can affect the post-concatenated
result by overriding SubSystem.sortResolvedFilterStringObjects(Object[]) if you desire to
sort the result, say, or pick our redundancies.
The resulting objects are displayed in the tree in the Remote System view.
There are two requirements on the returned objects:
IAdaptable.
remote-adapter registered
for the object's class or interface type. Further, if this subsystem is visible
in the RSE, which is the default, then there must also be an RSE GUI-adapter registered
with the platform. The base class implementation of this interface is AbstractSystemViewAdapter.
A good place to start with your remote-resource classes to subclasss AbstractResource, as it
already implements IAdaptable, and maintains a reference to this owning subsystem, which helps when
implementing the remote-adapter.
Be sure to register your adapter factory in your plugin's startup method.
Actually resolve an absolute filter string. This is called by the run(IProgressMonitor monitor) method, which in turn is called by resolveFilterString.
As per IRunnableWithProgress rules:
internalResolveFilterString in class SubSystemInvocationTargetException
InterruptedException
public IRemoteProcess[] listRoots(IRemoteProcessContext context,
IProgressMonitor monitor)
listRoots in interface IRemoteProcessSubSystemcontext - A context object that will be associated with each returned processmonitor - the progress monitorpublic boolean isPassiveCommunicationsListener()
ICommunicationsListener
isPassiveCommunicationsListener in interface ICommunicationsListener
public Object getObjectWithAbsoluteName(String key,
IProgressMonitor monitor)
throws Exception
IRemoteObjectResolver
This must be implemented by subsystems in order to find remote objects
for drag and drop, clipboard, and other object retrieval mechanisms in
support of remote objects. It is the functional opposite of
IRemoteObjectIdentifier.getAbsoluteName(Object).
Because each subsystem maintains it's own objects, it is the
responsibility of the subsystem to determine how an ID (or key) for a
given object maps to the real object. Subsystems also need to ensure that
objects of different type (such as filters, actual resources or error
messages) all have different IDs. See
IRemoteObjectIdentifier.getAbsoluteName(Object) for an example.
In case a cached copy of remote object is available locally, this method will not contact the remote side in order to check whether the cached copy is up-to-date. Clients are responsible themselves for refreshing the remote object when they think it is necessary.
In case a cached local copy is not available, the remote system may be
contacted to retrieve the remote object. In this case, this call may be a
long-running operation and may throw an exception. Note, however, that
since keys used as IDs are generated by a remote object adapter that
implements IRemoteObjectIdentifier, a cached copy of the remote
object will typically be in memory from generating the key. A notable
exception to this case is when the system view is restored to its
previous state during startup.
Uniqueness and Multiple Contexts
The RSE
SystemView allows the same remote object to be displayed in multiple
different contexts, i.e. under multiple different filters. In this case,
each occurrence of the same object must return the same absolute name.
For the reverse mapping, however, this method may return only one context
object even though multiple different ones are shown in the SystemView.
getObjectWithAbsoluteName in interface IRemoteObjectResolvergetObjectWithAbsoluteName in class SubSystemkey - the unique id of the remote object. Must not be
null.monitor - the progress monitor
null if no object is
found with the given id.
Exception - in case an error occurs contacting the remote system
while retrieving the requested remote object. Extenders are
encouraged to throw SystemMessageException in order to
support good user feedback in case of errors. Since exceptions
should only occur while retrieving new remote objects during
startup, clients are typically allowed to ignore these exceptions
and treat them as if the remote object were simply not there.getObjectWithAbsoluteName(String, IProgressMonitor)
|
RSE Release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||