CICS® Transaction Gateway Programming Reference v1.1.0.0

com.ibm.ctg.client.stats
Class GatewayConnection

java.lang.Object
  extended by com.ibm.ctg.client.stats.GatewayConnection

public class GatewayConnection
extends java.lang.Object

The GatewayConnection is used to retrieve statistical information from a CICS Transaction Gateway instance. Access to the statistics can be gained through the use of the ctgstats.jar package.

The StatsGateway will connect to the CICS Transaction Gateway server on the local machine using the default port (2980), unless set on the constructor.


Constructor Summary
GatewayConnection()
          Constructs a GatewayConnection object and opens a connection to the CICS Transaction Gateway on the default statistics port.
GatewayConnection(int port)
          Constructs a GatewayConnection object and opens a connection to the CICS Transaction Gateway using the specified port.
GatewayConnection(java.lang.String address, int port)
          Constructs a GatewayConnection object and opens a connection to the CICS Transaction Gateway using the specified IP address and port.
 
Method Summary
 void close()
          Closes a connection to a Gateway daemon.
 java.lang.String getAddress()
          Gets the address for the Gateway daemon that this GatewayConnection will associate.
 int getPort()
          Gets the port that this GatewayConnection is connected to.
 IdResultSet getResourceGroupIds()
          Returns an IdResultSet of IdData objects representing the set of all the resource group IDs available from the Gateway daemon.
 IdResultSet getStatIds()
          Returns an IdResultSet containing a set of IdData objects that represent all available statistic IDs.
 IdResultSet getStatIds(java.lang.String ids)
          Returns an IdResultSet containing a set of IdData objects representing the statistic IDs that match the supplied query string "ids".
 StatResultSet getStats()
          Returns a StatResultSet containing a set of StatData objects that represents all available statistics.
 StatResultSet getStats(java.lang.String ids)
          Returns a StatResultSet containing a set of StatData objects representing the statistics that match the supplied query string "ids".
 java.lang.String getStatsAPIVersion()
          Get the Statistics API version.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatewayConnection

public GatewayConnection()
                  throws java.io.IOException
Constructs a GatewayConnection object and opens a connection to the CICS Transaction Gateway on the default statistics port.

Throws:
java.io.IOException - If an error occurs when opening the connection

GatewayConnection

public GatewayConnection(int port)
                  throws java.io.IOException
Constructs a GatewayConnection object and opens a connection to the CICS Transaction Gateway using the specified port.

Parameters:
port - The statistics port to connect to
Throws:
java.io.IOException - If an error occurs when opening the connection

GatewayConnection

public GatewayConnection(java.lang.String address,
                         int port)
                  throws java.io.IOException
Constructs a GatewayConnection object and opens a connection to the CICS Transaction Gateway using the specified IP address and port.

Parameters:
address - The hostname or IP address of the Gateway daemon
port - The statistics port to connect to
Throws:
java.io.IOException - If an error occurs when opening the connection
Method Detail

getResourceGroupIds

public IdResultSet getResourceGroupIds()
                                throws java.io.IOException
Returns an IdResultSet of IdData objects representing the set of all the resource group IDs available from the Gateway daemon.

Returns:
IdResultSet of IdData objects containing the resource group IDs
Throws:
java.io.IOException - If an error occurs when using the connection

getStatIds

public IdResultSet getStatIds(java.lang.String ids)
                       throws java.io.IOException
Returns an IdResultSet containing a set of IdData objects representing the statistic IDs that match the supplied query string "ids".

Parameters:
ids - The query string is a colon-separated list of statistics group IDs (such as resource group IDs). For example, a query string of "GD:PH" returns the set of all statistic IDs in the Gateway Daemon (GD) and Protocol Handler (PH) resource groups. If the query string is the empty string the returned IdResultSet is the same as that for getStatIds().
Returns:
IdResultSet of IdData objects containing the statistic IDs.
Throws:
java.io.IOException

getStatIds

public IdResultSet getStatIds()
                       throws java.io.IOException
Returns an IdResultSet containing a set of IdData objects that represent all available statistic IDs.

Returns:
IdResultSet of IdData objects containing the statistic IDs.
Throws:
java.io.IOException

getStats

public StatResultSet getStats(java.lang.String ids)
                       throws java.io.IOException
Returns a StatResultSet containing a set of StatData objects representing the statistics that match the supplied query string "ids".

Parameters:
ids - The query string is a colon-separated list of statistics group IDs (such as resource group IDs) or specific statistic IDs. The query string might contain both resource group IDs and statistic IDs. If the query string is the empty string the IdResultSet returned is the same as that for getStatIds(). For example, a query string of "GD:PH:CS_LLIST" returns a StatResultSet that contains the set of all statistical values in the Gateway Daemon (GD), the Protocol Handler (PH) resource groups, and the CS_LLIST statistic.
Returns:
StatResultSet of StatData objects containing statistics data.
Throws:
java.io.IOException

getStats

public StatResultSet getStats()
                       throws java.io.IOException
Returns a StatResultSet containing a set of StatData objects that represents all available statistics.

Returns:
StatResultSet of StatData objects containing statistics data.
Throws:
java.io.IOException

close

public void close()
Closes a connection to a Gateway daemon.

Throws:
java.io.IOException - If an error occurs when closing the connection

getAddress

public java.lang.String getAddress()
Gets the address for the Gateway daemon that this GatewayConnection will associate.

Returns:
The address of the Gateway daemon to connect to

getPort

public int getPort()
Gets the port that this GatewayConnection is connected to.

Returns:
The address of the Gateway daemon to connect to

getStatsAPIVersion

public java.lang.String getStatsAPIVersion()
Get the Statistics API version. Returns a string representing version (n_n_n_n) of the API.

Returns:
The version of the Statistics API

©Copyright IBM Corp. 1994, 2014
Legal