com.starteam
Class ServerInfo

java.lang.Object
  extended by com.starteam.ServerInfo
All Implemented Interfaces:
java.io.Serializable

public final class ServerInfo
extends java.lang.Object
implements java.io.Serializable

Description: Server Configuration Parameters including the MPX Profile, and Cache Agent Configuration Applications that intend to use the Cache Agent should provide connectivity information through this class.

See Also:
Serialized Form

Field Summary
static int DEFAULT_PORT
          Default server TCP/IP port.
 
Constructor Summary
ServerInfo()
          Construct a ServerInfo instance
ServerInfo(ServerInfo copyFrom)
          Create a copy of a ServerInfo from another one
 
Method Summary
 ServerInfo copy()
          return a copy of this ServerInfo
 boolean equals(java.lang.Object o)
          returns true if the Object passed in is a ServerInfo instance, with the same set of values as this ServerInfo instance
 boolean getAutoLocateCacheAgent()
          Indicates whether or not the best cache agent for this connection will be located automatically.
 int getConnectionType()
          Returns the connection type to be used.
 java.lang.String getDebugString()
          Returns a debug string representation of this server info.
 java.lang.String getDescription()
          Returns the description for this server info entry.
 boolean getEnableCacheAgentForFileContent()
          returns true if a cache agent should be used for file content checkout false to force all checkouts to use the StarTeam server directly.
 boolean getEnableCacheAgentForObjectProperties()
          returns true to fetch object properties from a cache agent false to fetch all properties from the star team server
 Server.EncryptionAlgorithm getEncryption()
          Returns the EncryptionAlgorithm algorithm to use for connections to the server.
 java.lang.String getHost()
          Returns the host name for the server info.
 java.lang.String getMPXCacheAgentAddress()
          Gets the host address of the MPX cache agent.
 int getMPXCacheAgentPort()
          Gets the port number of the MPX cache agent.
 int getMPXCacheAgentThreadCount()
          Gets the number of threads used by the MPX cache agent to fetch file content.
 java.lang.String getMPXProfileName()
          Gets the name of the MPX profile to be used when connecting to this server.
 ServerInfoCollection getOwner()
          Return the owning ServerInfoCollection.
 java.lang.String getPassword()
          Returns a password saved in this ServerInfo.
 int getPort()
          Returns the protocol endpoint for the server info.
 java.lang.String getUserName()
          Returns a user name saved in this ServerInfo.
 int hashCode()
          returns a unique hash for this instance
 boolean isCompression()
          Returns true if compression is to be used when communicating with the server.
 void setAutoLocateCacheAgent(boolean autoLocateCacheAgent)
          Determines whether or not the best cache agent for this connection will be located automatically.
 void setCompression(boolean compress)
          Specify whether or not compression should be used when connecting to the server.
 void setConnectionType(int type)
          Sets the connection type to be used.
 void setDescription(java.lang.String description)
          Changes the description for this server info entry.
 void setEnableCacheAgentForFileContent(boolean EnableCacheAgent)
          Sets whether or not to use the cache agent for file content checkout
 void setEnableCacheAgentForObjectProperties(boolean enableCacheAgent)
          Sets whether or not to use the cache agent for object property caches
 void setEncryption(Server.EncryptionAlgorithm algorithm)
          Sets the EncryptionAlgorithm algorithm to use for conenctions to the server.
 void setHost(java.lang.String host)
          Sets the host name for this server info.
 void setMPXCacheAgentAddress(java.lang.String address)
          Sets the host address of the MPX cache agent.
 void setMPXCacheAgentPort(int port)
          Sets the port number of the MPX cache agent.
 void setMPXCacheAgentThreadCount(int nThreads)
          Sets the number of threads used by the MPX cache agent to fetch file content.
 void setMPXProfileName(java.lang.String strName)
          Sets the name of the MPX profile to be used when connecting to this server.
 void setPassword(java.lang.String password)
          Save a password to this serverInfo instance.
 void setPort(int port)
          Sets the protocol endpoint for the server info.
 void setUserName(java.lang.String userName)
          Save a userName to this serverInfo instance.
 java.lang.String toString()
          Returns this ServerInfo's description.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Default server TCP/IP port.

