Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.core.subsystems
Class AuthenticatingConnectorService

java.lang.Object
  extended by 

org.eclipse.rse.core.model.RSEPersistableObject
      extended by 

org.eclipse.rse.core.model.PropertySetContainer
          extended by 

org.eclipse.rse.core.model.RSEModelObject
              extended by 

org.eclipse.rse.core.subsystems.AbstractConnectorService
                  extended by 
org.eclipse.rse.core.subsystems.AuthenticatingConnectorService
All Implemented Interfaces:
IPropertySetContainer, IRSEModelObject, IRSEPersistableContainer, IConnectorService
Direct Known Subclasses:
StandardConnectorService

public abstract class AuthenticatingConnectorService
extends AbstractConnectorService

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.subsystems. AbstractConnectorService
addCommunicationsListener, commit, connect, deregisterSubSystem, disconnect, fireCommunicationsEvent, getConnectPort, getDenyPasswordSave, getDescription, getHomeDirectory, getHost, getHostName, getName, getPersistableChildren, getPersistableParent, getPort, getPrimarySubSystem, getRemoteServerLauncher, getRemoteServerLauncherProperties, getSubSystems, getTempDirectory, getVersionReleaseModification, hasActiveCommunicationListeners, hasRemoteServerLauncherProperties, initializeSubSystems, internalConnect, internalDisconnect, isServerLaunchTypeEnabled, isUsingSSL, notifyConnection, notifyDisconnection, notifyError, postConnect, preConnect, preDisconnect, registerSubSystem, removeCommunicationsListener, reset, setDenyPasswordSave, setHost, setIsUsingSSL, setPort, setRemoteServerLauncherProperties, supportsRemoteServerLaunching, supportsServerLaunchProperties, uninitializeSubSystems
 
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

credentialsProvider

protected 
ICredentialsProvider credentialsProvider
Constructor Detail

AuthenticatingConnectorService

public AuthenticatingConnectorService(
String name,
                                      
String description,
                                      
IHost host,
                                      int port)
Constructs an authenticating connector service.

Parameters:
name - The name of the connector service
description - The description of the connector service
host - The host associated with this connector service
port - The port this connector service will use when connecting if it uses IP.
Method Detail

getUserId

public final 
String getUserId()
Obtains the user id, if it understand the concept of user id, from its credentials provider.

Returns:
the user id or null if not available or not supported.
See Also:
IConnectorService.getUserId()

setUserId

public final void setUserId(
String newId)
Sets the default user id for use by the credentials provider.

Parameters:
newId - the id to be used by the credentials provider.
See Also:
IConnectorService.setUserId(java.lang.String)

saveUserId

public final void saveUserId()
Description copied from interface: IConnectorService
Causes the user id known to the connector service, if any, to be persisted.


removeUserId

public final void removeUserId()
Description copied from interface: IConnectorService
Causes the persisted (default) user id known to this connector service, if any, to be forgotten.


clearPassword

public final void clearPassword(boolean persist,
                                boolean propagate)
Description copied from interface: IConnectorService
Clear password held by this service and optionally clear its persistent form. Called when user uses the property dialog to change his userId.

Parameters:
persist - if true, clears the persistent form of the password
propagate - true if this password should be cleared in related connector services.

hasPassword

public final boolean hasPassword(boolean onDisk)
Parameters:
onDisk - also check for the persistent form of the password.
Returns:
true if a password is currently known to this connector service.

setPassword

public final void setPassword(
String userId,
                              
String password,
                              boolean persist,
                              boolean propagate)
Description copied from interface: IConnectorService
Sets the password used by this connector service. Can be used if the connector service acquires a password by some external means.

Parameters:
userId - The user id to be associated with this password.
password - the password
persist - true if the password is to be persisted for later use.
propagate - true if this password should be propagated to related connector services.

savePassword

public final void savePassword()
Description copied from interface: IConnectorService
Causes the password known to this connector service, if any, to be persisted.


removePassword

public final void removePassword()
Description copied from interface: IConnectorService
Causes the persisted password known to this connector service, if any, to be forgotten.


postDisconnect

protected final void postDisconnect()
Description copied from class: AbstractConnectorService
Performs any cleanup required after disconnecting. This implementation does nothing. May be overridden. If overridden, invoke via super.

Overrides:
postDisconnect in class AbstractConnectorService

isSuppressed

public final boolean isSuppressed()
Returns:
true if the acquisition of credentials is being suppressed.

setSuppressed

public final void setSuppressed(boolean suppressed)
Description copied from interface: IConnectorService
Suppresses the acquisition of a credentials by the connector service. Causes 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.

Parameters:
suppressed - true if acquisition is to be suppressed. false if acquisition is to be allowed.

acquireCredentials

public final void acquireCredentials(boolean reacquire)
                              throws 
OperationCanceledException
Description copied from interface: IConnectorService
Acquire the credentials for this connector service. Acquisition may be temporarily suppressed by using the IConnectorService.setSuppressed(boolean).

Implementations may retain a remembered credentials or use this to acquire the credentials using some implementation defined means.

Parameters:
reacquire - if true will force the connector service to discard any remembered value and reacquire the credentials.
Throws:
OperationCanceledException - if acquisition of the credentials is cancelled or is being suppressed.

clearCredentials

public final void clearCredentials()
Description copied from interface: IConnectorService
Clears the credentials held by this service. Should be called if there is a change to any part of the credentials expected by any using subsystem.


sharesCredentials

public boolean sharesCredentials()
Returns true if this connector service can share it's credentials with other connector services in this host. This implementation will always return true. Override if necessary.

Returns:
true
See Also:
IConnectorService.sharesCredentials()

inheritsCredentials

public boolean inheritsCredentials()
Returns true if this connector service can inherit the credentials of other connector services in this host. This implementation always returns true. Override if necessary.

Returns:
true
See Also:
IConnectorService.inheritsCredentials()

setCredentialsProvider

protected final void setCredentialsProvider(
ICredentialsProvider credentialsProvider)
Sets the credentials provider used by this connector service. This should be invoked once immediately during the construction of the connector service.

Parameters:
credentialsProvider - the credentials provider to be used by this connector service.

getCredentialsProvider

protected final 
ICredentialsProvider getCredentialsProvider()
Returns:
the credentials provider that is being used by this connector service.

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire