public class EPIGateway extends JavaGateway
JavaGateway
to provide some EPI specific
behaviour. In particular, you can use this class to find out what servers
are available.
The methods serverCount
, serverName
and serverDesc
do not query the CICS Transaction Gateway each time they are called. The first use
of one of these methods will obtain the list of available servers from the gateway,
and subsequent calls will use the same information.
This class can be used wherever a JavaGateway is required.
import com.ibm.ctg.epi.*; // EPI classes ... // Connect to the CICS Transaction Gateway EPIGateway epi = new EPIGateway("myserver.company.com", 2006 ); // List all available CICS servers for ( int i=1; i<= epi.serverCount(); i++ ) System.out.println( epi.serverName(i) + " " + epi.serverDesc(i) );Notice that in the code above the index begins at 1.
LOCAL_PROP_APPLID, LOCAL_PROP_APPLID_QUALIFIER, LOCAL_PROP_IPIC_SENDSESSIONS, MCF_TOKEN, SSL_PROP_CIPHER_SUITES, SSL_PROP_KEYRING_CLASS, SSL_PROP_KEYRING_PW
Constructor and Description |
---|
EPIGateway()
Constructs an EPIGateway.
|
EPIGateway(java.lang.String address,
int port)
Constructs an EPIGateway to a CICS Transaction Gateway at the specified
address and port and opens the gateway.
|
Modifier and Type | Method and Description |
---|---|
void |
open()
Opens the Gateway.
|
int |
serverCount()
Returns the number of servers available for use.
|
java.lang.String |
serverDesc(int i)
Returns the description of the server at the specified index in the list
of available servers.
|
java.lang.String |
serverName(int i)
Returns the name of the server at the specified index in the list
of available servers.
|
close, flow, getAddress, getGatewayLocale, getGatewayOs, getPort, getProtocol, getProtocolProperties, getRequestExits, getSocketConnectTimeout, getURL, isInitialFlow, isLocal, isOpen, setAddress, setInitialFlow, setPort, setProtocol, setProtocolProperties, setRequestExits, setSecurity, setSocketConnectTimeout, setURL
public EPIGateway()
public EPIGateway(java.lang.String address, int port) throws java.io.IOException
address
- the address of the Gatewayport
- the port number being used by the Gatewayjava.io.IOException
- if an error occurs while connecting to the gatewaypublic void open() throws java.io.IOException
open
in class JavaGateway
java.io.IOException
- if an error occurs while connecting to the gatewaypublic int serverCount() throws java.io.IOException, EPIException
java.io.IOException
- if an error occurs while connecting to the gatewayEPIException
- if the request failspublic java.lang.String serverName(int i) throws java.io.IOException, EPIException
i
- the index of the server. Note that the index begins at 1.java.io.IOException
- if an error occurs while connecting to the gatewayEPIException
- if the request failspublic java.lang.String serverDesc(int i) throws java.io.IOException, EPIException
i
- the index of the server. Note that the index begins at 1.java.io.IOException
- if an error occurs while connecting to the gatewayEPIException
- if the request fails