Package com.ibm.mq

Interface MQSecurityExit

All Known Implementing Classes:
MQExternalSecurityExit

public interface MQSecurityExit
The 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. Create a new instance of your class and assign it to the MQEnvironment.securityExit field before constructing your MQQueueManager object.

For example,

 
   // in MySecurityExit.java
   class MySecurityExit implements MQSecurityExit 
   {
       // you must provide an implementation of the securityExit method
       public byte[] securityExit(MQChannelExit       channelExitParms,
                                  MQChannelDefinition channelDefinition,
                                  byte[]              agentBuffer)
       {
           // your exit code goes here...
       }
   }
 
   // in your main program...
   MQEnvironment.securityExit = new MySecurityExit();
   ...    // other initialisation
   MQQueueManager qMgr        = new MQQueueManager("");
  
 
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    securityExit(MQChannelExit channelExitParms, MQChannelDefinition channelDefinition, byte[] agentBuffer)
    The security exit method that your class must provide.
  • Method Details

    • securityExit

      byte[] securityExit(MQChannelExit channelExitParms, MQChannelDefinition channelDefinition, byte[] 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.exitResponse is 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 - if channelExitParms.exitReason is MQChannelExit.MQXR_SEC_MSG, then agentBuffer contains the security message received from the queue manager, otherwise agentBuffer is null.
      Returns:
      the exit response code (in channelExitParms). If this is set so that a message is to be transmitted to the queue manager, then your security exit method must return the data to be transmitted.
      See Also: