public class MessageOptions
extends java.lang.Object
The options can be set as an integer, or you can comma separate the option names. The options are directly copied from the WebsphereMQ client API documentation.
In the adapter configuration file this class is aliased as wmq-message-options which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MessageOptions() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMessageOption(java.lang.String option)
Will add the value of the MQC field name given to the options.
|
protected void |
addQueueCloseOption(java.lang.String option)
Will add the value of the MQC field name given to the options.
|
protected void |
addQueueOpenOption(java.lang.String option)
Will add the value of the MQC field name given to the options.
|
MQMessageFactory.MQMessageInstance |
getMessageFormat() |
java.lang.String |
getMessageOptions() |
java.lang.String |
getQueueCloseOptions() |
java.lang.String |
getQueueOpenOptions() |
int |
messageOptionsIntValue()
Calculate the integer value of the options field.
|
int |
queueCloseOptionsIntValue()
Calculate the integer value of the options field.
|
int |
queueOpenOptionsIntValue()
Calculate the integer value of the options field.
|
void |
setMessageFormat(MQMessageFactory.MQMessageInstance s)
Set the
MQMessage.format field to the desired value. |
void |
setMessageOptions(java.lang.String i)
Options that control the action of MQQueue.put() and MQQueue.get()
|
void |
setQueueCloseOptions(java.lang.String i)
Set the close options when closing the queue.
|
void |
setQueueOpenOptions(java.lang.String i)
Set the open options on the queue when accessing the Queue.
|
public java.lang.String getQueueOpenOptions()
public void setQueueOpenOptions(java.lang.String i)
Any or none of the following MQC fields may be used. If more than one option is required, the values can be combined by simply comma separating each string option.
i
- the openOptions to set. The default options are
MQOO_INPUT_AS_Q_DEF , MQOO_OUTPUTMQQueueManager.accessQueue(String, int)
,
MQC
public java.lang.String getQueueCloseOptions()
public void setQueueCloseOptions(java.lang.String i)
One of the following MQC fields may be used.
i
- the closeOptions to setMQC.MQCO_NONE
,
MQC.MQCO_DELETE
,
MQC.MQCO_DELETE_PURGE
public MQMessageFactory.MQMessageInstance getMessageFormat()
public void setMessageFormat(MQMessageFactory.MQMessageInstance s)
MQMessage.format
field to the desired value.
Only Text, String, Bytes, and Object are supported. They correspond to the values MQC.MQFMT_STRING, MQC.MQFMT_STRING, MQC.MQFMT_NONE and "Object" respectively.
s
- the messageType to setMQMessageFactory.MQMessageInstance
public java.lang.String getMessageOptions()
public void setMessageOptions(java.lang.String i)
Any or none of the following MQC fields may be used. If more than one option is required, the values can be combined by simply comma separating each option.
If the context of the message options is part of a producer, then the following values have meaning.
If the context of the message options is part of a consumer, then the following values have meaning.
i
- the messageOptions to setpublic int messageOptionsIntValue() throws CoreException
CoreException
public int queueOpenOptionsIntValue() throws CoreException
CoreException
public int queueCloseOptionsIntValue() throws CoreException
CoreException
protected void addMessageOption(java.lang.String option) throws CoreException
option
- the MQC field nameCoreException
protected void addQueueOpenOption(java.lang.String option) throws CoreException
option
- the MQC field nameCoreException
protected void addQueueCloseOption(java.lang.String option) throws CoreException
option
- the MQC field nameCoreException