|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface implemented by System objects.
A system object manages a live connection to a remote system, with operations for connecting and disconnecting, and storing information typically cached from a subsystem: user ID, password, port, etc. Any information in a System object is thrown out when the workbench goes down... it is not modelled for persistence.
The SubSystem interface includes a method, getSystem(), which returns an instance of this interface for that subsystem.
A single system object can be unique to a subsystem (which is always unique
for a particular tool to a particular connection). It can also be shared
across multiple subsystems in a single connection if those subsystems share
their physical connection to the remote system. This sharing is done via
subclasses of AbstractSystemManager
which are returned via another getter method in SubSystem.
Field Summary | |
---|---|
static String |
copyright
|
Method Summary | |
---|---|
void |
addCommunicationsListener(ICommunicationsListener listener)
Register a communications listener |
void |
clearPasswordCache()
Clear internal password cache. |
void |
clearPasswordCache(boolean clearDiskCache)
Clear internal password cache. |
void |
clearUserIdCache()
Clear internal userId cache. |
void |
connect(IProgressMonitor monitor)
Attempt to connect to the remote system. |
void |
disconnect()
Disconnect from the remote system |
String |
getHomeDirectory()
Return the home directory of the remote system for the current user, if available. |
String |
getHostName()
Return the host name for the connection this system's subsystem is associated with |
int |
getPort()
Return the port for this subsystem |
SubSystem |
getSubSystem()
Return the subsystem object this system is associated with |
String |
getSystemType()
Return the system type for this connection. |
String |
getTempDirectory()
Return the temp directory of the remote system for the current user, if available. |
String |
getUserId()
Return the userId for this system's subsystem we are associated with |
String |
getVersionReleaseModification()
Return the version, release, modification of the remote system, if connected, if applicable and if available. |
boolean |
inheritConnectionUserPassword()
Return true if this system can inherit the uid and password of other ISystems in this connection |
boolean |
isConnected()
Return true if currently connected. |
boolean |
isPasswordCached()
Return true if password is currently cached. |
boolean |
isPasswordCached(boolean onDisk)
Return true if password is currently cached. |
boolean |
isSuppressSignonPrompt()
Returns the suppressSignonPrompt flag. |
void |
notifyConnection()
Notifies all listeners of a connection through a communications event |
void |
notifyDisconnection()
Notifies all listeners of a disconnection through a communications event |
void |
notifyError()
Notifies all listeners of an error through a communications event |
void |
promptForPassword(Shell shell,
boolean forcePrompt)
Return the password for this system's subsystem we are associated with. |
void |
removeCommunicationsListener(ICommunicationsListener listener)
Remove a communications listener |
void |
reset()
Reset after some fundamental change, such as a hostname change. |
void |
setPassword(String matchingUserId,
String password)
Set the password if you got it from somewhere |
void |
setPassword(String matchingUserId,
String password,
boolean persist)
Set the password if you got it from somewhere |
void |
setSubSystem(SubSystem ss)
Set the subsystem, when its not known at constructor time |
void |
setSuppressSignonPrompt(boolean suppressSignonPrompt)
Sets the suppressSignonPrompt flag. |
boolean |
shareUserPasswordWithConnection()
|
Field Detail |
public static final String copyright
Method Detail |
public SubSystem getSubSystem()
public void setSubSystem(SubSystem ss)
public boolean isConnected()
public void connect(IProgressMonitor monitor) throws Exception
Exception
public void disconnect() throws Exception
Exception
public void notifyDisconnection()
public void notifyConnection()
public void notifyError()
public void reset()
public String getVersionReleaseModification()
Up to each implementer to decide if this will be cached.
public String getHomeDirectory()
Up to each implementer to decide how to implement, and if this will be cached.
public String getTempDirectory()
Up to each implementer to decide how to implement, and if this will be cached.
public String getSystemType()
public String getHostName()
public int getPort()
public String getUserId()
public void promptForPassword(Shell shell, boolean forcePrompt) throws InterruptedException
If not currently set in transient memory, prompts the user for a password.
Throws InterruptedException if user is prompted and user cancels that prompt.
shell
- parent for the prompt dialog if needed. Can be null if know password exists.forcePrompt
- forces the prompt dialog to be displayed even if the password is currently
in memory.
InterruptedException
public void setPassword(String matchingUserId, String password)
public void setPassword(String matchingUserId, String password, boolean persist)
public void clearUserIdCache()
public void clearPasswordCache()
public void clearPasswordCache(boolean clearDiskCache)
clearDiskCache
- if true, clears the password from diskpublic boolean isPasswordCached()
public boolean isPasswordCached(boolean onDisk)
public boolean inheritConnectionUserPassword()
public boolean shareUserPasswordWithConnection()
public void addCommunicationsListener(ICommunicationsListener listener)
public void removeCommunicationsListener(ICommunicationsListener listener)
public boolean isSuppressSignonPrompt()
public void setSuppressSignonPrompt(boolean suppressSignonPrompt)
suppressSignonPrompt
-
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |