com.starbase.starteam
Class ServerInfo

java.lang.Object
  |
  +--com.starbase.starteam.ServerInfo

public class ServerInfo
extends java.lang.Object


Constructor Summary
ServerInfo()
          Construct a ServerInfo instance
ServerInfo(ServerInfo source)
          Create a copy of a ServerInfo from another one
ServerInfo(java.lang.String description, int connectionType, java.lang.String host, java.lang.String endpoint, boolean compression, EncryptionAlgorithm encryption)
          Deprecated.  
 
Method Summary
 ServerInfo copy()
          return a copy of this ServerInfo
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 boolean getAlwaysEnableCacheAgentForObjectProperties()
          returns true to fetch object properties from a cache agent false to fetch all properties from the star team server
 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 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
 EncryptionAlgorithm getEncryption()
          Returns the encryption algorithm to use for connections to the server.
 java.lang.String getEndpoint()
          Deprecated. Use getPort() instead
 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.
 ServerList getOwner()
          Return the owning ServerList.
 int getPort()
          Returns the protocol endpoint for the server info.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isCompression()
          Returns true if compression is to be used when communicating with the server.
 boolean isEqualTo(ServerInfo source)
          returns true if this object instance is equal to the source
 void setAlwaysEnableCacheAgentForObjectProperties(boolean enableCacheAgent)
          Sets whether or not to always use the cache agent for object property caches If this option is set, then the cache agent is used to fetch object properties, regardless of whether it is determinable that the same fetch from the server would be more optimal This property is always false by default, and must be explicitly set each time the action is desired.
 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(EncryptionAlgorithm encryption)
          Sets the encryption algorithm to use for conenctions to the server.
 void setEndpoint(java.lang.String endpoint)
          Deprecated. Use setPort(int) instead
 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 setPort(int port)
          Sets the protocol endpoint for the server info.
 java.lang.String toDebugString()
          Returns a debug string representation of this server info.
 java.lang.String toString()
          Returns this ServerInfo's description.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerInfo

public ServerInfo()
Construct a ServerInfo instance


ServerInfo

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


ServerInfo

public ServerInfo(java.lang.String description,
                  int connectionType,
                  java.lang.String host,
                  java.lang.String endpoint,
                  boolean compression,
                  EncryptionAlgorithm encryption)
Deprecated.  

Create a new ServerInfo object.

Parameters:
description - the description to use for this server entry
connectionType - the type of connection to use
host - the host address for the server
endpoint - the protocol specific endpoint. For TCP/IP connections this would be the TCP/IP port number.
compression - true if the connection should use compression
encryption - the type of encryption to use
See Also:
ServerConfiguration.PROTOCOL_LRPC, ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS, ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS_XML, ServerConfiguration.PROTOCOL_NETBIOS, ServerConfiguration.PROTOCOL_IPX, ServerConfiguration.PROTOCOL_NAMED_PIPE, ServerConfiguration.PROTOCOL_TCP_IP_RPC, ServerInfo.ServerInfo()
Method Detail

copy

public ServerInfo copy()
return a copy of this ServerInfo

Returns:
ServerInfo a copy of this ServerInfo

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 ServerList getOwner()
Return the owning ServerList. May return null.

Returns:
the owning ServerList.

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

getEndpoint

public java.lang.String getEndpoint()
Deprecated. Use getPort() instead

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.
See Also:
ServerInfo.getPort()

setEndpoint

public void setEndpoint(java.lang.String endpoint)
Deprecated. Use setPort(int) instead

Sets the protocol endpoint for the sevrer info. For example, this should be an IP port number if the protocol is "TCP/IP Sockets".

Parameters:
endpoint - the new endpoint
See Also:
ServerInfo.setPort(int)

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


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.

getEncryption

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

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

setEncryption

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

Parameters:
encryption - the new encryption 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 -

getConnectionType

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

Returns:
the connection type to be used.
See Also:
ServerConfiguration.PROTOCOL_LRPC, ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS, ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS_XML, ServerConfiguration.PROTOCOL_NETBIOS, ServerConfiguration.PROTOCOL_IPX, ServerConfiguration.PROTOCOL_NAMED_PIPE, ServerConfiguration.PROTOCOL_TCP_IP_RPC

setConnectionType

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

Parameters:
type - the connection type to use.
See Also:
ServerConfiguration.PROTOCOL_LRPC, ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS, ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS_XML, ServerConfiguration.PROTOCOL_NETBIOS, ServerConfiguration.PROTOCOL_IPX, ServerConfiguration.PROTOCOL_NAMED_PIPE, ServerConfiguration.PROTOCOL_TCP_IP_RPC

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:
Server.getMPXCacheAgentEnabled(), 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:
Server.getMPXCacheAgentEnabled(), 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:
Server.getMPXCacheAgentEnabled()

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.


getAlwaysEnableCacheAgentForObjectProperties

public boolean getAlwaysEnableCacheAgentForObjectProperties()
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
See Also:
getEnableCacheAgentForObjectProperties

setAlwaysEnableCacheAgentForObjectProperties

public void setAlwaysEnableCacheAgentForObjectProperties(boolean enableCacheAgent)
Sets whether or not to always use the cache agent for object property caches If this option is set, then the cache agent is used to fetch object properties, regardless of whether it is determinable that the same fetch from the server would be more optimal This property is always false by default, and must be explicitly set each time the action is desired. This property value is never saved to disk.

See Also:
setEnableCacheAgentForObjectProperties

toString

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

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

toDebugString

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

Returns:
a debug string representation of this server info.

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

isEqualTo

public boolean isEqualTo(ServerInfo source)
returns true if this object instance is equal to the source

Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.