|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IEnvManager
An object which provides access to an environment management system on a remote machine.
All contributions to the "org.eclipse.ptp.ems.core.envmanager" extension point must implement this interface.
| Field Summary | |
|---|---|
static java.lang.String |
ENV_MANAGER_EXTENSION_POINT_ID
ID for the envmanager extension point |
| Method Summary | |
|---|---|
boolean |
checkForCompatibleInstallation(org.eclipse.core.runtime.IProgressMonitor pm)
Returns true iff the remote machine is running an environment management system supported by this IEnvManager. |
void |
configure(IRemoteConnection remoteConnection)
Sets the IRemoteConnection which will be used to run commands on a remote machine. |
java.lang.String |
createBashScript(org.eclipse.core.runtime.IProgressMonitor pm,
boolean echo,
IEnvManagerConfig config,
java.lang.String commandToExecuteAfterward)
Creates a temporary file on the remote machine and writes a Bash shell script into that file which will configure the remote environment with the given elements, execute the given command, and then delete the temporary file (shell script). |
java.util.List<java.lang.String> |
determineAvailableElements(org.eclipse.core.runtime.IProgressMonitor pm)
Returns the set of all environment configuration elements available on the remote machine (e.g., the result of module -t avail). |
java.util.List<java.lang.String> |
determineDefaultElements(org.eclipse.core.runtime.IProgressMonitor pm)
Returns the set of all environment configuration elements loaded by default upon login (e.g., the result of module -t list in a login shell). |
java.lang.String |
getBashConcatenation(java.lang.String separator,
boolean echo,
IEnvManagerConfig config,
java.lang.String commandToExecuteAfterward)
Returns a single Bash shell command which will configure the remote environment with the given elements and then execute the given command. |
java.util.Comparator<java.lang.String> |
getComparator()
Returns a Comparator used to sort the strings returned by determineAvailableElements(IProgressMonitor) and
determineDefaultElements(IProgressMonitor) when displaying them to the user. |
java.lang.String |
getDescription(org.eclipse.core.runtime.IProgressMonitor pm)
If the remote machine is running an environment management system supported by this IEnvManager, returns a short
description of the environment management system (e.g., "Modules 3.2.7"); otherwise, returns null. |
java.lang.String |
getInstructions()
Returns a short sentence that will be displayed to the user to request that items be selected from a checklist. |
java.lang.String |
getName()
Returns a human-readable name for this environment management system. |
| Field Detail |
|---|
static final java.lang.String ENV_MANAGER_EXTENSION_POINT_ID
| Method Detail |
|---|
java.lang.String getName()
null)java.util.Comparator<java.lang.String> getComparator()
Comparator used to sort the strings returned by determineAvailableElements(IProgressMonitor) and
determineDefaultElements(IProgressMonitor) when displaying them to the user.
Comparator (non-null)java.lang.String getInstructions()
For example, "Select modules to be loaded."
null)void configure(IRemoteConnection remoteConnection)
IRemoteConnection which will be used to run commands on a remote machine.
This method must be invoked before checkForCompatibleInstallation(IProgressMonitor),
getDescription(IProgressMonitor), determineAvailableElements(IProgressMonitor),
determineDefaultElements(IProgressMonitor), or
createBashScript(IProgressMonitor, boolean, IEnvManagerConfig, String).
remoteConnection - IRemoteConnection (non-null)
boolean checkForCompatibleInstallation(org.eclipse.core.runtime.IProgressMonitor pm)
throws RemoteConnectionException,
java.io.IOException
IEnvManager.
pm - progress monitor used to report the status of potentially long-running operations to the user (non-
null)
IEnvManager
java.lang.NullPointerException - if configure(IRemoteConnection) has not been called
RemoteConnectionException - if an remote connection error occurs
java.io.IOException - if an input/output error occurs
java.lang.String getDescription(org.eclipse.core.runtime.IProgressMonitor pm)
throws RemoteConnectionException,
java.io.IOException
IEnvManager, returns a short
description of the environment management system (e.g., "Modules 3.2.7"); otherwise, returns null.
pm - progress monitor used to report the status of potentially long-running operations to the user (non-
null)
null if a compatible environment configuration system is not present on the remote machine
java.lang.NullPointerException - if configure(IRemoteConnection) has not been called
RemoteConnectionException - if an remote connection error occurs
java.io.IOException - if an input/output error occurs
java.util.List<java.lang.String> determineAvailableElements(org.eclipse.core.runtime.IProgressMonitor pm)
throws RemoteConnectionException,
java.io.IOException
pm - progress monitor used to report the status of potentially long-running operations to the user (non-
null)
null)
java.lang.NullPointerException - if configure(IRemoteConnection) has not been called
RemoteConnectionException - if an remote connection error occurs
java.io.IOException - if an input/output error occurs
java.util.List<java.lang.String> determineDefaultElements(org.eclipse.core.runtime.IProgressMonitor pm)
throws RemoteConnectionException,
java.io.IOException
pm - progress monitor used to report the status of potentially long-running operations to the user (non-
null)
null)
java.lang.NullPointerException - if configure(IRemoteConnection) has not been called
RemoteConnectionException - if an remote connection error occurs
java.io.IOException - if an input/output error occurs
java.lang.String getBashConcatenation(java.lang.String separator,
boolean echo,
IEnvManagerConfig config,
java.lang.String commandToExecuteAfterward)
The returned command may include sequencing, piping, I/O redirection, etc.; however, it must be possible to concatenate additional Bash commands by appending a semicolon.
separator - string that will be inserted between consecutive Bash commands: typically, either a semicolon or a newlineecho - true iff the script should "echo" each command prior to executionconfig - environment manager configuration (non-null)commandToExecuteAfterward - a Bash shell command to execute after the environment has been configured
null)
java.lang.String createBashScript(org.eclipse.core.runtime.IProgressMonitor pm,
boolean echo,
IEnvManagerConfig config,
java.lang.String commandToExecuteAfterward)
throws RemoteConnectionException,
java.io.IOException
pm - progress monitor used to report the status of potentially long-running operations to the user (non-
null)echo - true iff the script should "echo" each command prior to executionconfig - environment manager configuration (non-null)commandToExecuteAfterward - a Bash shell command to execute after the environment has been configured
null)
RemoteConnectionException - if an remote connection error occurs
java.io.IOException - if an input/output error occurs
|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||