com.ibm.mq.exits
Interface WMQSecurityExit
- public interface WMQSecurityExit
Note: This interface does not apply when connecting directly to WebSphere MQ in bindings mode.
To provide your own security exit, define a class that implements this interface.
For example,
// in MySecurityExit.java package acme.exits; class MySecurityExit implements WMQSecurityExit { // you must provide an implementation of the channelSecurityExit method public ByteBuffer channelSecurityExit(MQCXP channelExitParms, MQCD channelDefinition, ByteBuffer agentBuffer) { // your exit code goes here... } }
To use your security exit with WebSphere MQ Classes for Java, create a new instance of your class
and assign it to the MQEnvironment.channelSecurityExit
field before constructing
your MQQueueManager object.
For example,
// in your main program... MQEnvironment.channelSecurityExit = new acme.exits.MySecurityExit(); ... // other initialisation MQQueueManager qMgr = new MQQueueManager("");
To use your security exit with WebSphere MQ Classes for JMS, specify the name of the class using
com.ibm.mq.jms.MQConnectionFactory#setSecurityExit(String)
before getting a connection.
For example,
// in your main program... MQQueueConnectionFactory mqcf = new MQQueueConnectionFactory(); mqcf.setSecurityExit("acme.exits.MySecurityExit"); // set the other parameters in the MQQueueConnectionFactory here... MQQueueConnection mqqc =(MQQueueConnection)mqcf.createQueueConnection();
Method Summary
Modifier and Type | Method and Description |
---|---|
|
channelSecurityExit(MQCXP channelExitParms,MQCD channelDefinition,java.nio.ByteBuffer agentBuffer)
The security exit method that your class must provide.
|
Method Detail
channelSecurityExit
- java.nio.ByteBuffer channelSecurityExit( MQCXP channelExitParms,
- MQCD channelDefinition,
- java.nio.ByteBuffer agentBuffer)
The security exit method that your class must provide.
Parameters:
channelExitParms
- contains information about the context in which the exit is being
invoked. channelExitParms.setExitResponse(int)
sets a parameter
which you use to tell the WebSphere MQ Client for Java what action to take next. channelDefinition
- contains details of the channel through which all communications with
the queue manager take place. agentBuffer
- contains the data received from the queue manager if
channelExitParms.getExitReason()
is CMQXC.MQXR_XMIT. Returns:
pExitBuffer contains either a new or the original agentBuffer. This buffer will be
passed on to subsequent exits in the exit chain.