MQReceiveExit

 

public interface MQReceiveExit

com.ibm.mq.MQReceiveExit
          

The receive exit interface allows you to examine, and possibly alter, the data received from the queue manager by the WebSphere MQ Client for Java™.

Note: This interface does not apply when connecting directly to WebSphere MQ in bindings mode.

To provide your own receive exit, define a class that implements this interface. Create a new instance of your class and assign it to the MQEnvironment.receiveExit field before constructing your MQQueueManager object.

For example,

  // in MyReceiveExit.java
  class MyReceiveExit implements MQReceiveExit 
  {
      //  provide an implementation of the receiveExit method
      public byte[] receiveExit(MQChannelExit       channelExitParms,
                                MQChannelDefinition channelDefinition,
                                byte[]              agentBuffer)
      {
          // your exit code goes here...
      }
  }

  // in your main program...
  MQEnvironment.receiveExit = new MyReceiveExit();
  ...    // other initialisation
  MQQueueManager qMgr        = new MQQueueManager("");
 


uj21310_