|
Sun Adapter for Websphere MQ API | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMqOtd
The WebSphere MQ Object Type Definition, the access model to WebSphere MQ queue managers, queues, and messages. This interface describes the eWay OTD structure exposed to Java Collaborations that use the WebSphere MQ eWay in non-receive (non-trigger) mode.
Method Summary | |
---|---|
void |
accessQueue(java.lang.String queueName)
Call this to access 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. |
void |
backout()
Tells the current queue manager that all gets and puts since the last syncpoint are to be backed out. |
void |
commit()
Tells the current queue manager that your Collaboration has reached a syncpoint and that all gets and puts that have occurred since the last syncpoint are to be made permanent. |
void |
connectToQueueManager(java.lang.String sQueueMgrName,
java.lang.String sHost,
int nPort,
java.lang.String sChannel,
java.lang.String sUserID,
java.lang.String sPwd)
At OTD creation time, the queue manager specified in the configuration will be automatically connected to (and be set as the current queue manager). |
javax.resource.spi.LocalTransaction |
createLocalTransactionSupport()
|
void |
get()
Get a message from the current queue. |
int |
getCharacterSet()
Returns the CCSID (coded character set ID) of the current queue manager's codeset. |
int |
getCurrentDepth()
Get the number of messages available in the current queue. |
IGMO |
getGMO()
Access to 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. |
int |
getMaximumPriority()
Returns the maximum message priority supported by the current queue manager. |
IMessage |
getMessage()
Accesses the Message branch of the OTD. |
IPMO |
getPMO()
Access to the PMO branch of this OTD. |
IQueue |
getQueue()
Accesses the Queue branch of the OTD. |
QueueAccessOptions |
getqueueAccessOptions()
Retrieve the access-options data structure that specifies the options that control the opening of the queue. |
QueueAccessOptions |
getQueueAccessOptions()
Retrieve the access-options data structure that specifies the options that control the opening of the queue. |
void |
getWithOptions()
Get a message from the current queue. |
boolean |
isQueueMgrConnected()
Determines whether the the current queue manager is still connected to WebSphere MQ. |
boolean |
isTransactionInProgress()
|
void |
newMessage()
Allows the user to destroy then recreate the Message object. |
void |
put()
Put a message into the current queue. |
void |
putWithOptions()
Put a message into the current queue. |
void |
selectQueue(java.lang.String queueName)
Select one of the previously accessed queues and make it the current queue. |
void |
selectQueueManager(java.lang.String queueMgrName)
Selects one of the queue managers you have previously connected to. |
Method Detail |
---|
IQueue getQueue()
IQueue
- Returns Queue sub-OTD.
IMessage getMessage()
IMessage
- Returns Message sub-OTD.
void newMessage() throws com.stc.connector.appconn.common.ApplicationConnectionException
com.stc.connector.appconn.common.ApplicationConnectionException
- Thrown if the current queue manager
is no longer usable because it has been invalidated.void connectToQueueManager(java.lang.String sQueueMgrName, java.lang.String sHost, int nPort, java.lang.String sChannel, java.lang.String sUserID, java.lang.String sPwd) throws MQAgentConnectionException, com.stc.connector.appconn.common.ApplicationConnectionException
Using this method connects to a queue manager and selects it as the current queue manager. There is a concept of a "current queue manager". The current queue manager is that queue manager that is the recipient of all the queue related calls. It is set in one of two ways. Either by this method, or the selectQueueManager method.
Important: this should only be called in Non-Transactional mode. If you are in XA compliant mode, there must be exactly one queue manager connection and that will be the one specified in the configuration. An attempt to connect to another queue manager in XA mode will cause an exception to be thrown.
sQueueMgrName
- name of queue managersHost
- name of host on which the queue manager residesnPort
- port of the host on which queue manager is boundsChannel
- channel to usesUserID
- user ID; may be blank or null
.sPwd
- password; may be blank or null
.
MQAgentConnectionException
- if there is a problem connecting
to the queue manager.
com.stc.connector.appconn.common.ApplicationConnectionException
- if the current connection context
is no longer usable because it has
been invalidated.selectQueueManager(String)
void selectQueueManager(java.lang.String queueMgrName) throws NoSuchQueueManagerException, com.stc.connector.appconn.common.ApplicationConnectionException
queueMgrName
- Name of the queue manager to select.
NoSuchQueueManagerException
- Thrown if the named queue manager
does not exist.
com.stc.connector.appconn.common.ApplicationConnectionException
- Thrown if the object is no longer
usable because it has been invalidated.connectToQueueManager(String, String, int, String, String, String)
boolean isQueueMgrConnected() throws com.stc.connector.appconn.common.ApplicationConnectionException
Boolean
- Returns true if still connected; otherwise false.
com.stc.connector.appconn.common.ApplicationConnectionException
- Thrown if the current queue manager is no
longer usable because it has been invalidated.int getCharacterSet() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
int
- Returns an integer specifying the CCSID.
MQException
- Thrown if the current queue manager is disconnected.
com.stc.connector.appconn.common.ApplicationConnectionException
- Thrown if the current queue manager is no
longer usable because it has been invalidated.int getMaximumPriority() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
int
- Returns an integer specifying the maximum priority.
MQException
- Thrown if the current queue manager is disconnected.
com.stc.connector.appconn.common.ApplicationConnectionException
- Thrown if the current queue manager is no
longer usable because it has been invalidated.void commit() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
MQException
- Thrown if the commit fails for any reason
other than being in XA mode.
com.stc.connector.appconn.common.ApplicationConnectionException
- Thrown if the current queue manager is no
longer usable because it has been
invalidated.
java.lang.IllegalStateException
- Thrown if the commit fails because of XA
mode.void backout() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
MQException
- Thrown if the backout fails for any
reason other than being in XA
mode.
com.stc.connector.appconn.common.ApplicationConnectionException
- Thrown if the current queue manager is no
longer usable because it has been
invalidated.
java.lang.IllegalStateException
- Thrown if the backout fails because of XA
mode.IGMO getGMO()
IQueue.getGMO()
instead.
IGMO
- Returns the GMO sub-OTD
IPMO getPMO()
IQueue.getPMO()
instead.
IPMO
- Returns the PMO sub-OTD
QueueAccessOptions getqueueAccessOptions()
IQueue.getqueueAccessOptions()
instead.
QueueAccessOptions
- Returns the QueueAccessOptions object
describing the queue access options in effect.
QueueAccessOptions getQueueAccessOptions()
IQueue.getqueueAccessOptions()
instead.
QueueAccessOptions
- Returns the QueueAccessOptions object
describing the queue access options in effect.
void accessQueue(java.lang.String queueName) throws MQAgentConnectionException, com.stc.connector.appconn.common.ApplicationConnectionException
This method is retained for backward compatibility. New collaborations
should use IQueue.accessQueue(java.lang.String)
instead.
queueName
- Name of the queue to access on the current queue
manager.
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.selectQueue(String)
,
MQOtd#selectQueueManager(String)
void accessQueue(java.lang.String queueName, java.lang.String qmgrName) throws MQAgentConnectionException, com.stc.connector.appconn.common.ApplicationConnectionException
selectQueueManager(String)
selectable} queue managers.
This method is retained for backward compatibility. New collaborations
should use IQueue.accessQueue(String, String)
instead.
queueName
- Name of the queue to access on the current queue
manager.qmgrName
- Name of the remote queue manager which owns the named
queue.
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.selectQueue(String)
,
MQOtd#selectQueueManager(String)
void selectQueue(java.lang.String queueName) throws NoSuchQueueException, MQAgentConnectionException, com.stc.connector.appconn.common.ApplicationConnectionException
This method is retained for backward compatibility. New collaborations
should use IQueue.selectQueue(java.lang.String)
instead.
queueName
- Name of the queue to select on the current queue
manager.
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.accessQueue(String)
void get() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
Message
part of the WebSphere
MQ OTD.
This method is retained for backward compatibility. New collaborations
should use IQueue.get()
instead.
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.void getWithOptions() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
Message
part of the WebSphere MQ OTD.
This method is retained for backward compatibility. New collaborations
should use IQueue.getWithOptions()
instead.
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.void put() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
Message
part of the WebSphere MQ OTD, so it must be populated
before calling this method.
This method is retained for backward compatibility. New collaborations
should use IQueue.put()
instead.
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.void putWithOptions() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
Message
part of the WebSphere MQ OTD, so it must be populated
before calling this method.
This method is retained for backward compatibility. New Collaborations
should use IQueue.putWithOptions()
instead.
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.int getCurrentDepth() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
This method is retained for backward compatibility. New collaborations
should use IQueue.getCurrentDepth()
instead.
int
- Returns the number of messages.
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.int getMaximumDepth() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
This method is retained for backward compatibility. New collaborations
should use IQueue.getMaximumDepth()
instead.
int
- Returns the number of messages.
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.int getMaximumMessageLength() throws MQException, com.stc.connector.appconn.common.ApplicationConnectionException
This method is retained for backward compatibility. New collaborations
should use IQueue.getMaximumMessageLength()
instead.
int
- Returns the maximum application data size in a message.
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.boolean isTransactionInProgress()
javax.resource.spi.LocalTransaction createLocalTransactionSupport()
|
Sun Adapter for Websphere MQ API | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |