com.starteam
Class NetMonitor

java.lang.Object
  extended by com.starteam.NetMonitor

public final class NetMonitor
extends java.lang.Object

Displays information about the commands that are being sent to the StarTeam Server. This may be useful in diagnosing performance problems.


Method Summary
static void addCacheAgentListener(CacheAgentListener listener)
          Registers a listener for CacheAgent events.
static void addServerCommandListener(ServerCommandListener listener)
          Registers a listener for ServerCommand events.
 long getBytesReceived()
           
 long getBytesSent()
           
 int getCommandID()
           
 java.lang.String getCommandName()
           
 int getCommandNumber()
           
 long getCommandTime()
           
static int getRunningCommandCount()
          Gets the total number of server commands currently being executed.
 int getServerThreadID()
           
 int getSessionID()
           
static void kill()
          Turns off the NetMonitor.
static void onConsole()
          Turns on the NetMonitor, sending output to the system console.
static void onFile(java.io.File file)
          Turns on the NetMonitor, sending output to the given file.
static void println(java.lang.String info)
          Writes a message to the NetMonitor output.
static void removeCacheAgentListener(CacheAgentListener listener)
          Removes a listener for CacheAgent events.
static void removeServerCommandListener(ServerCommandListener listener)
          Removes a listener for ServerCommand events.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

onConsole

public static void onConsole()
Turns on the NetMonitor, sending output to the system console.


onFile

public static void onFile(java.io.File file)
Turns on the NetMonitor, sending output to the given file.

Parameters:
file - The output file.
See Also:
File

kill

public static void kill()
Turns off the NetMonitor.


println

public static void println(java.lang.String info)
Writes a message to the NetMonitor output. Useful for debugging.

Parameters:
info - The message to be written.

getRunningCommandCount

public static int getRunningCommandCount()
Gets the total number of server commands currently being executed.

Only one server command can be executed per connection at any given time. However, if there are multiple connections used by different threads, the total number of executing commands may be greater than 1.

Returns:
The total number of server commands currently being executed across all threads.

addServerCommandListener

public static void addServerCommandListener(ServerCommandListener listener)
Registers a listener for ServerCommand events. Event-handlers are triggered when server commands are executed.

Parameters:
listener - The listener to be registered.
See Also:
ServerCommandListener, ServerCommandEvent, NetMonitor.removeServerCommandListener(com.starteam.events.ServerCommandListener)

removeServerCommandListener

public static void removeServerCommandListener(ServerCommandListener listener)
Removes a listener for ServerCommand events.

Parameters:
listener - The listener to be removed. Should have been previously registered via addServerCommandListener().
See Also:
NetMonitor.addServerCommandListener(com.starteam.events.ServerCommandListener)

addCacheAgentListener

public static void addCacheAgentListener(CacheAgentListener listener)
Registers a listener for CacheAgent events. Event-handlers are triggered when content is received from a Cache Agent are executed.

Parameters:
listener - The listener to be registered.
See Also:
CacheAgentListener, CacheAgentEvent, NetMonitor.removeCacheAgentListener(com.starteam.events.CacheAgentListener)

removeCacheAgentListener

public static void removeCacheAgentListener(CacheAgentListener listener)
Removes a listener for CacheAgent events.

Parameters:
listener - The listener to be removed. Should have been previously registered via addCacheAgentListener().
See Also:
NetMonitor.addCacheAgentListener(com.starteam.events.CacheAgentListener)

getSessionID

public int getSessionID()

getServerThreadID

public int getServerThreadID()

getCommandNumber

public int getCommandNumber()

getCommandID

public int getCommandID()

getCommandName

public java.lang.String getCommandName()

getBytesSent

public long getBytesSent()

getBytesReceived

public long getBytesReceived()

getCommandTime

public long getCommandTime()


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