See Also:
Constant Field Values
Constructor Detail

ServerInfo

public ServerInfo()
Construct a ServerInfo instance


ServerInfo

public ServerInfo(ServerInfo copyFrom)
Create a copy of a ServerInfo from another one

Parameters:
copyFrom - ServerInfo a copy of a ServerInfo
Method Detail

copy

public ServerInfo copy()
return a copy of this ServerInfo

Returns:
ServerInfo a copy of this ServerInfo

equals

public boolean equals(java.lang.Object o)
returns true if the Object passed in is a ServerInfo instance, with the same set of values as this ServerInfo instance

Overrides:
equals in class java.lang.Object
Parameters:
o - Object another instance of a ServerInfo object
Returns:
boolean true if the ServerInfo parameter has the same set of values as this one

hashCode

public int hashCode()
returns a unique hash for this instance

Overrides:
hashCode in class java.lang.Object
Returns:
a unique hash for this instance

getDescription

public java.lang.String getDescription()
Returns the description for this server info entry.

Returns:
the description for this server info entry.

setDescription

public void setDescription(java.lang.String description)
                    throws DuplicateServerListEntryException
Changes the description for this server info entry. If this server info belongs to a ServerList then a check will be performed that the description is not already in use.

Parameters:
description - the new description
Throws:
DuplicateServerListEntryException - if this server info belongs to a ServerList that contains an entry using the new description

getOwner

public ServerInfoCollection getOwner()
Return the owning ServerInfoCollection. May return null.

Returns:
the owning ServerInfoCollection.

getHost

public java.lang.String getHost()
Returns the host name for the server info.

Returns:
the host name for the server info.

setHost

public void setHost(java.lang.String host)
Sets the host name for this server info.

Parameters:
host - the new host name

setPort

public void setPort(int port)
Sets the protocol endpoint for the server info. For example, this should be an IP port number if the protocol is "TCP/IP Sockets".

Parameters:
port - the new endpoint

getPort

public int getPort()
Returns the protocol endpoint for the server info. For example, this should be an IP port number if the protocol is "TCP/IP Sockets".

Returns:
the protocol endpoint for the server info.

getEnableCacheAgentForFileContent

public boolean getEnableCacheAgentForFileContent()
returns true if a cache agent should be used for file content checkout false to force all checkouts to use the StarTeam server directly.

Returns:
boolean true to use a cache agent for file content checkout false to force all checkouts to use the StarTeam server directly.

setEnableCacheAgentForFileContent

public void setEnableCacheAgentForFileContent(boolean EnableCacheAgent)
Sets whether or not to use the cache agent for file content checkout

Parameters:
EnableCacheAgent - boolean whether or not to use the cache agent for file content checkout

getEnableCacheAgentForObjectProperties

public boolean getEnableCacheAgentForObjectProperties()
returns true to fetch object properties from a cache agent false to fetch all properties from the star team server

Returns:
boolean true to fetch object properties from a cache agent false to fetch all properties from the star team server

setEnableCacheAgentForObjectProperties

public void setEnableCacheAgentForObjectProperties(boolean enableCacheAgent)
Sets whether or not to use the cache agent for object property caches

Parameters:
enableCacheAgent - boolean whether or not to use the cache agent for object property caches

getAutoLocateCacheAgent

public boolean getAutoLocateCacheAgent()
Indicates whether or not the best cache agent for this connection will be located automatically.

Returns:
true to autolocate a cache agent, or false to use the cache agent at the specified address and port.

setAutoLocateCacheAgent

public void setAutoLocateCacheAgent(boolean autoLocateCacheAgent)
Determines whether or not the best cache agent for this connection will be located automatically.

Parameters:
autoLocateCacheAgent - true to autolocate a cache agent, or false to use the cache agent at the specified address and port.

getEncryption

public Server.EncryptionAlgorithm getEncryption()
Returns the EncryptionAlgorithm algorithm to use for connections to the server.

Returns:
the EncryptionAlgorithm algorithm to use for connections to the server.

setEncryption

public void setEncryption(Server.EncryptionAlgorithm algorithm)
Sets the EncryptionAlgorithm algorithm to use for conenctions to the server.

Parameters:
algorithm - the new EncryptionAlgorithm algorithm

isCompression

public boolean isCompression()
Returns true if compression is to be used when communicating with the server.

Returns:
true if compression is to be used when communicating with the server.

setCompression

public void setCompression(boolean compress)
Specify whether or not compression should be used when connecting to the server.

Parameters:
compress - true to use compression

getConnectionType

public int getConnectionType()
Returns the connection type to be used.

Returns:
the connection type to be used.
See Also:
ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS

setConnectionType

public void setConnectionType(int type)
Sets the connection type to be used.

Parameters:
type - the connection type to use.
See Also:
ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS

getMPXProfileName

public java.lang.String getMPXProfileName()
Gets the name of the MPX profile to be used when connecting to this server.

Returns:
The name of the MPX profile to be used when connecting to this server, or the empty string if MPX should not be enabled.

setMPXProfileName

public void setMPXProfileName(java.lang.String strName)
Sets the name of the MPX profile to be used when connecting to this server.

Parameters:
strName - The name of the MPX profile to be used when connecting to this server, or the empty string if MPX should not be enabled.

setMPXCacheAgentAddress

public void setMPXCacheAgentAddress(java.lang.String address)
Sets the host address of the MPX cache agent.

Parameters:
address - The host address of the MPX cache agent. Note that if checkouts via the MPX cache agent are enabled, but no host address is explicitly specified, then an attempt is made to automatically locate the nearest cache agent on the network.

getMPXCacheAgentAddress

public java.lang.String getMPXCacheAgentAddress()
Gets the host address of the MPX cache agent.

Returns:
The host address of the MPX cache agent. Note that if checkouts via the MPX cache agent are enabled, but no host address is explicitly specified, then an attempt is made to automatically locate the nearest cache agent on the network.
See Also:
ServerInfo.getEnableCacheAgentForFileContent(), ServerInfo.getMPXCacheAgentPort()

setMPXCacheAgentPort

public void setMPXCacheAgentPort(int port)
Sets the port number of the MPX cache agent.

Parameters:
port - The port number of the MPX cache agent. Note that if host address is specified but no port number is specified, then the default cache agent port (5201) is assumed.

getMPXCacheAgentPort

public int getMPXCacheAgentPort()
Gets the port number of the MPX cache agent.

Returns:
The port number of the MPX cache agent. Note that if host address is specified but no port number is specified, then the default cache agent port is assumed.
See Also:
ServerInfo.getEnableCacheAgentForFileContent(), ServerInfo.getMPXCacheAgentAddress()

setMPXCacheAgentThreadCount

public void setMPXCacheAgentThreadCount(int nThreads)
Sets the number of threads used by the MPX cache agent to fetch file content.

Parameters:
nThreads - The number of threads used by the MPX cache agent to fetch file content. The default value is 3.

getMPXCacheAgentThreadCount

public int getMPXCacheAgentThreadCount()
Gets the number of threads used by the MPX cache agent to fetch file content.

Returns:
The number of threads used by the MPX cache agent to fetch file content. The default value is 3.
See Also:
ServerInfo.getEnableCacheAgentForFileContent()

toString

public java.lang.String toString()
Returns this ServerInfo's description.

Overrides:
toString in class java.lang.Object
Returns:
this ServerInfo's description.

getDebugString

public java.lang.String getDebugString()
Returns a debug string representation of this server info.

Returns:
a debug string representation of this server info.

getUserName

public java.lang.String getUserName()
Returns a user name saved in this ServerInfo. User and& Password Information are never serialized to disk

Returns:
the specified user name

setUserName

public void setUserName(java.lang.String userName)
Save a userName to this serverInfo instance. User and Password Information are never serialized to disk

Parameters:
userName - the user name

getPassword

public java.lang.String getPassword()
Returns a password saved in this ServerInfo. User and Password Information are never serialized to disk

Returns:
the specified password

setPassword

public void setPassword(java.lang.String password)
Save a password to this serverInfo instance. User and Password Information are never serialized to disk

Parameters:
password - the password


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.