|
RSE Release 3.0 |
|||||||||
| 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.model.Host
public class Host
Default implementation of the IHost interface.
Dynamic system type providers may extend this implementation if needed.
| Field Summary | |
|---|---|
protected String |
previousUserIdKey
|
| Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
NO_CHILDREN |
| Constructor Summary | |
|---|---|
Host(ISystemProfile profile)
Constructor |
|
| Method Summary | |
|---|---|
void |
clearLocalDefaultUserId()
Clear the local default user Id so next query will return the value from the preference store. |
boolean |
commit()
Request a persistence manager to persist this object. |
boolean |
compareUserIds(String userId1,
String userId2)
Call this to compare two userIds taking case sensitivity |
void |
deletingHost()
Notification method called when this connection is being deleted. |
Object |
getAdapter(Class adapterType)
|
String |
getAliasName()
Get the unique user-visible connection name. |
IConnectorService[] |
getConnectorServices()
Returns all the connector services currently configured for this host |
String |
getDefaultEncoding(boolean fromRemote)
Returns the default encoding of the host. |
String |
getDefaultUserId()
Return the default user Id for this host. |
String |
getDescription()
Return the description of this host. |
boolean |
getForceUserIdToUpperCase()
Call this to query whether the default userId is to be uppercased. |
String |
getHostName()
Get the host name or IP address. |
ISystemHostPool |
getHostPool()
Set the parent connection pool this is owned by. |
String |
getLocalDefaultUserId()
Return the local default user Id without resolving up the food chain. |
protected static String |
getLocalDefaultUserId(String key)
Return the local default user Id without resolving up the food chain. |
String |
getName()
|
IRSEPersistableContainer[] |
getPersistableChildren()
Retrieves the children of this object in the persistence containment hierarchy. |
IRSEPersistableContainer |
getPersistableParent()
Retrieve the parent of this object in the persistence containment hierarchy. |
protected String |
getPreferencesKey()
Helper method to compute a unique name for a given subsystem instance |
protected String |
getPreferencesKey(String profileName)
Helper method to compute a unique name for a given subsystem instance, given a profile name |
protected String |
getPreferencesKey(String profileName,
String connectionName)
Helper method to compute a unique name for a given subsystem instance, given a profile name and connection name |
ISubSystem[] |
getSubSystems()
Return the subsystem instances under this connection. |
ISystemProfile |
getSystemProfile()
Return the system profile that owns this connection |
String |
getSystemProfileName()
Return the name of the system profile that owns this connection FIXME Check how this is different from getSystemProfile().getName() |
IRSESystemType |
getSystemType()
Get the system type. |
boolean |
getUserIdCaseSensitive()
Call this to query whether the default userId is case sensitive |
boolean |
isOffline()
Returns the value of the 'Offline' attribute. |
boolean |
isPromptable()
Check if this host is promptable. |
void |
renamingSystemProfile(String oldName,
String newName)
Notification method called when this connection's profile is being renamed. |
void |
setAliasName(String newName)
Intercept of setAliasName so we can potentially rename the default-user-id key for the preferences store. |
void |
setDefaultEncoding(String encoding,
boolean fromRemote)
Set the default encoding of the host. |
void |
setDefaultUserId(String newId)
Intercept of setDefaultUserId so we can force it to uppercase. |
void |
setDescription(String newDescription)
Set the description of this host. |
void |
setForceUserIdToUpperCase(boolean force)
Call this with false to turn off the default behaviour of forcing the default userId to uppercase. |
void |
setHostName(String name)
Intercept of setHostName so we can force it to uppercase. |
void |
setHostPool(ISystemHostPool pool)
Set the parent connection pool this is owned by. |
void |
setOffline(boolean newOffline)
Specify if this connection is offline or not. |
void |
setPromptable(boolean newPromptable)
Set the promptable attribute. |
void |
setSystemType(IRSESystemType systemType)
Intercept of setSystemType so we can decide if the user ID is case sensitive |
void |
setUserIdCaseSensitive(boolean caseSensitive)
Call this to turn off the default behaviour of considering case when comparing userIds |
String |
toString()
|
| 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, wait, wait, wait |
| 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 String previousUserIdKey
| Constructor Detail |
|---|
public Host(ISystemProfile profile)
| Method Detail |
|---|
public void setHostPool(ISystemHostPool pool)
IHost
setHostPool in interface IHostpublic ISystemHostPool getHostPool()
IHost
getHostPool in interface IHostpublic IConnectorService[] getConnectorServices()
IHost
getConnectorServices in interface IHostpublic ISubSystem[] getSubSystems()
IHostISystemRegistry.getSubSystems(IHost)
getSubSystems in interface IHostpublic void deletingHost()
IHostWhat we need to do is delete our entry in the preference store for our default userId.
deletingHost in interface IHost
public void renamingSystemProfile(String oldName,
String newName)
IHostImplementations must not fork off other threads in the implementation of this method, since the old and new profiles will be locked during the rename operation so deadlock could occur when another thread tries to access theprofile during the time of rename ongoing.
What we need to do is rename our entry in the preference store for our default userId.
renamingSystemProfile in interface IHostpublic ISystemProfile getSystemProfile()
IHost
getSystemProfile in interface IHostpublic String getSystemProfileName()
IHost
getSystemProfileName in interface IHostpublic void setAliasName(String newName)
setAliasName in interface IHostnewName - The new value of the AliasName attributepublic void setSystemType(IRSESystemType systemType)
setSystemType in interface IHostsystemType - The new value of the SystemType attributepublic void setHostName(String name)
setHostName in interface IHostname - The new value of the HostName attributepublic void setDefaultUserId(String newId)
setDefaultUserId in interface IHostnewId - The new value of the DefaultUserId attributepublic String getDefaultUserId()
IHostFurther, it is possible that there is no default user id. If so, this method will go to the preference store and will try to get the default user Id per this connection's system type.
This is all transparent to the caller though.
getDefaultUserId in interface IHostprotected static String getLocalDefaultUserId(String key)
getDefaultUserId()public String getLocalDefaultUserId()
IHost
getLocalDefaultUserId in interface IHostIHost.getDefaultUserId()public void clearLocalDefaultUserId()
IHostSame as calling setDefaultUserId(null)
clearLocalDefaultUserId in interface IHostIHost.setDefaultUserId(String)protected String getPreferencesKey()
protected String getPreferencesKey(String profileName)
protected String getPreferencesKey(String profileName,
String connectionName)
public void setForceUserIdToUpperCase(boolean force)
public void setUserIdCaseSensitive(boolean caseSensitive)
public boolean getForceUserIdToUpperCase()
getForceUserIdToUpperCase in interface IHosttrue if the user id is to be uppercased.public boolean getUserIdCaseSensitive()
public boolean compareUserIds(String userId1,
String userId2)
compareUserIds in interface IHostuserId1 - first id to compareuserId2 - second id to comparepublic String toString()
toString in class Objectpublic Object getAdapter(Class adapterType)
getAdapter in interface IAdaptablepublic IRSESystemType getSystemType()
IHost
getSystemType in interface IHostpublic String getName()
getName in interface IRSEModelObjectpublic String getAliasName()
IHost
getAliasName in interface IHostpublic String getHostName()
IHost
getHostName in interface IHostpublic String getDescription()
IHost
getDescription in interface IHostgetDescription in interface IRSEModelObjectgetDescription in class RSEModelObjectpublic void setDescription(String newDescription)
IHost
setDescription in interface IHostnewDescription - The new value of the Description attributepublic boolean isPromptable()
IHost
isPromptable in interface IHostpublic void setPromptable(boolean newPromptable)
IHost
setPromptable in interface IHostnewPromptable - The new value of the Promptable attributepublic boolean isOffline()
IHostQuery if this connection is offline or not. If so, there is no live connection. Subsystems decide how much to enable while offline. It is up to each subsystem to honor this flag.
isOffline in interface IHostIHost.setOffline(boolean)public void setOffline(boolean newOffline)
IHost
setOffline in interface IHostnewOffline - the new value of the 'Offline' attribute.IHost.isOffline()public boolean commit()
IRSEPersistableContainer
commit in interface IRSEPersistableContainerpublic IRSEPersistableContainer getPersistableParent()
IRSEPersistableContainer
getPersistableParent in interface IRSEPersistableContainerpublic IRSEPersistableContainer[] getPersistableChildren()
IRSEPersistableContainer
getPersistableChildren in interface IRSEPersistableContainerIRSEPersistableContainer.NO_CHILDREN.public String getDefaultEncoding(boolean fromRemote)
IHost
If fromRemote is false, returns an encoding preference
specified locally without querying the remote system (for example,
an encoding set by a user).
If fromRemote is true, it first checks to see if there is
a local "overriding" encoding set by the client without querying the
remote system, and if such a "local" encoding preference does not exist,
returns the encoding that was set by the client by querying a remote system.
getDefaultEncoding in interface IHostfromRemote - false to get the encoding that was
obtained by the client by not querying the remote system,
true to also check the encoding, if needed, that was
set by the client after querying a remote system.
null if
no encoding was set.IHost.setDefaultEncoding(String, boolean)
public void setDefaultEncoding(String encoding,
boolean fromRemote)
IHostThis method can only be called when no subsystem is connected. The client has to obtain the encoding either by querying the remote system, or by some other means (for example, set by a user).
setDefaultEncoding in interface IHostencoding - the encoding of the host, or null
to erase the current encoding.fromRemote - true if the encoding is set by the
client after querying the remote system, or false
otherwise (e.g. setting a local user preference).IHost.getDefaultEncoding(boolean)
|
RSE Release 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||