com.ibm.mq
Class MQQueueManager.MQExitWrapper

java.lang.Object
  |
  +--com.ibm.mq.MQQueueManager.MQExitWrapper
All Implemented Interfaces:
MQReceiveExit, MQSecurityExit, MQSendExit
Enclosing class:
MQQueueManager

public static class MQQueueManager.MQExitWrapper
extends java.lang.Object
implements MQReceiveExit, MQSendExit, MQSecurityExit


Field Summary
       
Constructor Summary
MQQueueManager.MQExitWrapper(MQReceiveExit exitObject)
           
MQQueueManager.MQExitWrapper(MQSecurityExit exitObject)
           
MQQueueManager.MQExitWrapper(MQSendExit exitObject)
           
 
Method Summary
 byte[] callExit(MQChannelExit channelExitParms, MQChannelDefinition channelDefinition, byte[] agentBuffer)
          The first parameter is the exit object that would have been called directly.
 byte[] receiveExit(MQChannelExit channelExitParms, MQChannelDefinition channelDefinition, byte[] agentBuffer)
          The receive exit method that your class must provide.
 byte[] securityExit(MQChannelExit channelExitParms, MQChannelDefinition channelDefinition, byte[] agentBuffer)
          The security exit method that your class must provide.
 byte[] sendExit(MQChannelExit channelExitParms, MQChannelDefinition channelDefinition, byte[] agentBuffer)
          The send exit method that your class must provide.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQQueueManager.MQExitWrapper

public MQQueueManager.MQExitWrapper(MQSendExit exitObject)

MQQueueManager.MQExitWrapper

public MQQueueManager.MQExitWrapper(MQReceiveExit exitObject)

MQQueueManager.MQExitWrapper

public MQQueueManager.MQExitWrapper(MQSecurityExit exitObject)
Method Detail

receiveExit

public byte[] receiveExit(MQChannelExit channelExitParms,
                          MQChannelDefinition channelDefinition,
                          byte[] agentBuffer)
Description copied from interface: MQReceiveExit
The receive exit method that your class must provide. It is invoked whenever the WebSphere MQ Client for Java receives a message from the queue manager.

Specified by:
receiveExit in interface MQReceiveExit
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 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.exitReason is MQChannelExit.MQXR_XMIT. Otherwise agentBuffer is null.
Returns:
the data to be processed. If the exit response code (in channelExitParms) is MQXCC_OK, the MQ Client for Java can now process the data. The simplest receive exit, therefore, consists of the single line:

return agentBuffer;

See Also:
MQChannelExit, MQChannelDefinition

sendExit

public byte[] sendExit(MQChannelExit channelExitParms,
                       MQChannelDefinition channelDefinition,
                       byte[] agentBuffer)
Description copied from interface: MQSendExit
The send exit method that your class must provide. It is invoked whenever the WebSphere MQ Client for Java sends a message to the queue manager.

Specified by:
sendExit in interface MQSendExit
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 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.exitReason is MQChannelExit.MQXR_XMIT. Otherwise agentBuffer is null.
Returns:
the data to be processed. If the exit response code (in channelExitParms) is MQXCC_OK, the MQ Client for Java can now process the data. The simplest send exit therefore, consists of the single line:

return agentBuffer;

See Also:
MQChannelExit, MQChannelDefinition

securityExit

public byte[] securityExit(MQChannelExit channelExitParms,
                           MQChannelDefinition channelDefinition,
                           byte[] agentBuffer)
Description copied from interface: MQSecurityExit
The security exit method that your class must provide.

Specified by:
securityExit in interface MQSecurityExit
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 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 - 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:
MQChannelExit, MQChannelDefinition

callExit

public byte[] callExit(MQChannelExit channelExitParms,
                       MQChannelDefinition channelDefinition,
                       byte[] agentBuffer)
The first parameter is the exit object that would have been called directly. The aim of this method is to let through all the transmit calls, but not to let through the init and term calls. These need to be reference counted to ensure that only the first and last are then through. Hopefully then the lifecycle of the exit (from the user's coded exit point of view) will appear (at least partly) correct.

Parameters:
channelExitParms - ChannelExitParams to pass through

(c) Copyright IBM Corp. 2005. All Rights Reserved.