Open SiteSearch 4.1.1
Final

ORG.oclc.ops
Interface OpsClient

All Known Implementing Classes:
OpsManager

public abstract interface OpsClient

The OpsClient interface defines the methods required to implement and operations client in the SiteSearch system. It defines methods to initialize the client, register/unregister with an operations server, update server status information, and retrieve remote server location information.


Method Summary
 void alert(Object alertData)
          Sends an object to the OpsClient containing operations alert information.
 void beginSession(Object user)
          Increments the server session count by one.
 void decrConnectedClients()
          Decrements the currently connected client count for the server.
 void decrFD()
          Decrements the count of file descriptors in use by the server.
 void endSession(Object user)
          Decrements the server session count by one.
 String getHostID()
          Retrieves a String containing a host identifier for the server.
 ServerLocation getServerLocation(String serverName, String sessionId)
          Gets a ServerLocation object containing a port/host for an input server name.
 void incrConnectedClients()
          Increments the currently connected client count for the server.
 void incrFD()
          Increments the count of file descriptors in use by the server.
 void init(IniFile ini)
          Initialize the OpsClient using the input IniFile object.
 void listenForOpsCommands()
          Informs the OpsClient to start listening for operations commands.
 void register(int serverPort)
          Registers the server with the OpsClient using the input port number that the server is currently running on.
 void responseTime(long timeToRespond)
          Updates the average response times for the server using the input time.
 void setConnectedClients(int clients)
          Sets the currently connected client count for the server using the input number of clients.
 void setFD(int openFD)
          Sets the count of file descriptors in use by the server to the input count.
 void setServerPort(int serverPort)
          Saves the port number that the server is currently running on.
 void setSessionCount(int sessions)
          Sets the session count for the server using the input number of sessions.
 void unRegister()
          Unregisters the server with the OpsClient.
 void updateStatus(boolean force)
          Updates the server status with the OpsClient where the boolean indicates that the client should force the information out immediately.
 void updateTransRate()
          Updates the transaction rate times for the server.
 

Method Detail

init

public void init(IniFile ini)
          throws Exception
Initialize the OpsClient using the input IniFile object.
Parameters:
ini - the server IniFile object

setServerPort

public void setServerPort(int serverPort)
Saves the port number that the server is currently running on.
Parameters:
serverPort - the port number

register

public void register(int serverPort)
              throws Exception
Registers the server with the OpsClient using the input port number that the server is currently running on.
Parameters:
serverPort - the port number
Throws:
Exception - is thrown if an error occurs during registration

unRegister

public void unRegister()
                throws Exception
Unregisters the server with the OpsClient.
Throws:
Exception - is thrown if an error occurs during registration

updateStatus

public void updateStatus(boolean force)
                  throws Exception
Updates the server status with the OpsClient where the boolean indicates that the client should force the information out immediately.

alert

public void alert(Object alertData)
           throws Exception
Sends an object to the OpsClient containing operations alert information.
Parameters:
alertData - the alert information

setSessionCount

public void setSessionCount(int sessions)
Sets the session count for the server using the input number of sessions.
Parameters:
session - the count of sessions.

beginSession

public void beginSession(Object user)
Increments the server session count by one.
Parameters:
user - an object or the sessionId of a user

endSession

public void endSession(Object user)
Decrements the server session count by one.
Parameters:
user - an object or the sessionId of a user

setFD

public void setFD(int openFD)
Sets the count of file descriptors in use by the server to the input count.
Parameters:
openFD - the count of file descriptors in use.

incrFD

public void incrFD()
Increments the count of file descriptors in use by the server.

decrFD

public void decrFD()
Decrements the count of file descriptors in use by the server.

setConnectedClients

public void setConnectedClients(int clients)
Sets the currently connected client count for the server using the input number of clients.
Parameters:
clients - the count of currently active clients.

incrConnectedClients

public void incrConnectedClients()
Increments the currently connected client count for the server.

decrConnectedClients

public void decrConnectedClients()
Decrements the currently connected client count for the server.

updateTransRate

public void updateTransRate()
Updates the transaction rate times for the server.

responseTime

public void responseTime(long timeToRespond)
Updates the average response times for the server using the input time.
Parameters:
timeToRespond - the elapased time from start to finish of a command

getServerLocation

public ServerLocation getServerLocation(String serverName,
                                        String sessionId)
                                 throws Exception
Gets a ServerLocation object containing a port/host for an input server name.
Parameters:
serverName - the name of the server resource to locate.
sessionId - session id for the new session
Throws:
Exception - is thrown if no server can be located.

listenForOpsCommands

public void listenForOpsCommands()
Informs the OpsClient to start listening for operations commands.

getHostID

public String getHostID()
Retrieves a String containing a host identifier for the server.

Open SiteSearch 4.1.1
Final