|
RSE Release 3.2 |
|||||||||
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.AbstractConnectorService
org.eclipse.rse.core.subsystems.AuthenticatingConnectorService
public abstract class AuthenticatingConnectorService
An authenticating connector service understands the concept of credentials
(see ICredentials
)
and possibly the concepts of user id and password. It contains a
credentials provider (ICredentialsProvider
) and provides a
framework under which authentication can take place during connections.
Field Summary | |
---|---|
protected ICredentialsProvider |
credentialsProvider
|
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
NO_CHILDREN |
Constructor Summary | |
---|---|
AuthenticatingConnectorService(String name,
String description,
IHost host,
int port)
Constructs an authenticating connector service. |
Method Summary | |
---|---|
void |
acquireCredentials(boolean reacquire)
Acquire the credentials for this connector service. |
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. |
protected ICredentialsProvider |
getCredentialsProvider()
|
String |
getUserId()
Obtains the user id, if it understand the concept of user id, from its credentials provider. |
boolean |
hasPassword(boolean onDisk)
|
boolean |
inheritsCredentials()
Returns true if this connector service can inherit the credentials of other connector services in this host. |
boolean |
isSuppressed()
|
protected void |
postDisconnect()
Performs any cleanup required after disconnecting. |
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. |
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. |
protected void |
setCredentialsProvider(ICredentialsProvider credentialsProvider)
Sets the credentials provider used by this connector service. |
void |
setPassword(String userId,
String password,
boolean persist,
boolean propagate)
Sets the password used by this connector service. |
void |
setSuppressed(boolean suppressed)
Suppresses the acquisition of a credentials by the connector service. |
void |
setUserId(String newId)
Sets the default user id for use by the credentials provider. |
boolean |
sharesCredentials()
Returns true if this connector service can share it's credentials with other connector services in this host. |
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.core.subsystems.IConnectorService |
---|
isConnected, requiresPassword, requiresUserId, supportsPassword, supportsUserId |
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 |
---|
isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
Field Detail |
---|
protected ICredentialsProvider credentialsProvider
Constructor Detail |
---|
public AuthenticatingConnectorService(String name, String description, IHost host, int port)
name
- The name of the connector servicedescription
- The description of the connector servicehost
- The host associated with this connector serviceport
- The port this connector service will use when connecting if it uses IP.Method Detail |
---|
public final String getUserId()
IConnectorService.getUserId()
public final void setUserId(String newId)
newId
- the id to be used by the credentials provider.IConnectorService.setUserId(java.lang.String)
public final void saveUserId()
IConnectorService
public final void removeUserId()
IConnectorService
public final void clearPassword(boolean persist, boolean propagate)
IConnectorService
persist
- if true, clears the persistent form of the passwordpropagate
- true if this password should be cleared in related connector services.public final boolean hasPassword(boolean onDisk)
onDisk
- also check for the persistent form of the password.
public final void setPassword(String userId, String password, boolean persist, boolean propagate)
IConnectorService
userId
- 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.public final void savePassword()
IConnectorService
public final void removePassword()
IConnectorService
protected final void postDisconnect()
AbstractConnectorService
postDisconnect
in class AbstractConnectorService
public final boolean isSuppressed()
public final void setSuppressed(boolean suppressed)
IConnectorService
IConnectorService.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.
suppressed
- true
if acquisition is to be suppressed.
false
if acquisition is to be allowed.public final void acquireCredentials(boolean reacquire) throws OperationCanceledException
IConnectorService
IConnectorService.setSuppressed(boolean)
.
Implementations may retain a remembered credentials or use this to acquire the credentials using some implementation defined means.
reacquire
- 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.public final void clearCredentials()
IConnectorService
public boolean sharesCredentials()
IConnectorService.sharesCredentials()
public boolean inheritsCredentials()
IConnectorService.inheritsCredentials()
protected final void setCredentialsProvider(ICredentialsProvider credentialsProvider)
credentialsProvider
- the credentials provider to be used
by this connector service.protected final ICredentialsProvider getCredentialsProvider()
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |