|
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
public class JavaGateway
The JavaGateway represents a logical connection between your program and the CICS Transaction Gateway when you specify a remote protocol. If you specify a local connection, you connect directly to the CICS server, bypassing any CICS Transaction Gateway servers.
When you create a JavaGateway you determine the protocol to use, and if
required, the connection details of the remote CICS Transaction Gateway server
(network address and port number). With the JavaGateway class you can either
specify this information using the setAddress()
,
setProtocol()
and setPort()
methods, or you can provide all the information in URL form of
Protocol://Address:Port
. You can use the setURL()
method or pass the URL into one of the JavaGateway constructors.
Field Summary | |
---|---|
static java.lang.String |
LOCAL_PROP_APPLID
APPLID. |
static java.lang.String |
LOCAL_PROP_APPLID_QUALIFIER
APPLID HIGH LEVEL QUALIFIER. |
static java.lang.String |
MCF_TOKEN
ManagedConnectionFactory token protocol property. |
static java.lang.String |
SSL_PROP_CIPHER_SUITES
SSL protocol cipher suites property. |
static java.lang.String |
SSL_PROP_KEYRING_CLASS
SSL protocol key ring class or keystore property. |
static java.lang.String |
SSL_PROP_KEYRING_PW
SSL protocol key ring or keystore password property. |
Constructor Summary | |
---|---|
JavaGateway()
Constructs a default JavaGateway object. |
|
JavaGateway(java.lang.String strSetURL,
int iSetPort)
Constructs a JavaGateway object and connects it via the defined protocol to a remote Gateway daemon or local client. |
|
JavaGateway(java.lang.String strSetURL,
int iSetPort,
int setSocketConnectTimeout,
java.util.Properties protocolProps)
Constructs a JavaGateway object and connects it via the defined protocol to a Gateway daemon or local client. |
|
JavaGateway(java.lang.String strSetURL,
int iSetPort,
int setSocketConnectTimeout,
java.lang.String strSetClientSecurity,
java.lang.String strSetServerSecurity,
java.util.Properties protocolProps)
Constructs a JavaGateway object and connects it via the defined protocol to a Gateway daemon or local client. |
|
JavaGateway(java.lang.String strSetURL,
int iSetPort,
java.util.Properties protocolProps)
Constructs a JavaGateway object and connects it via the defined protocol to a remote Gateway daemon or local client. |
|
JavaGateway(java.lang.String strSetURL,
int iSetPort,
java.lang.String strSetClientSecurity,
java.lang.String strSetServerSecurity)
Constructs a JavaGateway object and connects it via the defined protocol to a remote Gateway daemon or local client. |
|
JavaGateway(java.lang.String strSetURL,
int iSetPort,
java.lang.String strSetClientSecurity,
java.lang.String strSetServerSecurity,
java.util.Properties protocolProps)
Constructs a JavaGateway object and connects it via the defined protocol to a remote Gateway daemon or local client. |
Method Summary | |
---|---|
void |
close()
Closes the connection to the CICS Transaction Gateway. |
int |
flow(GatewayRequest gatRequest)
Flows the specified GatewayRequest to the CICS Transaction Gateway and then waits for the reply. |
java.lang.String |
getAddress()
Returns the address that this JavaGateway is currently or will be connected to. |
java.util.Locale |
getGatewayLocale()
Returns the Locale of the machine running the remote Gateway daemon if it is known. |
java.lang.String |
getGatewayOs()
Returns a string containing the operating system, architecture and version of the machine running the remote Gateway daemon. |
int |
getPort()
Returns the port of the CICS Transaction Gateway that this JavaGateway instance is currently or will be connected to. |
java.lang.String |
getProtocol()
Returns the protocol that this JavaGateway instance is currently using or will use to connect to the CICS Transaction Gateway. |
java.util.Properties |
getProtocolProperties()
Returns a Properties object containing any settings specific to the protocol used to connect to the CICS Transaction Gateway, or null if there are none. |
java.lang.String |
getRequestExits()
Get a string containing the comma-delimited package-qualified classnames of the RequestExit monitors
that were or will be enabled when the open() method is called on
this object. |
int |
getSocketConnectTimeout()
Returns the socket connect timeout value for this JavaGateway instance. |
java.lang.String |
getURL()
Returns the URL of the CICS Transaction Gateway that this JavaGateway is currently or will be connected to. |
boolean |
isInitialFlow()
Checks whether an initial flow will be sent when this JavaGateway is opened. |
static boolean |
isLocal(java.lang.String protocol)
Tests if a specified protocol string represents a local JavaGateway. |
boolean |
isOpen()
Checks both our expected state and the real state of any wrappered object. |
void |
open()
Opens this JavaGateway type object. |
void |
setAddress(java.lang.String strSetAddress)
Set the address of the CICS Transaction Gateway that this JavaGateway instance connects to. |
void |
setInitialFlow(boolean bSetInitialFlow)
When a JavaGateway instance connects to a remote Gateway, an initial flow takes place. |
void |
setPort(int iSetPort)
Sets the port of the CICS Transaction Gateway that this JavaGateway instance connects to. |
void |
setProtocol(java.lang.String strSetProtocol)
Set the protocol that this JavaGateway will use to connect to the CICS Transaction Gateway. |
void |
setProtocolProperties(java.util.Properties newProps)
Sets the protocol specific properties for this JavaGateway. |
void |
setRequestExits(java.lang.String requestExits)
Set the RequestExit
monitors that will be enabled when the open() method is called on
this object. |
void |
setSecurity(java.lang.String strSetClientSecurity,
java.lang.String strSetServerSecurity)
Sets the security classes to be used on the client and server sides of this connection. |
void |
setSocketConnectTimeout(int socketConnectTimeout)
Sets the socket connection timeout value for this JavaGateway instance. |
void |
setURL(java.lang.String strSetURL)
Sets the protocol, address and port of this JavaGateway by means of a single URL string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SSL_PROP_KEYRING_CLASS
SSL_PROP_KEYRING_PW
,
Constant Field Valuespublic static final java.lang.String SSL_PROP_KEYRING_PW
SSL_PROP_KEYRING_CLASS
,
Constant Field Valuespublic static final java.lang.String SSL_PROP_CIPHER_SUITES
public static final java.lang.String MCF_TOKEN
public static final java.lang.String LOCAL_PROP_APPLID
public static final java.lang.String LOCAL_PROP_APPLID_QUALIFIER
Constructor Detail |
---|
public JavaGateway()
public JavaGateway(java.lang.String strSetURL, int iSetPort) throws java.io.IOException
strSetURL
- URL specifying the remote/local Gateway to connect toiSetPort
- TCP/IP port to connect to if connecting to a remote Gateway
daemon. This parameter will be ignored if connecting via
local mode.
java.io.IOException
- If an error occurs when opening the JavaGatewaysetURL(String)
,
setPort(int iSetPort)
,
open()
public JavaGateway(java.lang.String strSetURL, int iSetPort, java.util.Properties protocolProps) throws java.io.IOException
strSetURL
- URL specifying the remote/local Gateway to connect toiSetPort
- TCP/IP port to connect to if connecting to a remote Gateway
daemon. This parameter will be ignored if connecting via
local mode.protocolProps
- any protocol specific properties
java.io.IOException
- If an error occurs when opening the JavaGatewaysetURL(String)
,
setPort(int iSetPort)
,
setProtocolProperties(Properties)
,
open()
public JavaGateway(java.lang.String strSetURL, int iSetPort, java.lang.String strSetClientSecurity, java.lang.String strSetServerSecurity, java.util.Properties protocolProps) throws java.io.IOException
strSetURL
- URL specifying the remote/local Gateway to connect toiSetPort
- TCP/IP port to connect to if connecting to a remote Gateway
daemon. This parameter will be ignored if connecting via
local mode.strSetClientSecurity
- Name of class implementing ClientSecurity to use on this
connectionstrSetServerSecurity
- Name of class implementing ServerSecurity to use on this
connectionprotocolProps
- any protocol specific properties
java.io.IOException
- If an error occurs when opening the JavaGatewaysetURL(String)
,
setPort(int iSetPort)
,
setSecurity(String, String)
,
setProtocolProperties(Properties)
,
open()
public JavaGateway(java.lang.String strSetURL, int iSetPort, java.lang.String strSetClientSecurity, java.lang.String strSetServerSecurity) throws java.io.IOException
strSetURL
- URL specifying the remote/local Gateway to connect toiSetPort
- TCP/IP port to connect to if connecting to a remote Gateway
daemon. This parameter will be ignored if connecting via
local mode.strSetClientSecurity
- Name of class implementing ClientSecurity to use on this
connectionstrSetServerSecurity
- Name of class implementing ServerSecurity to use on this
connection
java.io.IOException
- If an error occurs when opening the JavaGatewaysetURL(String)
,
setPort(int iSetPort)
,
setSecurity(String, String)
,
open()
public JavaGateway(java.lang.String strSetURL, int iSetPort, int setSocketConnectTimeout, java.util.Properties protocolProps) throws java.io.IOException
strSetURL
- URL specifying the remote/local Gateway to connect toiSetPort
- TCP/IP port to connect to if connecting to a remote Gateway
daemon. This parameter will be ignored if connecting via
local mode.setSocketConnectTimeout
- The timeout value (in milliseconds) to allow a socket to connect
to a remote Gateway daemonprotocolProps
- any protocol specific properties
java.io.IOException
- If an error occurs when opening the JavaGatewaysetURL(String)
,
setPort(int iSetPort)
,
setSocketConnectTimeout(int)
,
setProtocolProperties(Properties)
,
open()
public JavaGateway(java.lang.String strSetURL, int iSetPort, int setSocketConnectTimeout, java.lang.String strSetClientSecurity, java.lang.String strSetServerSecurity, java.util.Properties protocolProps) throws java.io.IOException
strSetURL
- URL specifying the remote/local Gateway to connect toiSetPort
- TCP/IP port to connect to if connecting to a remote Gateway
daemon. This parameter will be ignored if connecting via
local mode.setSocketConnectTimeout
- The timeout value (in milliseconds) to allow a socket to connect
to a remote Gateway daemonstrSetClientSecurity
- Name of class implementing ClientSecurity to use on this
connectionstrSetServerSecurity
- Name of class implementing ServerSecurity to use on this
connectionprotocolProps
- any protocol specific properties
java.io.IOException
- If an error occurs when opening the JavaGatewaysetURL(String)
,
setPort(int iSetPort)
,
setSocketConnectTimeout(int)
,
setSecurity(String, String)
,
setProtocolProperties(Properties)
,
open()
Method Detail |
---|
public java.lang.String getRequestExits()
RequestExit
monitors
that were or will be enabled when the open() method is called on
this object.
public void setRequestExits(java.lang.String requestExits)
RequestExit
monitors that will be enabled when the open() method is called on
this object. The string contains comma-delimited
package-qualified classnames of classes that implement the
com.ibm.ctg.monitoring.RequestExit
interface. These classes must be available on the class path.
requestExits
- String containing the requestExits to setpublic static boolean isLocal(java.lang.String protocol)
protocol
- The protocol string to test
public void open() throws java.io.IOException
java.io.IOException
- If an error occurs when opening the JavaGatewaypublic int flow(GatewayRequest gatRequest) throws java.io.IOException
If the thread is interrupted during the flow, an IOException is thrown but the request might continue to execute in the Gateway daemon. In this case the state of the request object is undefined.
gatRequest
- GatewayRequest object containing the request
java.io.IOException
- If a network I/O error occurs or the thread is
interrupted during the operation
java.lang.IllegalArgumentException
- If a null object is passed to this methodpublic void close() throws java.io.IOException
java.io.IOException
- If a network I/O error occurs during the operationpublic void setAddress(java.lang.String strSetAddress) throws java.io.IOException
This method is only allowed when the JavaGateway is in a closed state.
strSetAddress
- Address (normally TCP/IP) to connect to
java.io.IOException
- If the JavaGateway is in an open statepublic java.lang.String getAddress()
public void setPort(int iSetPort) throws java.io.IOException
This method is only allowed when the JavaGateway is in a closed state.
iSetPort
- Port to connect to
java.io.IOException
- If the JavaGateway is in an open statepublic int getPort()
public void setSocketConnectTimeout(int socketConnectTimeout) throws java.io.IOException
This method is only allowed when the JavaGateway is in a closed state.
socketConnectTimeout
- The timeout value (in milliseconds). A value of 0 represents no
timeout.
java.io.IOException
- If the JavaGateway is in an open state
java.lang.IllegalArgumentException
- If a negative value is passedpublic int getSocketConnectTimeout()
public void setProtocol(java.lang.String strSetProtocol) throws java.io.IOException
This method is only allowed when the JavaGateway is in a closed state.
strSetProtocol
- Protocol used to connect via
java.io.IOException
- If the JavaGateway is in an open statepublic java.lang.String getProtocol()
public void setURL(java.lang.String strSetURL) throws java.io.IOException
protocol://address:port/
This method is only allowed when the JavaGateway is in a closed state.
strSetURL
- URL that the JavaGateway will connect to
java.io.IOException
- If the JavaGateway is in an open statepublic java.lang.String getURL()
public void setProtocolProperties(java.util.Properties newProps) throws java.io.IOException
This method is only allowed when the JavaGateway is in a closed state.
newProps
- The protocol specific properties
java.io.IOException
- If the JavaGateway is in an open statepublic java.util.Properties getProtocolProperties()
public boolean isOpen()
public void setSecurity(java.lang.String strSetClientSecurity, java.lang.String strSetServerSecurity) throws java.io.IOException
This method is only allowed when the JavaGateway is in a closed state.
strSetClientSecurity
- Name of class implementing ClientSecurity to use on this connectionstrSetServerSecurity
- Name of class implementing ServerSecurity to use on this connection
java.io.IOException
- If the JavaGateway is in an open statepublic void setInitialFlow(boolean bSetInitialFlow) throws java.io.IOException
If you are not using security objects and are not interested in any Locale information, you can choose to not incur the additional network traffic produced by the initial flow. Call this method with false to turn off the intial flow.
This method is only allowed when the JavaGateway is in a closed state.
bSetInitialFlow
- Whether to produce initial flows or not.
java.io.IOException
- If the JavaGateway is in an open statepublic boolean isInitialFlow()
public java.util.Locale getGatewayLocale()
This method will return null if you have yet to open the connection to the remote Gateway, you disabled the initial flow which communicates this information, or you are connected to a local Gateway.
public java.lang.String getGatewayOs()
This method will return null if you have yet to open the connection to the remote Gateway, you disabled the initial flow which communicates this information, or you are connected to a local Gateway.
|
©Copyright IBM Corp. 1994, 2014 Legal |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |