Sun Adapter for Websphere MQ API

com.stc.connector.webspheremqadapter.message
Interface IQueue


public interface IQueue

This interface describes the structure of the 'Queue' portion of the WebSphere MQ eWay OTD used in Java Collaborations.

Version:
$Revision: 1.6 $

Method Summary
 void accessQueue(java.lang.String queueName)
          Accesses a queue on the current queue manager, to access messages.
 void accessQueue(java.lang.String queueName, java.lang.String qmgrName)
          Call this to access a queue on a remote queue manager (i.e., a remote queue which does not have a local queue definition).
 void get()
          Gets a message from the current queue.
 int getCurrentDepth()
          Gets the number of messages available in the current queue.
 IGMO getGMO()
          Accesses the GMO branch of this OTD.
 int getMaximumDepth()
          Gets the maximum number of messages that can exist on the current queue.
 int getMaximumMessageLength()
          Gets the maximum length of application data that can exist in any one message on the current queue.
 IPMO getPMO()
          Accesses the PMO branch of this OTD.
 QueueAccessOptions getqueueAccessOptions()
          Retrieves the access-options data structure that specifies the options that control the opening of the queue.
 QueueAccessOptions getQueueAccessOptions()
          Retrieves the access-options data structure that specifies the options that control the opening of the queue.
 void getWithOptions()
          Gets a message from the current queue.
 void put()
          Puts a message into the current queue.
 void putWithOptions()
          Put a message into the current queue.
 void selectQueue(java.lang.String queueName)
          Selects one of the previously accessed queues and make it the current queue.
 

Method Detail

getGMO

IGMO getGMO()
Accesses the GMO branch of this OTD.

Parameters:
None.

Returns:
IGMO - Returns the GMO sub-OTD.
Throws:
None.

getPMO

IPMO getPMO()
Accesses the PMO branch of this OTD.

Parameters:
None.

Returns:
IPMO - Returns the PMO sub-OTD.
Throws:
None.

getqueueAccessOptions

QueueAccessOptions getqueueAccessOptions()
Retrieves the access-options data structure that specifies the options that control the opening of the queue.

Parameters:
None.

Returns:
QueueAccessOptions - Returns object describing the queue access options in effect.
Throws:
None.

getQueueAccessOptions

QueueAccessOptions getQueueAccessOptions()
Retrieves the access-options data structure that specifies the options that control the opening of the queue.

Parameters:
None.

Returns:
QueueAccessOptions - Returns object describing the queue access options in effect.
Throws:
None.

accessQueue

void accessQueue(java.lang.String queueName)
                 throws MQAgentConnectionException,
                        com.stc.connector.appconn.common.ApplicationConnectionException
Accesses a queue on the current queue manager, to access messages. The accessed queue becomes the current queue. This is similar to the concept of a current queue manager.

Parameters:
queueName - Name of the queue to access on the current queue manager.
Throws:
MQAgentConnectionException - Thrown if there is a problem accessing the queue.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.
See Also:
selectQueue(String), MQOtd#selectQueueManager(String)

accessQueue

void accessQueue(java.lang.String queueName,
                 java.lang.String qmgrName)
                 throws MQAgentConnectionException,
                        com.stc.connector.appconn.common.ApplicationConnectionException
Call this to access a queue on a remote queue manager (i.e., a remote queue which does not have a local queue definition). The accessed queue becomes the current queue; this is similar to the concept of a current queue manager.

Note:The queue manager named in this call is not added to the internal list of IMqOtd.selectQueueManager(String) selectable} queue managers.

Parameters:
queueName - Name of the queue to access on the current queue manager.
qmgrName - Name of the remote queue manager which owns the named queue.
Throws:
MQAgentConnectionException - Thrown if there is a problem accessing the queue.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.
See Also:
selectQueue(String), MQOtd#selectQueueManager(String)

selectQueue

void selectQueue(java.lang.String queueName)
                 throws NoSuchQueueException,
                        MQAgentConnectionException,
                        com.stc.connector.appconn.common.ApplicationConnectionException
Selects one of the previously accessed queues and make it the current queue. All queue-related operations operate on the current queue. related operations operate on that current queue.

Parameters:
queueName - Name of the queue to select on the current queue manager.
Throws:
NoSuchQueueException - Thrown if the specified queue is not found.
MQAgentConnectionException - Thrown if there is a connection error.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.
See Also:
accessQueue(String)

get

void get()
         throws MQException,
                com.stc.connector.appconn.common.ApplicationConnectionException
Gets a message from the current queue. The default GetMessageOptions are used, whatever they may be (as is dictated by WebSphere mQ). The retrieved message is stored in the Message part of the WebSphere MQ OTD.

Parameters:
None.

Throws:
MQException - Thrown if the get fails.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.

getWithOptions

void getWithOptions()
                    throws MQException,
                           com.stc.connector.appconn.common.ApplicationConnectionException
Gets a message from the current queue. The GetMessageOptions set in this OTD's GMO part are used. The retrieved message is stored in the Message part of the WebSphere MQ OTD.

Parameters:
None.

Throws:
MQException - Thrown if the get fails.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.

put

void put()
         throws MQException,
                com.stc.connector.appconn.common.ApplicationConnectionException
Puts a message into the current queue. The default PutMessageOptions are used, whatever they may be. The message to be put is retrieved from the Message part of the WebSphere MQ OTD, so it must be populated before calling this method.

Parameters:
None.

Throws:
MQException - Thrown if the put fails.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.

putWithOptions

void putWithOptions()
                    throws MQException,
                           com.stc.connector.appconn.common.ApplicationConnectionException
Put a message into the current queue. The PutMessageOptions set in this OTD's PMO part are used. The message to be put is retrieved from the Message part of the WebSphere MQ OTD, so it must be populated before calling this method.

Parameters:
None.

Throws:
MQException - Thrown if the put fails.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.

getCurrentDepth

int getCurrentDepth()
                    throws MQException,
                           com.stc.connector.appconn.common.ApplicationConnectionException
Gets the number of messages available in the current queue.

Parameters:
None.

Returns:
int - Returns the number of messages.
Throws:
MQException - Thrown if the query fails.
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.

getMaximumDepth

int getMaximumDepth()
                    throws MQException,
                           com.stc.connector.appconn.common.ApplicationConnectionException
Gets the maximum number of messages that can exist on the current queue.

Parameters:
None.

Returns:
int - Returns the number of messages
Throws:
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.
MQException - Thrown if the query fails.

getMaximumMessageLength

int getMaximumMessageLength()
                            throws MQException,
                                   com.stc.connector.appconn.common.ApplicationConnectionException
Gets the maximum length of application data that can exist in any one message on the current queue.

Parameters:
None.

Returns:
int - Returns the maximum application data size in a message.
Throws:
com.stc.connector.appconn.common.ApplicationConnectionException - Thrown if the current queue manager is no longer usable because it has been invalidated.
MQException - Thrown if the query fails.

Sun Adapter for Websphere MQ API

Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.