|
RSE Release 3.3 |
|||||||||
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
public abstract class 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/interfaces 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)
Initialize this subsystem instance after the corresponding IConnectorService connect method finishes. |
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)
Uninitialize this subsystem just after disconnect. |
Methods inherited from class org.eclipse.rse.core.model.RSEModelObject |
---|
getDescription |
Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer |
---|
addPropertySet, addPropertySets, clonePropertySets, 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, clonePropertySets, 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 IRemoteProcessSubSystem
public boolean isCaseSensitive()
IRemoteProcessSubSystem
isCaseSensitive
in interface IRemoteProcessSubSystem
public void communicationsStateChange(CommunicationsEvent e)
ICommunicationsListener
communicationsStateChange
in interface ICommunicationsListener
public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException
SubSystem
IConnectorService
connect method finishes. This method should be
overridden if any initialization for the subsystem needs to occur at this
time.
The default implementation currently does nothing, but overriding methods should call super before doing any other work.
initializeSubSystem
in interface ISubSystem
initializeSubSystem
in class SubSystem
monitor
- 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.
SystemMessageException
- if an error occurs during initialization.public void uninitializeSubSystem(IProgressMonitor monitor)
SubSystem
uninitializeSubSystem
in interface ISubSystem
uninitializeSubSystem
in class SubSystem
monitor
- 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 IRemoteProcessSubSystem
process
- the process to return parent of.protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
SubSystem
SubSystemConfiguration.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 SubSystem
InvocationTargetException
InterruptedException
public IRemoteProcess[] listRoots(IRemoteProcessContext context, IProgressMonitor monitor)
listRoots
in interface IRemoteProcessSubSystem
context
- 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
SubSystem
Since the abstract subsystem implementation does not know anything about the specific kinds of resources managed by concrete implementations, this method can only resolve filter references.
subsystem implementations must override this method in order to
resolve IDs for the remote objects they manage, to support drag and drop,
clipboard copy and other remote object resolving schemes.
Extenders that want to support filters should call
super.getObjectWithAbsoluteName(key)
when they do not find a
reference for the key themselves.
getObjectWithAbsoluteName
in interface IRemoteObjectResolver
getObjectWithAbsoluteName
in class SubSystem
key
- 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.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |