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
Answertopia.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.model
Interface IHost

All Superinterfaces:
IAdaptable, IPropertySetContainer, IRSEModelObject, IRSEPersistableContainer
All Known Implementing Classes:
DummyHost, Host

public interface IHost
extends IAdaptable, IRSEModelObject

Interface for Host (SystemConnection) objects. An IHost holds information identifying a remote system. It also logically contains ISubSystem objects, although this containment is achievable programmatically versus via object oriented containment.


Field Summary
 
Fields inherited from interface org.eclipse.rse.core.model. IRSEPersistableContainer
NO_CHILDREN
 
Method Summary
 void clearLocalDefaultUserId ()
          Clear the local default user Id so next query will return the value from the preference store.
 boolean compareUserIds ( String userId1, String userId2)
          Compare two userIds taking case sensitivity into account.
 void deletingHost ()
          Notification method called when this connection is being deleted.
  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 ()
          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.
  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 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 value)
          Set the unique user-visible connection name.
 void setDefaultEncoding ( String encoding, boolean fromRemote)
          Set the default encoding of the host.
 void setDefaultUserId ( String value)
          Intercept of setDefaultUserId so we can force it to uppercase.
 void setDescription ( String value)
          Set the description of this host.
 void setHostName ( String value)
          Set the host name or IP address.
 void setHostPool ( ISystemHostPool pool)
          Set the parent connection pool this is owned by.
 void setOffline (boolean value)
          Specify if this connection is offline or not.
 void setPromptable (boolean value)
          Set the promptable attribute.
 void setSystemType ( IRSESystemType value)
          Set the system type.
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.rse.core.model. IRSEModelObject
getName
 
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
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored
 

Method Detail

getSystemProfile


ISystemProfile getSystemProfile()
Return the system profile that owns this connection

Returns:
the profile which contains this host

getSystemProfileName


String getSystemProfileName()
Return the name of the system profile that owns this connection FIXME Check how this is different from getSystemProfile().getName()


setHostPool

void setHostPool(
ISystemHostPool pool)
Set the parent connection pool this is owned by. Connection pools are internal management objects, one per profile.


getHostPool


ISystemHostPool getHostPool()
Set the parent connection pool this is owned by. Connection pools are internal management objects, one per profile.


getSubSystems


ISubSystem[] getSubSystems()
Return the subsystem instances under this connection. Just a shortcut to ISystemRegistry.getSubSystems(IHost)


getLocalDefaultUserId


String getLocalDefaultUserId()
Return the local default user Id without resolving up the food chain.

See Also:
getDefaultUserId()

clearLocalDefaultUserId

void clearLocalDefaultUserId()
Clear the local default user Id so next query will return the value from the preference store.

Same as calling setDefaultUserId(null)

See Also:
setDefaultUserId(String)

deletingHost

void deletingHost()
Notification method called when this connection is being deleted. Allows doing pre-death cleanup in overriders.

What we need to do is delete our entry in the preference store for our default userId.


renamingSystemProfile

void renamingSystemProfile(
String oldName,
                           
String newName)
Notification method called when this connection's profile is being renamed. Allows doing pre-death cleanup in overriders.

Implementations 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.


getForceUserIdToUpperCase

boolean getForceUserIdToUpperCase()
Query whether the default userId is to be uppercased.

Returns:
true if the user id is to be uppercased.

compareUserIds

boolean compareUserIds(
String userId1,
                       
String userId2)
Compare two userIds taking case sensitivity into account.

Parameters:
userId1 - first id to compare
userId2 - second id to compare

getSystemType


IRSESystemType getSystemType()
Get the system type.

Returns:
The value of the SystemType attribute

setSystemType

void setSystemType(
IRSESystemType value)
Set the system type.

Parameters:
value - The new value of the SystemType attribute

getAliasName


String getAliasName()
Get the unique user-visible connection name. This is a key that is unique per connection pool.

Returns:
The value of the AliasName attribute

setAliasName

void setAliasName(
String value)
Set the unique user-visible connection name. This needs to be a key that is unique per connection pool.

Parameters:
value - The new value of the AliasName attribute

getHostName


String getHostName()
Get the host name or IP address.

Returns:
The value of the HostName attribute

setHostName

void setHostName(
String value)
Set the host name or IP address.

Parameters:
value - The new value of the HostName attribute

getDescription


String getDescription()
Return the description of this host.

Specified by:
getDescription in interface IRSEModelObject
Returns:
The value of the Description attribute

setDescription

void setDescription(
String value)
Set the description of this host.

Parameters:
value - The new value of the Description attribute

getDefaultUserId


String getDefaultUserId()
Return the default user Id for this host. Note that we don't store it directly in an attribute, as we don't want the team to share it. The actual user Id is stored in the preference store keyed by this connection's unique name (profile.connName) instead, and that key is stored in this attribute.

Further, 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.

Returns:
The value of the DefaultUserId attribute

setDefaultUserId

void setDefaultUserId(
String value)
Intercept of setDefaultUserId so we can force it to uppercase. Also, we do not store the user Id per se in the attribute, but rather we store it in the preference with a key name unique to this connection. We store that key name in this attribute. However, this is all transparent to the caller.

Parameters:
value - The new value of the DefaultUserId attribute

isPromptable

boolean isPromptable()
Check if this host is promptable.

Returns:
The value of the Promptable attribute

getDefaultEncoding


String getDefaultEncoding(boolean fromRemote)
Returns the default encoding of the host.

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.

Parameters:
fromRemote - 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.
Returns:
the default encoding of the host, or null if no encoding was set.
See Also:
setDefaultEncoding(String, boolean)

setDefaultEncoding

void setDefaultEncoding(
String encoding,
                        boolean fromRemote)
Set the default encoding of the host.

This 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).

Parameters:
encoding - 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).
See Also:
getDefaultEncoding(boolean)

setPromptable

void setPromptable(boolean value)
Set the promptable attribute.

Parameters:
value - The new value of the Promptable attribute

isOffline

boolean isOffline()
Returns the value of the ' Offline ' attribute.

Query 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.

Returns:
the value of the 'Offline' attribute.
See Also:
setOffline(boolean)

setOffline

void setOffline(boolean value)
Specify if this connection is offline or not. It is up to each subsystem to honor this flag.

Parameters:
value - the new value of the 'Offline' attribute.
See Also:
isOffline()

getConnectorServices


IConnectorService[] getConnectorServices()
Returns all the connector services currently configured for this host

Returns:
the connector services

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