|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISystemHostPool
An ordered list of connections (IHost
objects), owned by an
ISystemProfile
.
Implementations of this interface are expected to be thread-safe in the sense that integrity of the host list is maintained even if multiple threads call multiple methods in this interface concurrently.
Field Summary |
---|
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
NO_CHILDREN |
Method Summary | |
---|---|
boolean |
addHost(IHost conn)
Add a new connection to the list. |
IHost |
cloneHost(ISystemHostPool targetPool,
IHost conn,
String aliasName)
Duplicates a given connection in this list within this list or another list. |
IHost |
createHost(IRSESystemType systemType,
String aliasName,
String hostName)
Create a connection object, given only the minimal information. |
IHost |
createHost(IRSESystemType systemType,
String aliasName,
String hostName,
String description)
Create a connection object, given all the possible attributes except default userId. |
IHost |
createHost(IRSESystemType systemType,
String aliasName,
String hostName,
String description,
String defaultUserId,
int defaultUserIdLocation)
Create a connection object, given all the possible attributes. |
void |
deleteHost(IHost conn)
Removes a given connection from the list and deletes it from disk. |
IHost |
getHost(int pos)
Return the connection at the given zero-based offset. |
IHost |
getHost(String aliasName)
Return a connection object, given its alias name. |
int |
getHostCount()
Return the number of connections within this pool. |
int |
getHostPosition(IHost conn)
Return the zero-based position of a connection object within this host pool. |
IHost[] |
getHosts()
Return array of connections in this pool. |
String |
getName()
Return the name of this host pool. |
ISystemProfile |
getSystemProfile()
Return the system profile that owns this connection pool. |
void |
moveHosts(IHost[] conns,
int delta)
Move existing connections a given number of positions in the same pool. |
void |
orderHosts(String[] names)
Order connections by alias name, in the order given by the names parameter. |
void |
renameHost(IHost conn,
String newName)
Renames a given connection in the list. |
void |
renameHostPool(String newName)
Rename this connection pool. |
void |
updateHost(IHost conn,
IRSESystemType systemType,
String aliasName,
String hostName,
String description,
String defaultUserId,
int defaultUserIdLocation)
Update an existing connection given the new information. |
Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
Method Detail |
---|
ISystemProfile getSystemProfile()
String getName()
void renameHostPool(String newName)
newName
- the new name for this connection pool.IHost[] getHosts()
IHost createHost(IRSESystemType systemType, String aliasName, String hostName)
THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU.
systemType
- system type matching one of the system types
defined via the systemTypes extension point.aliasName
- unique connection name.hostName
- IP name or address of the host.
IHost createHost(IRSESystemType systemType, String aliasName, String hostName, String description)
THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU.
systemType
- system type matching one of the system types
defined via the systemTypes extension point.aliasName
- unique connection name.hostName
- IP name or address of the host.description
- optional description of the connection. Can be null.
null
if it failed to create
because the aliasName is not unique. All other errors throw an exception.IHost createHost(IRSESystemType systemType, String aliasName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
The new connection is added to the list and saved to disk.
systemType
- system type matching one of the system types
defined via the systemTypes extension point.aliasName
- unique connection name.hostName
- IP name or address of the host.description
- optional description of the connection. Can be null.defaultUserId
- userId to use as the default for the subsystems.defaultUserIdLocation
- where to set the given default user Id. See IRSEUserIdConstants for values.
null
if it failed to create
because the aliasName is not unique.IRSEUserIdConstants
void updateHost(IHost conn, IRSESystemType systemType, String aliasName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
conn
- IHost to be updatedsystemType
- system type matching one of the system types
defined via the systemType extension point.aliasName
- unique connection name.hostName
- IP name or address of the host.description
- optional description of the connection. Can be null.defaultUserId
- userId to use as the default for the subsystems.defaultUserIdLocation
- where to set the given default user Id from IRSEUserIdConstants.IRSEUserIdConstants
IHost getHost(String aliasName)
aliasName
- unique aliasName (case insensitive) to search on.
IHost getHost(int pos)
pos
- zero-based offset of requested connection in the connection list.
boolean addHost(IHost conn)
This method will not ensure that the added connection's alias name is different (case-insensitive) than all other existing alias names. Clients are responsible for maintaining this invariant.
conn
- Connection to add. Must not be null
.
true
if the new connection was added successfully, false otherwise.void deleteHost(IHost conn)
This will:
conn
- IHost object to removevoid renameHost(IHost conn, String newName)
conn
- IHost object to renamenewName
- The new alias name to give that connection.
The alias name is not checked for uniqueness. Clients are responsible
themselves for ensuring that no two connections with the same alias
name (compared case insensitive) are created.int getHostPosition(IHost conn)
conn
- connection to find in this host pool.
int getHostCount()
IHost cloneHost(ISystemHostPool targetPool, IHost conn, String aliasName)
targetPool
- The ISystemHostPool to hold the copied connection. Can equal this pool,
as long as alias name is unique.conn
- IHost object (within our pool) to clone.aliasName
- New, unique, alias name to give this connection. Clone will fail
(returning null
as result) if this is not unique.
null
if the new alias name was not unique.void moveHosts(IHost[] conns, int delta)
conns
- an Array of hosts to move, can be empty but must not be null.delta
- the amount by which to move the hosts within this poolvoid orderHosts(String[] names)
names
- list of connection alias names in expected order.
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |