|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IConnectorService
A connector service provides the means of establishing a connection from a subsystem (or a number of subsystems) to a target system (a host).
A connector service manages a live connection to a remote system, with operations for connecting and disconnecting, and storing information typically cached from a subsystem: credentials (such as a userId/password), port, etc.
The SubSystem interface includes a method, getConnectorService(), which returns an instance of an object that implements this interface for that subsystem.
A single connector service object can be unique to a subsystem instance, but
it can also be shared across multiple subsystems in a single host if those
subsystems share a physical connection to the remote system. This sharing is
done using implementers of IConnectorServiceManager
which are
returned by another getter method in SubSystem.
Field Summary |
---|
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
NO_CHILDREN |
Method Summary | |
---|---|
void |
acquireCredentials(boolean refresh)
Acquire the credentials for this connector service. |
void |
addCommunicationsListener(ICommunicationsListener listener)
Register a communications listener. |
void |
clearCredentials()
Clears the credentials held by this service. |
void |
clearPassword(boolean persist,
boolean propagate)
Clear password held by this service and optionally clear its persistent form. |
void |
connect(IProgressMonitor monitor)
Connect to the remote system. |
void |
deregisterSubSystem(ISubSystem ss)
Deregister the subsystem. |
void |
disconnect(IProgressMonitor monitor)
Disconnect from the remote system. |
boolean |
getDenyPasswordSave()
Retrieves the value of the "DENY_PASSWORD_SAVE" property of this connector service. |
String |
getHomeDirectory()
|
IHost |
getHost()
|
String |
getHostName()
|
int |
getPort()
|
ISubSystem |
getPrimarySubSystem()
|
IServerLauncher |
getRemoteServerLauncher()
|
IServerLauncherProperties |
getRemoteServerLauncherProperties()
Gets the properties associated with a remote server launcher. |
ISubSystem[] |
getSubSystems()
Return all the subsystems that use this connector service |
String |
getTempDirectory()
|
String |
getUserId()
|
String |
getVersionReleaseModification()
|
boolean |
hasPassword(boolean persistent)
|
boolean |
hasRemoteServerLauncherProperties()
|
boolean |
inheritsCredentials()
Returns true if this system can inherit the credentials of from the other connector services in this host. |
boolean |
isConnected()
|
boolean |
isServerLaunchTypeEnabled(ISubSystem subsystem,
ServerLaunchType serverLaunchType)
This methods returns the enablement state of a server launch type. |
boolean |
isSuppressed()
|
boolean |
isUsingSSL()
|
void |
registerSubSystem(ISubSystem ss)
Adds a subsystem to this connector service. |
void |
removeCommunicationsListener(ICommunicationsListener listener)
Remove a communications listener. |
void |
removePassword()
Causes the persisted password known to this connector service, if any, to be forgotten. |
void |
removeUserId()
Causes the persisted (default) user id known to this connector service, if any, to be forgotten. |
boolean |
requiresPassword()
Test if this connector service requires a password. |
boolean |
requiresUserId()
Test if this connector service requires a user id. |
void |
reset()
Reset after some fundamental change, such as a hostname change. |
void |
savePassword()
Causes the password known to this connector service, if any, to be persisted. |
void |
saveUserId()
Causes the user id known to the connector service, if any, to be persisted. |
int |
setDenyPasswordSave(boolean deny)
Sets the attribute for this connector service instance that denies a password to be saved. |
void |
setHost(IHost host)
Sets the host used by this connector service. |
void |
setIsUsingSSL(boolean flag)
|
void |
setPassword(String matchingUserId,
String password,
boolean persist,
boolean propagate)
Sets the password used by this connector service. |
void |
setPort(int port)
Set the port for this connector. |
void |
setRemoteServerLauncherProperties(IServerLauncherProperties value)
Set the properties for the remote server launcher This is an object containing properties used to launch a remote server that communicates with this client. |
void |
setSuppressed(boolean suppress)
Suppresses the acquisition of a credentials by the connector service. |
void |
setUserId(String userId)
Set the user id this connector service will use when establishing its connection. |
boolean |
sharesCredentials()
Return true if this system can share it's credentials with other connector services in this host. |
boolean |
supportsPassword()
Determines if this connector service understand the concept of a password. |
boolean |
supportsRemoteServerLaunching()
|
boolean |
supportsServerLaunchProperties()
|
boolean |
supportsUserId()
Reports if this connector service can use a user identifier. |
Methods inherited from interface org.eclipse.rse.core.model.IRSEModelObject |
---|
getDescription, getName |
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 |
Method Detail |
---|
ISubSystem getPrimarySubSystem()
ISubSystem[] getSubSystems()
void registerSubSystem(ISubSystem ss)
ss
- a subsystem that is using this connector service.void deregisterSubSystem(ISubSystem ss)
ss
- the subsystem to remove from this connector service.boolean isConnected()
void connect(IProgressMonitor monitor) throws Exception
monitor
- a monitor for tracking the progress and canceling a
connect operation.
OperationCanceledException
- if the connect was cancelled by the
user
Exception
- if there is a failure connecting. Typically, this will
be a SystemMessageException
.void disconnect(IProgressMonitor monitor) throws Exception
monitor
- a monitor for tracking the progress and canceling a
disconnect operation.
Exception
- an exception of the disconnect fails. Typically, this
will be a SystemMessageException
.void reset()
String getVersionReleaseModification()
String getHomeDirectory()
String getTempDirectory()
void setHost(IHost host)
host
- the host to be used for this connector serviceIHost getHost()
String getHostName()
int getPort()
void setPort(int port)
port
- the IP port used by this connector service.boolean isUsingSSL()
void setIsUsingSSL(boolean flag)
flag
- true if the connector service should attempt to use SSL when
establishing the connection.boolean supportsUserId()
boolean supportsPassword()
String getUserId()
void setUserId(String userId)
userId
- the user id string for this connector service.void saveUserId()
void removeUserId()
void setPassword(String matchingUserId, String password, boolean persist, boolean propagate)
matchingUserId
- The user id to be associated with this password.password
- the passwordpersist
- true if the password is to be persisted for later use.propagate
- true if this password should be propagated to related connector services.void savePassword()
void removePassword()
void clearPassword(boolean persist, boolean propagate)
persist
- if true, clears the persistent form of the passwordpropagate
- true if this password should be cleared in related connector services.boolean hasPassword(boolean persistent)
persistent
- also check for the persistent form of the password.
boolean inheritsCredentials()
boolean sharesCredentials()
void clearCredentials()
void acquireCredentials(boolean refresh) throws OperationCanceledException
setSuppressed(boolean)
.
Implementations may retain a remembered credentials or use this to acquire the credentials using some implementation defined means.
refresh
- if true will force the connector service to discard any
remembered value and reacquire the credentials.
OperationCanceledException
- if acquisition of the credentials is
cancelled or is being suppressed.boolean isSuppressed()
void setSuppressed(boolean suppress)
acquireCredentials(boolean)
to immediately
throw an InterruptedException.
The intent is to allow tool writers to prevent multiple attempts to acquire credentials during a set period of time. It is the responsibility of the caller to set this value back to false when the tool no longer needs to suppress acquisition credentials.
suppress
- true
if acquisition is to be suppressed.
false
if acquisition is to be allowed.void addCommunicationsListener(ICommunicationsListener listener)
listener
- a listener for the communications event.void removeCommunicationsListener(ICommunicationsListener listener)
listener
- a listener for the communications event.boolean isServerLaunchTypeEnabled(ISubSystem subsystem, ServerLaunchType serverLaunchType)
RemoteServerLauncher.enableServerLaunchType(ServerLaunchType, boolean)
has not been
called for this server launch type, then it is enabled by default.
subsystem
- the subystem for which this may be enabled.serverLaunchType
- the type to check for enabledment.
ServerLaunchType
IServerLauncherProperties getRemoteServerLauncherProperties()
void setRemoteServerLauncherProperties(IServerLauncherProperties value)
value
- the new value of the 'Remote Server Launcher' containment reference.boolean hasRemoteServerLauncherProperties()
boolean supportsServerLaunchProperties()
supportsRemoteServerLaunching()
is false.boolean supportsRemoteServerLaunching()
IServerLauncher getRemoteServerLauncher()
supportsRemoteServerLaunching()
is true.boolean requiresPassword()
boolean requiresUserId()
int setDenyPasswordSave(boolean deny)
deny
- If true, forget any saved passwords and do not allow any
others to be saved. If false, allow passwords to be saved in
the keyring.
boolean getDenyPasswordSave()
|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |