|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.starteam.Server
The Server class provides network access to a remote StarTeam Server. It only supports access through TCP/IP sockets and has the ability to encrypt and compress all communication between the client server.
| Constructor Summary | |
Server(ServerInfo info)
Creates a new Server object, using the given connection information. |
|
Server(java.lang.String address,
int port)
Constructs an object that represents a remote server process. |
|
Server(java.lang.String address,
int port,
EncryptionAlgorithm algorithmID,
boolean compressionLevel)
Constructs an object that represents a remote server process specifying the encpryption algorithm and compression levels to use. |
|
Server(java.lang.String address,
int port,
EncryptionAlgorithm algorithmID,
boolean compressionLevel,
int protocol)
Constructs an object that represents a remote server process specifying the encpryption algorithm and compression levels to use. |
|
| Method Summary | |
void |
addMPXStatusListener(MPXStatusListener listener)
Adds a listener for MPXStatusEvents. |
void |
addProjectListener(ProjectListener listener)
Adds a listener for Project events. |
void |
addServerControlListener(ServerControlListener listener)
Adds a listener for ServerControl events. |
void |
addTypeListener(TypeListener listener)
Adds a listener for Type events. |
void |
addUserListener(UserListener listener)
Adds a listener for User events. |
CacheAgent |
autoLocateCacheAgent()
autoLocate a Cache Agent, return null if none found Attempts to autolocate can be expensive |
int |
autoLogOn()
Log on to this server using credentials that have been cached on this workstation. |
void |
cacheLogOnCredentials(java.lang.String username,
java.lang.String password)
Saves logon credentials for this server so that they may be used in future calls to autoLogOn(). |
void |
changePassword(java.lang.String logOnName,
java.lang.String password,
java.lang.String newPassword)
Changes the password to the specified new password upon a successful login to the server, and immediately logs out. |
void |
connect()
Establishes a network connection to the remote server process. |
void |
disableMPX()
Disables MPX, if it was enabled for this server. |
void |
discardAccounts()
Discards all cached User and Group information. |
void |
discardGroups()
Discards cached Group information. |
void |
discardTypes()
Discards all cached Type information. |
void |
discardUsers()
Discards cached User information. |
void |
disconnect()
Terminates the network connection to the remote server process. |
static void |
enableCredentialCaching()
Enables credential caching on this workstation, if it is available and not already enabled. |
void |
enableMPX()
Enables MPX using the default client MPX profile. |
void |
enableMPX(EventHandlerProfile profile)
Enables MPX using the given MPX profile. |
void |
enableMPX(java.lang.String strProfileName)
Enables MPX using the MPX profile with the given name. |
boolean |
equals(java.lang.Object object)
Two Server objects are considered equal only if they
are exact same objects. |
User[] |
fetchEmailUsers()
This method issues a command to the server to return the list of users that are able to recieve email messages. |
Link[] |
findLinks(Item item)
Returns an array of Link objects associated with this
item. |
Group[] |
getActiveGroups()
Returns all of the active (non-deleted) groups in this Server. |
User[] |
getActiveUsers()
Returns all of the active (non-deleted) users in this Server. |
java.lang.String |
getAddress()
Network address of this server. |
ServerAdministration |
getAdministration()
Returns the ServerAdministration
object through which various
administration operations can be performed on the server. |
int |
getAutoReconnectAttempts()
If automatic reconnect is enabled, indicates the maximum number of attempts to reconnect that will be made while executing a single server command. |
int |
getAutoReconnectWait()
If automatic reconnect is enabled, indicates the number of seconds that we will wait before each reconnect attempt. |
ClientContext |
getClientContext()
Returns the ClientContext associated when logged in to the Server. |
java.lang.String |
getCommandAPIRevisionLevel()
Returns the command interface revision level (dot notation) supported by this server. |
int |
getCommandCount()
Gets the number of commands sent to the StarTeam server since the connection was established. |
CacheAgent |
getCurrentCacheAgent()
returns the CacheAgent currently in use by this server, or null |
EventHandlerProfile |
getCurrentMPXProfile()
Gets the current MPX event handler profile. |
OLEDate |
getCurrentTime()
Gets the current time on the server. |
EncryptionAlgorithm |
getEncryptionAlgorithm()
Gets the level of encryption requested for the connection. |
EventHandlerInfo |
getEventHandlerInfo(java.lang.String eventHandlerInfoName)
Returns the specified EventHandlerInfo object on this server. |
java.lang.String[] |
getEventHandlerInfoNames()
Returns an array containing the names of all existing EventHandlerInfos on this server. |
Filter[] |
getFilterList(Type type,
boolean pub)
|
java.lang.String[] |
getForeignArchivePaths(int projectType,
java.lang.String configFile)
Get the archive paths of the foreign archive specified. |
Group |
getGroup(int groupID)
Returns the Group object for the given ID. |
Group[] |
getGroups()
Returns all of the groups on this Server. |
int |
getKeepAliveInterval()
Gets the keep-alive interval, in minutes. |
boolean |
getMPXCacheAgentEnabled()
Deprecated. use ServerInfo#getUseCacheAgentForFileContent() instead |
int |
getMPXMessageCount()
Gets the number of MPX messages received by the server since MPX was enabled. |
java.lang.String |
getMPXTransmitterName()
The name of the event handler for the StarTeam MPX Transmitter. |
MyUserAccount |
getMyUserAccount()
Returns the user account for the currently logged on user. |
int |
getPort()
TCP/IP port on which to connect to the remote server. |
int[] |
getProductCodes()
Gets the product codes licensed for this server. |
Project[] |
getProjects()
Gets the set of Projects accessible from this Server. |
PropertyEnums |
getPropertyEnums()
Returns the PropertyEnums object for this server. |
PropertyNames |
getPropertyNames()
Returns the PropertyNames object for this server. |
int |
getProtocol()
Gets the protocol used to connect to the server. |
QueryInfo[] |
getQueryList(Type type,
boolean pub)
|
GUID |
getRepositoryID()
Uniquely identifies the repository served by this server amongst all StarTeam repositories in the universe. |
EncryptionAlgorithm |
getRequiredEncryptionLevel()
Returns the level of security required to connect to the server. |
short |
getRevisionLevel()
Returns the interface revision level supported by this server. |
java.lang.String |
getServerBuild()
Returns the server build number as reported by the server. |
java.lang.String |
getServerBuildDescription()
Returns a server build description as reported by the server. |
ServerSession |
getSession()
Returns session information for the currently logged on user. |
SupportedFeatures |
getSupportedFeatures()
Gets an instance of the SupportedFeatures class that can tell which features are available for this StarTeam server. |
TypeNames |
getTypeNames()
Returns the TypeNames object for this server. |
Type[] |
getTypes()
Returns an array of Type objects supported by this
server. |
User |
getUser(int userID)
Returns the User object for the given ID. |
User[] |
getUsers()
Returns all of the users in this Server. |
void |
handleEvents()
Places the current thread in an event-handling state. |
int |
hashCode()
Returns a hash code for this object. |
boolean |
hasProductCode(int code)
Determines whether or not the server has a license for the specified product code. |
boolean |
hasProductCodeInformation()
Deprecated. All supported versions of the StarTeam server provided licensed product codes. This method always returns true. |
void |
interruptHandleEvents()
Interrupts a handleEvents() loop, if there is one running. |
boolean |
isAutoLogOnAvailable()
Determines whether or not logon credentials for this server have been cached on this workstation. |
boolean |
isAutoReconnectEnabled()
Indicates whether or not a reconnect is automatically attempted whenever a connection problem is detected while executing a server command. |
boolean |
isCompressed()
Determines whether or not the server connection is compressed. |
boolean |
isConnected()
Tells whether a network connection has been established to the server. |
static boolean |
isCredentialCachingAvailable()
Determines whether or not the credential caching feature is available on this workstation. |
static boolean |
isCredentialCachingEnabled()
Determines whether or not credential caching is enabled on this workstation. |
boolean |
isKeepAlive()
Determines whether or not keep-alive mode is in effect. |
boolean |
isLoggedOn()
Returns true if someone has logged on through this server object. |
boolean |
isMailAvailable()
Determines whether or not the server supports email. |
boolean |
isMPXAvailable()
Determines whether or not MPX is installed on this server. |
boolean |
isMPXEnabled()
Determines whether or not MPX has been enabled for this server. |
boolean |
isMPXResponding()
Determines whether or not the MPX server is running properly. |
boolean |
isRefreshAccountsRequired()
Returns true if a refreshAccounts() operation might have resulted in User or Group information being updated; returns false if and only if it is known that the User and Group information had not been changed since the last refresh. |
boolean |
isRefreshGroupsRequired()
Returns true if a refreshGroups() operation might have resulting in Group information being updated; returns false if and only if it is known that the Group information had not been changed since the last refresh. |
boolean |
isRefreshTypesRequired()
Returns true if a refreshTypes() operation might have resulted in Type or Property information being updated; returns false if and only if it is known that the Type information has not been changed since the last refresh. |
boolean |
isRefreshUsersRequired()
Returns true if a refreshUsers() operation might have resulted in User information being updated; returns false if and only if it is known that the User information had not been changed since the last refresh. |
boolean |
isTypeSupported(java.lang.String typeName)
Return true if the type with the specified name is supported by this server. |
CacheAgent |
locateCacheAgent(java.lang.String hostName,
int port)
locate a CacheAgent at a given address and port |
int |
logOn(java.lang.String logOnName,
java.lang.String password)
Establishes a user-session with the remote server process. |
int |
logOnForWorkstation(java.lang.String logOnName,
java.lang.String password,
GUID workStationID)
Establishes a user-session with the remote server process, on behalf of the workstation with the given ID. |
int |
logOnWithClientContext(java.lang.String logOnName,
java.lang.String password,
ClientContext context)
Establishes a user-session with the remote server process, on behalf of the specified ClientContext. |
boolean |
ping()
Verifies that the server is responding and informs the server that this connection/user session is still active. |
void |
pingMPXServer()
Throws an appropriate MPXException if the MPX server is not running properly. |
void |
reconnect()
Attempts to re-establish the connection to the server, re-opening any existing view sessions. |
void |
reconnect(java.lang.String password)
Attempts to re-establish the connection to the server, re-opening any existing view sessions. |
void |
refreshAccounts()
Refreshes cached User and Group information. |
void |
refreshGroups()
Refreshes cached Group information to reflect recent changes to the repository. |
void |
refreshTypes()
Refreshes cached Type information to reflect recent changes to the repository. |
void |
refreshTypesInPlace()
Deprecated. |
void |
refreshUsers()
Refreshes cached User information to reflect recent changes to the repository. |
void |
removeMPXStatusListener(MPXStatusListener listener)
Removes a listener for MPXStatusEvents. |
void |
removeProjectListener(ProjectListener listener)
Removes a listener for Project events. |
void |
removeServerControlListener(ServerControlListener listener)
Removes a listener for ServerControl events. |
void |
removeTypeListener(TypeListener listener)
Removes a listener for Type events. |
void |
removeUserListener(UserListener listener)
Removes a listener for User events. |
void |
sendMailFromView(View view,
int[] to,
int[] cc,
int[] bcc,
java.lang.String subject,
java.lang.String body)
Directs the StarTeam Server to send mail to the specified StarTeam users. |
void |
sendMailWithAttachments(View view,
int[] to,
int[] cc,
int[] bcc,
java.lang.String subject,
java.lang.String body,
EmailAttachment[] attachments)
Directs the StarTeam Server to send mail to the specified StarTeam users. |
void |
setAutoReconnectAttempts(int nAttempts)
If automatic reconnect is enabled, specifies the maximum number of attempts to reconnect that will be made while executing a single server command. |
void |
setAutoReconnectEnabled(boolean bEnabled)
Specifies whether or not a reconnect is automatically attempted whenever a connection problem is detected while executing a server command. |
void |
setAutoReconnectWait(int nSeconds)
If automatic reconnect is enabled, specifies the number of seconds that we will wait before each reconnect attempt. |
void |
setCommandUserID(int userID)
act like a given User different from the User currently logged in |
void |
setForeignPassword(Project project)
Sets a password for the foreign archive associated with this project. |
void |
setForeignPasswordExplicit(java.lang.String configPath,
int type,
java.lang.String password)
Sets a password for the foreign archive specified. |
void |
setKeepAlive(boolean bKeepAlive)
Enables or disables keep-alive mode. |
void |
setKeepAliveInterval(int nMinutes)
Sets the keep-alive interval, in minutes. |
void |
setMPXCacheAgentEnabled(boolean bEnabled)
Deprecated. use ServerInfo#setUseCacheAgentForFileContent(boolean) instead |
java.lang.String |
toString()
Returns a summary String representation of this server. |
Type |
typeForClassID(int classID)
Looks up the type information based on a type-number. |
Type |
typeForName(java.lang.String typeName)
Returns a type instance for a type name. |
Connection |
useConnection()
This method is no longer supported |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Server(java.lang.String address,
int port)
address - the host address of the remote serverport - the TCP/IP port of the remote server
public Server(java.lang.String address,
int port,
EncryptionAlgorithm algorithmID,
boolean compressionLevel)
address - the host address of the remote server (may not be null)port - the TCP/IP port of the remote serveralgorithmID - the level of encryption desired for the connection.
Value may be null.compressionLevel - true if compression should be used for
data transmission.
public Server(java.lang.String address,
int port,
EncryptionAlgorithm algorithmID,
boolean compressionLevel,
int protocol)
address - the host address of the remote server (may not be null)port - the TCP/IP port of the remote serveralgorithmID - the level of encryption desired for the connection.
Value may be null.compressionLevel - true if compression should be used for
data transmission.protocol - to be used to connect to the server. Can only be
ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS_XML or
ServerConfiguration.PROTOCOL_TCP_IP_SOCKETSServerConfiguration.PROTOCOL_TCP_IP_SOCKETS_XML,
ServerConfiguration.PROTOCOL_TCP_IP_SOCKETSpublic Server(ServerInfo info)
The ServerInfo must specify a supported protocol; otherwise, an IllegalArgumentException will be thrown.
If ServerInfo specifies an MPXProfileName, then later, after the Server connection itself is established, an attempt will be made to automatically enable MPX.
info - Server connection information.ServerInfo,
Server.connect(),
Server.enableMPX()| Method Detail |
public ServerAdministration getAdministration()
ServerAdministration
object through which various
administration operations can be performed on the server.
public Link[] findLinks(Item item)
Link objects associated with this
item.
item - the item
public void setCommandUserID(int userID)
userID - intpublic boolean equals(java.lang.Object object)
Server objects are considered equal only if they
are exact same objects. This means two different Server
objects to the same network address will not be considered equal
even though they in some sense represent the same StarTeam repository.
equals in class java.lang.Objectobject - the object being compared
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isRefreshTypesRequired()
Server.refreshTypes(),
Server.enableMPX()public void refreshTypes()
Server.getTypes(),
Server.isRefreshTypesRequired(),
Server.discardTypes(),
Server.enableMPX()public void refreshTypesInPlace()
Server.refreshTypes()public void discardTypes()
public MyUserAccount getMyUserAccount()
The user account information is not cached in the Server object; each call to getMyUserAccount() returns up-to-date information in a newly allocated MyUserAccount object.
getMyUserAccount() is not MPX-enabled; the account information is always retrieved directly from the repository.
public ServerSession getSession()
public User[] fetchEmailUsers()
Server.sendMailFromView(com.starbase.starteam.View, int[], int[], int[], java.lang.String, java.lang.String),
Server.sendMailWithAttachments(com.starbase.starteam.View, int[], int[], int[], java.lang.String, java.lang.String, com.starbase.starteam.EmailAttachment[])public boolean isRefreshUsersRequired()
Server.refreshUsers(),
Server.enableMPX()public void refreshUsers()
Server.isRefreshUsersRequired(),
Server.getUsers(),
Server.discardUsers(),
Server.enableMPX()public void discardUsers()
Server.getUsers(),
Server.refreshUsers()public void refreshAccounts()
Server.isRefreshAccountsRequired(),
Server.refreshUsers(),
Server.refreshGroups(),
Server.discardAccounts()public void discardAccounts()
Server.refreshAccounts()public boolean isRefreshAccountsRequired()
Server.refreshAccounts(),
Server.isRefreshUsersRequired(),
Server.isRefreshGroupsRequired(),
Server.enableMPX()public boolean isRefreshGroupsRequired()
Server.refreshGroups(),
Server.enableMPX()public void discardGroups()
Server.getGroups(),
Server.refreshGroups()public void refreshGroups()
Server.isRefreshGroupsRequired(),
Server.getGroups(),
Server.discardGroups()public java.lang.String getAddress()
public int getPort()
public EncryptionAlgorithm getEncryptionAlgorithm()
EncryptionAlgorithmpublic boolean isCompressed()
public int getProtocol()
ServerConfiguration.PROTOCOL_TCP_IP_SOCKETS_XML,
ServerConfiguration.PROTOCOL_TCP_IP_SOCKETSpublic GUID getRepositoryID()
com.starbase.util.GUIDpublic EncryptionAlgorithm getRequiredEncryptionLevel()
public boolean isConnected()
public Connection useConnection()
public ClientContext getClientContext()
public Project[] getProjects()
The project list is not cached in the Server object. Each call to getProjects() returns an up-to-date project list consisting of newly allocated Project objects.
If MPX is enabled, getProjects() is optimized to avoid unnecessary server commands.
public boolean isTypeSupported(java.lang.String typeName)
typeName - the name of the type in question.
Server.getTypes(),
Server.typeForClassID(int),
Server.typeForName(String),
Server.getTypeNames()public Type[] getTypes()
Type objects supported by this
server.
Types instancesServer.isTypeSupported(String),
Server.typeForClassID(int),
Server.typeForName(String),
Server.getTypeNames()
public Type typeForName(java.lang.String typeName)
throws java.lang.IllegalArgumentException,
TypeNotFoundException
typeName - name of type in question. Must not be null.
Type object representing the type information
TypeNotFoundException - if the type is not found.
java.lang.IllegalArgumentException - if the typeName
parameter is nullServer.isTypeSupported(String),
Server.getTypes(),
Server.typeForClassID(int),
Server.getTypeNames()
public Type typeForClassID(int classID)
throws TypeNotFoundException
classID - a server-assigned number that identifies the type
TypeNotFoundException - if the
given type name is not valid in this name spaceServer.isTypeSupported(String),
Server.getTypes(),
Server.typeForName(String),
Server.getTypeNames()public User[] getActiveUsers()
Server.getUsers()public User[] getUsers()
Server.refreshUsers(),
Server.discardUsers(),
Server.getActiveUsers()public Group[] getActiveGroups()
Server.getGroups()public Group[] getGroups()
Server.refreshGroups(),
Server.discardGroups(),
Server.getActiveGroups()public User getUser(int userID)
User object for the given ID.
userID - the user ID in question
User object with the given ID. Will return null
if not found.Server.getUsers()public Group getGroup(int groupID)
Group object for the given ID.
groupID - the group ID in question
Group object with the given ID. Will return null
if not found.Server.getGroups()public SupportedFeatures getSupportedFeatures()
java.lang.IllegalStateException - if the server is not connectedServer.isConnected()public boolean hasProductCodeInformation()
ProductCodes,
Server.getProductCodes(),
Server.hasProductCode(int)public int[] getProductCodes()
ProductCodes,
Server.hasProductCodeInformation(),
Server.hasProductCode(int)public boolean hasProductCode(int code)
code - A product code.
ProductCodes,
Server.getProductCodes(),
Server.hasProductCodeInformation()public short getRevisionLevel()
public java.lang.String getCommandAPIRevisionLevel()
public java.lang.String getServerBuild()
public java.lang.String getServerBuildDescription()
public PropertyNames getPropertyNames()
PropertyNames object for this server.
You must have already connected to the server or an
IllegalStateException will be thrown.
public PropertyEnums getPropertyEnums()
PropertyEnums object for this server.
You must have already connected to the server or an
IllegalStateException will be thrown.
public TypeNames getTypeNames()
TypeNames object for this server. You must have
already connected to the server or an IllegalStateException
will be thrown.
public int getCommandCount()
public int getMPXMessageCount()
public void connect()
If the network connection is successfully established, and an MPXProfileName was specified in the Server constructor, then an attempt is made to automatically enable MPX. If an MPXException is thrown, it will be ignored, and will not cause the connect() to fail. An application can use isMPXEnabled() to determine whether or not MPX was properly enabled.
Server.Server(ServerInfo),
Server.enableMPX(),
Server.isMPXEnabled()public void disconnect()
public int logOn(java.lang.String logOnName,
java.lang.String password)
logOnName - the user's logon namepassword - the user's password
public void changePassword(java.lang.String logOnName,
java.lang.String password,
java.lang.String newPassword)
public int logOnForWorkstation(java.lang.String logOnName,
java.lang.String password,
GUID workStationID)
logOnName - The user's logon name.password - The user's password.workStationID - The GUID of the client workstation.
GUID
public int logOnWithClientContext(java.lang.String logOnName,
java.lang.String password,
ClientContext context)
logOnName - The user's logon name.password - The user's password.context - The ClientContext of the client workstation.
GUIDpublic void reconnect()
Uses the user credentials provided at logon time.
Server.isAutoReconnectEnabled()public void reconnect(java.lang.String password)
The server will re-authenticate the connection using the user name provided at logon time and the given password.
password - The password used to re-authenticate the connection.public boolean isAutoReconnectEnabled()
Server.getAutoReconnectAttempts(),
Server.getAutoReconnectWait(),
Server.reconnect()public void setAutoReconnectEnabled(boolean bEnabled)
bEnabled - true if a reconnect is automatically attempted
whenever a connection problem is detected while executing a server
command.public int getAutoReconnectAttempts()
Server.isAutoReconnectEnabled(),
Server.getAutoReconnectWait(),
Server.reconnect()public void setAutoReconnectAttempts(int nAttempts)
nAttempts - If automatic reconnect is enabled, the maximum number
of attempts to reconnect that will be made while executing a single
server command.public int getAutoReconnectWait()
Server.isAutoReconnectEnabled(),
Server.getAutoReconnectAttempts(),
Server.reconnect()public void setAutoReconnectWait(int nSeconds)
nSeconds - If automatic reconnect is enabled, the number of
seconds that we will wait before each reconnect attempt.public boolean ping()
public OLEDate getCurrentTime()
SupportedFeatures.hasCurrentTime()public static boolean isCredentialCachingAvailable()
Server.autoLogOn(),
Server.isCredentialCachingEnabled()public static boolean isCredentialCachingEnabled()
Server.autoLogOn(),
Server.isCredentialCachingAvailable(),
Server.enableCredentialCaching()public static void enableCredentialCaching()
Server.autoLogOn(),
Server.isCredentialCachingAvailable(),
Server.isCredentialCachingEnabled(),
Server.cacheLogOnCredentials(java.lang.String, java.lang.String)public boolean isAutoLogOnAvailable()
Server.autoLogOn(),
Server.isCredentialCachingEnabled(),
Server.cacheLogOnCredentials(java.lang.String, java.lang.String)public int autoLogOn()
Server.isAutoLogOnAvailable(),
Server.cacheLogOnCredentials(java.lang.String, java.lang.String)
public void cacheLogOnCredentials(java.lang.String username,
java.lang.String password)
username - the user name to save.password - the password to save.
Server.autoLogOn(),
Server.isAutoLogOnAvailable(),
Server.isCredentialCachingEnabled()public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isLoggedOn()
public void sendMailFromView(View view,
int[] to,
int[] cc,
int[] bcc,
java.lang.String subject,
java.lang.String body)
view - a valid view the sender has access toto - the user IDs to whom the mail should be sent (To:)cc - the user IDs to whom the mail should be cc'd (Cc:)bcc - the user IDs to whom the mail should be blind-cc'd (Bcc:)subject - the subject text for the mail messagebody - the body of the mail message
public void sendMailWithAttachments(View view,
int[] to,
int[] cc,
int[] bcc,
java.lang.String subject,
java.lang.String body,
EmailAttachment[] attachments)
view - a valid view the sender has access toto - the user IDs to whom the mail should be sent (To:)cc - the user IDs to whom the mail should be cc'd (Cc:)bcc - the user IDs to whom the mail should be blind-cc'd (Bcc:)subject - the subject text for the mail messagebody - the body of the mail messageattachments - The attachments to include with the email
public Filter[] getFilterList(Type type,
boolean pub)
public QueryInfo[] getQueryList(Type type,
boolean pub)
public void setForeignPassword(Project project)
project - StarTeam Project.
public void setForeignPasswordExplicit(java.lang.String configPath,
int type,
java.lang.String password)
configPath - the path to the configuration file of the foreign archive.type - type of the project.password - the new password to the foreign archive.public boolean isMailAvailable()
public java.lang.String[] getEventHandlerInfoNames()
public EventHandlerInfo getEventHandlerInfo(java.lang.String eventHandlerInfoName)
eventHandlerInfoName - The name of the EventHandlerInfo object to be returned.
Server.getEventHandlerInfoNames()public boolean isMPXAvailable()
Server.enableMPX(),
Server.enableMPX(String),
Server.enableMPX(EventHandlerProfile)
public void enableMPX()
throws MPXException
MPXExceptionServer.enableMPX(String),
Server.enableMPX(EventHandlerProfile)
public void enableMPX(java.lang.String strProfileName)
throws MPXException
strProfileName - The name of an MPX profile on this server.
MPXExceptionServer.enableMPX(),
Server.enableMPX(EventHandlerProfile)
public void enableMPX(EventHandlerProfile profile)
throws MPXException
profile - An MPX profile.
MPXExceptionServer.enableMPX(),
Server.enableMPX(String),
Server.isMPXAvailable(),
Server.isMPXEnabled(),
Server.isMPXResponding(),
Server.pingMPXServer(),
Server.disableMPX()public java.lang.String getMPXTransmitterName()
public boolean isMPXEnabled()
public EventHandlerProfile getCurrentMPXProfile()
public boolean isMPXResponding()
public void pingMPXServer()
throws MPXException
MPXExceptionpublic void disableMPX()
public void handleEvents()
While in an event-handling state, the thread is usually asleep, waking occasionally just long enough to ping the server (keeping the connection alive). The event-handling loop continues until some other thread (presumably, the event-handling thread for this Server object) calls interruptHandleEvents().
An application does not need to call handleEvents() in order to handle events; this is just a convenience method for applications that have nothing else they need to do while waiting for an event to occur.
Only one thread may call handleEvents() per Server object at any given time. After handleEvents() exits (as a result of a call to interruptHandleEvents), then handleEvents() may be called again by the same thread or by some other thread.
handleEvents() will fail if MPX is not enabled, or if there are no event-handlers running.
handleEvents() should not be called from within an event handler. (This would put the event-handling thread to sleep.)
Server.interruptHandleEvents(),
Server.enableMPX()public void interruptHandleEvents()
Server.handleEvents()public void addMPXStatusListener(MPXStatusListener listener)
Event handlers will be tiggered whenever an important change occurs in the status of MPX or the MPX event transmitter.
listener - Application-specific event handler for MPXStatusEvents.MPXStatusListener,
MPXStatusAdapter,
Server.removeMPXStatusListener(com.starbase.starteam.MPXStatusListener)public void removeMPXStatusListener(MPXStatusListener listener)
listener - Previously-registered event handlers for MPXStatusEvents.MPXStatusListener,
Server.addMPXStatusListener(com.starbase.starteam.MPXStatusListener)public void addServerControlListener(ServerControlListener listener)
Event handlers will be tiggered whenever this Server is stopped or restarted.
In order to handle events, an application must enable MPX.
listener - Application-specific event handler for ServerControl events.ServerControlListener,
ServerControlAdapter,
Server.removeServerControlListener(com.starbase.starteam.ServerControlListener),
Server.enableMPX()public void removeServerControlListener(ServerControlListener listener)
listener - Previously-registered event handlers for ServerControl events.ServerControlListener,
Server.addServerControlListener(com.starbase.starteam.ServerControlListener)public void addTypeListener(TypeListener listener)
Event handlers will be tiggered whenever a Type (or its associated Properties) are modified on this Server.
In order to handle events, an application must enable MPX.
listener - Application-specific event handler for Type events.TypeListener,
TypeAdapter,
Server.removeTypeListener(com.starbase.starteam.TypeListener),
Server.enableMPX()public void removeTypeListener(TypeListener listener)
listener - Previously-registered event handler for Type events.TypeListener,
Server.addTypeListener(com.starbase.starteam.TypeListener)public void addUserListener(UserListener listener)
Event handlers will be tiggered whenever a User is added, changed or deleted on this Server.
In order to handle events, an application must enable MPX.
listener - Application-specific event handler for User events.UserListener,
UserAdapter,
Server.removeUserListener(com.starbase.starteam.UserListener),
Server.enableMPX()public void removeUserListener(UserListener listener)
listener - Previously-registered event handler for User events.UserListener,
Server.addUserListener(com.starbase.starteam.UserListener)public void addProjectListener(ProjectListener listener)
Event handlers will be tiggered whenever a Project is added, changed or deleted on this Server. Note that an application will not receive events for Projects that the logged-in user does not have permission to access.
In order to handle events, an application must enable MPX.
listener - Application-specific event handler for Project events.ProjectListener,
ProjectAdapter,
Server.removeProjectListener(com.starbase.starteam.ProjectListener),
Server.enableMPX()public void removeProjectListener(ProjectListener listener)
listener - Previously-registered event handler for Project events.ProjectListener,
Server.addProjectListener(com.starbase.starteam.ProjectListener)public int getKeepAliveInterval()
Server.setKeepAlive(boolean)public void setKeepAliveInterval(int nMinutes)
nMinutes - The new keep-alive interval, in minutes.public boolean isKeepAlive()
Server.getKeepAliveInterval()public void setKeepAlive(boolean bKeepAlive)
bKeepAlive - true to enable keep-alive mode; false to disable it.
In keep-alive mode, a background thread periodically pings the
server to keep the connection alive. Keep-alive is off by default.
public java.lang.String[] getForeignArchivePaths(int projectType,
java.lang.String configFile)
Server.setForeignPasswordExplicit(java.lang.String, int, java.lang.String),
PropertyEnums.PROJECT_TYPE_PVCS,
PropertyEnums.PROJECT_TYPE_VISUAL_SOURCESAFEpublic CacheAgent autoLocateCacheAgent()
public CacheAgent locateCacheAgent(java.lang.String hostName,
int port)
hostName - String the address at which to look for a cache agentport - int the port the port the cache agent is running on
public CacheAgent getCurrentCacheAgent()
public void setMPXCacheAgentEnabled(boolean bEnabled)
bEnabled - True to enable checkouts via the MPX cache agent;
false to force all checkouts to use the StarTeam server directly.ServerInfo#setUseCacheAgentForFileContent(boolean)public boolean getMPXCacheAgentEnabled()
#getMPXCacheAgentAddress,
#getMPXCacheAgentPort,
#getMPXCacheAgentThreadCount,
ServerInfo#getUseCacheAgentForFileContent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||