|
CICS® Transaction Gateway Programming Reference v1.1.0.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.ctg.client.JavaGateway
com.ibm.ctg.epi.EPIGateway
public class EPIGateway
This class extends 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.
Field Summary |
---|
Fields inherited from class com.ibm.ctg.client.JavaGateway |
---|
LOCAL_PROP_APPLID, LOCAL_PROP_APPLID_QUALIFIER, MCF_TOKEN, SSL_PROP_CIPHER_SUITES, SSL_PROP_KEYRING_CLASS, SSL_PROP_KEYRING_PW |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.ibm.ctg.client.JavaGateway |
---|
close, flow, getAddress, getGatewayLocale, getGatewayOs, getPort, getProtocol, getProtocolProperties, getRequestExits, getSocketConnectTimeout, getURL, isInitialFlow, isLocal, isOpen, setAddress, setInitialFlow, setPort, setProtocol, setProtocolProperties, setRequestExits, setSecurity, setSocketConnectTimeout, setURL |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 Gateway
java.io.IOException
- if an error occurs while connecting to the gatewayMethod Detail |
---|
public 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 gateway
EPIException
- 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 gateway
EPIException
- 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 gateway
EPIException
- if the request fails
|
©Copyright IBM Corp. 1994, 2014 Legal |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |