com.ibm.mq.exits
Interface WMQSecurityExit
-
public interface WMQSecurityExitThe security exit interface allows you to customize the security flows that occur when an atttempt is made to connect to a queue manager.Note: This interface does not apply when connecting directly to IBM 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 IBM MQ Classes for Java, create a new instance of your class and assign it to the com.ibm.mq.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 IBM 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
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.nio.ByteBufferchannelSecurityExit(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 IBM 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 ifchannelExitParms.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.
-
-