|
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 |
public interface GatewayIntercept
Provides a plug-in interface that allows JavaGateway
method calls to be
intercepted. A Gateway Intercept Plug-in is a class that, when enabled, is notified
before a connection to a Gateway daemon is opened or closed, and before a request
is sent to the Gateway daemon. This allows a variety of scenarios to be simulated
for application testing without a running CICS Transaction Gateway or CICS server.
Before a connection is opened, the interceptOpen
method is invoked on the plug-in object. The plug-in can change properties of the
JavaGateway
object, such as the protocol, host name and port number.
The plug-in then returns a value indicating whether the connection should be
opened or not.
Before a request is sent over a connection, the interceptFlow
method is invoked on the plug-in object, and the plug-in can change properties of
the GatewayRequest
object. The plug-in then returns a value indicating
whether the request should be flowed to the Gateway daemon or returned to the
application.
Before a connection is closed, the interceptClose
method is invoked on the plug-in object, and the plug-in returns a value indicating
whether the connection should be closed or not.
Nested Class Summary | |
---|---|
static class |
GatewayIntercept.InterceptAction
Indicates whether a JavaGateway method call should continue as normal
or be intercepted. |
Field Summary | |
---|---|
static java.lang.String |
CTG_PROP_INTERCEPT_PLUGIN
The Java property that can be used to set the GatewayIntercept
plug-in class to use. |
Method Summary | |
---|---|
GatewayIntercept.InterceptAction |
interceptClose(JavaGateway gateway)
Allows the JavaGateway.close() method to be intercepted. |
GatewayIntercept.InterceptAction |
interceptFlow(JavaGateway gateway,
GatewayRequest request)
Allows the JavaGateway.flow(GatewayRequest) method to be intercepted. |
GatewayIntercept.InterceptAction |
interceptOpen(JavaGateway gateway)
Allows the JavaGateway.open() method to be intercepted. |
Field Detail |
---|
static final java.lang.String CTG_PROP_INTERCEPT_PLUGIN
GatewayIntercept
plug-in class to use.
Method Detail |
---|
GatewayIntercept.InterceptAction interceptOpen(JavaGateway gateway) throws java.io.IOException
JavaGateway.open()
method to be intercepted. Implementations
can modify the properties of the JavaGateway
before it is opened,
and can prevent connection from being opened.
Implementations must not call open
,
flow
or close
on the passed in JavaGateway
object.
gateway
- the JavaGateway object being opened
Continue
to open the connection, or
Return
to leave the connection closed
java.io.IOException
- if an error occursGatewayIntercept.InterceptAction interceptFlow(JavaGateway gateway, GatewayRequest request) throws java.io.IOException
JavaGateway.flow(GatewayRequest)
method to be intercepted.
Implementations can modify the properties of the GatewayRequest
and
can choose to send the request to the Gateway or return the request to the
calling application.
Implementations must not call open
,
flow
or close
on the passed in JavaGateway
object.
gateway
- the JavaGateway object on which flow
was calledrequest
- the CICS TG request being flowed
Continue
to flow the request, or
Return
to return the request to the caller
java.io.IOException
- if an error occursGatewayIntercept.InterceptAction interceptClose(JavaGateway gateway) throws java.io.IOException
JavaGateway.close()
method to be intercepted. This method
is invoked even if the previous call to interceptOpen
returned Return
. Implementations can prevent
the connection from closing.
Implementations must not call open
,
flow
or close
on the passed in JavaGateway
object.
gateway
- the JavaGateway object being closed
Continue
to close the connection, or
Return
to leave the connection open
java.io.IOException
- if an error occurs
|
©Copyright IBM Corp. 1994, 2014 Legal |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |