Websphere MQ Everyplace

com.ibm.mqe.communications
Class MQeServletWrapper

java.lang.Object
  |
  +--MQeRunnableInstance
        |
        +--com.ibm.mqe.communications.MQeServletWrapper

public class MQeServletWrapper
extends MQeRunnableInstance

The MQeServletWrapper class provides the interface to allow a servlet to receive WebSphere MQ Everyplace HTTP requests and pass them on to the queue manager. It is the responsibility of the servlet to instantiate the queue manager, ensure there is only one queue manager running per JVM and to correctly close the queue manager.

See Also:
Serialized Form

Constructor Summary
MQeServletWrapper()
           
 
Method Summary
 byte[] processPost(byte[] data)
          Provides the functionality to process the incoming request.
 void setListenerProperties(long chnlTimeout, int maxChnl)
          Set the listener properties for the channel timeout and maximum number of channels allowed.
 void startWrapper()
          Start the wrapper.
 void stopWrapper()
          This method must be called in order to correctly stop the background thread responsible for the channel timeout for incoming channels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQeServletWrapper

public MQeServletWrapper()
Method Detail

setListenerProperties

public void setListenerProperties(long chnlTimeout,
                                  int maxChnl)
Set the listener properties for the channel timeout and maximum number of channels allowed. If this method is not called by the servlet then the default values in the MQeCommunicationsListenerAdminMsg class are used.

Parameters:
chnlTimeout - Time in milliseconds a channel may be idle before being closed
maxChnl - Maximum number of channels allowed, zero denotes no maximum set
Returns:
void

startWrapper

public void startWrapper()
                  throws java.lang.Exception
Start the wrapper. If you wish to set the maximum number of channels and the channel timeout for incoming channels the setListenerProperties() method should be called prior to this method. This method must be called before the processPost

java.lang.Exception

processPost

public byte[] processPost(byte[] data)
                   throws MQeException
Provides the functionality to process the incoming request.

Returns:
byte[] response data
Throws:
MQeException - if code is MQe.Except_NotActive call startWrapper()

stopWrapper

public void stopWrapper()
This method must be called in order to correctly stop the background thread responsible for the channel timeout for incoming channels.


Websphere MQ Everyplace