CICS® Transaction Gateway Programming Reference V3.1

com.ibm.ctg.client
Class AutoJavaGateway

com.ibm.ctg.client.AutoJavaGateway

public class AutoJavaGateway

This is a bootstrap class. If the specified address is that of the local host, then the realInstance method returns an instance of the relevant network. Otherwise it returns an instance of a LocalJavaGateway.


Method Summary
(package private)  void close()
          Close SHOULD NEVER be called for an AutoJavaGateway.
(package private)  int flow(GatewayRequest gatRequest)
          Flow SHOULD NEVER be called for an AutoJavaGateway.
static java.lang.String getNetworkProtocol()
          Returns the protocol used when an automatic JavaGateway object determines that a network JavaGateway object is required.
(package private)  void open()
          Open SHOULD NEVER be called for an AutoJavaGateway.
(package private)  com.ibm.ctg.client.JavaGatewayInterface realInstance(java.lang.String strSetAddress, int iSetPort, java.lang.String strSetClientSecurityClass, java.lang.String strSetServerSecurityClass, boolean bSetInitialFlow)
          Where all our work actually happens.
static void setNetworkProtocol(java.lang.String strSetNetworkProtocol)
          This method sets the protocol used when an automatic JavaGateway object determines that a network JavaGateway object is required.
 

Method Detail

open

void open()
    throws java.io.IOException
Open SHOULD NEVER be called for an AutoJavaGateway. The only way this method can be called is if someone actually specifically created an instance of an AutoJavaGateway and called the method. However, since our public interface is to use the JavaGateway wrapper to create the relevant underlying XyzJavaGateway, no one should be creating specific XyzJavaGateway instances.
Throws:
java.io.IOException - If this method is called

flow

int flow(GatewayRequest gatRequest)
   throws java.io.IOException
Flow SHOULD NEVER be called for an AutoJavaGateway. The only way this method can be called is if someone actually specifically created an instance of an AutoJavaGateway and called the method. However, since our public interface is to use the JavaGateway wrapper to create the relevant underlying XyzJavaGateway, no one should be creating specific XyzJavaGateway instances.
Throws:
java.io.IOException - If this method is called

close

void close()
     throws java.io.IOException
Close SHOULD NEVER be called for an AutoJavaGateway. The only way this method can be called is if someone actually specifically created an instance of an AutoJavaGateway and called the method. However, since our public interface is to use the JavaGateway wrapper to create the relevant underlying XyzJavaGateway, no one should be creating specific XyzJavaGateway instances.
Throws:
java.io.IOException - If this method is called

realInstance

com.ibm.ctg.client.JavaGatewayInterface realInstance(java.lang.String strSetAddress,
                                                     int iSetPort,
                                                     java.lang.String strSetClientSecurityClass,
                                                     java.lang.String strSetServerSecurityClass,
                                                     boolean bSetInitialFlow)
                                               throws java.io.IOException
Where all our work actually happens. This class is a simple bootstrap class which uses the supplied parameters to decide what type of JavaGatewayInterface class the wrappering JavaGateway class should actually contain. We compare the supplied address to the localhost to decide whether to return an instance of the LocalJavaGateway class, or an instance of the relevant network JavaGatewayInterface class
Parameters:
strSetAddress - Relevant address that this Gateway talks to
iSetPort - Relevant port that this Gateway talks to
strSetClientSecurity - Class-name of client-side security object
strSetServerSecurity - Class-name of server-side security object
bSetInitialFlow - Send an initial flow when open
Returns:
Instance of an object that extends JavaGatewayInterface
Throws:
java.io.IOException - if it goes wrong

setNetworkProtocol

public static void setNetworkProtocol(java.lang.String strSetNetworkProtocol)
This method sets the protocol used when an automatic JavaGateway object determines that a network JavaGateway object is required.
Parameters:
strSetNetworkProtocol - Protocol type to use

getNetworkProtocol

public static java.lang.String getNetworkProtocol()
Returns the protocol used when an automatic JavaGateway object determines that a network JavaGateway object is required.
Returns:
string containing the protocol, excluding the trailing colon

© Copyright IBM Corp. 1994, 1999