|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Used to create a scheduled task which sends a JMS message to either a Queue or Topic. Once created, the MessageTaskInfo
Scheduler.create before the task will be created in the
persistent store.
TaskInfo
,
Scheduler
Field Summary |
---|
Fields inherited from interface com.ibm.websphere.scheduler.TaskStatus |
---|
CANCELLED, COMPLETE, INVALID, RUNNING, SCHEDULED, serialVersionUID, SUSPENDED |
Method Summary | |
---|---|
java.lang.String |
getConnectionFactoryJndiName()
Retrieves the set connection factory JNDI name. |
java.lang.String |
getDestinationJndiName()
Retrieves the set destination JNDI name. |
int |
getJMSPriority()
Gets the set priority |
java.lang.Object |
getMessageData()
Retrieves the message data in the form of an Object. |
java.util.Map |
getMessageHeaders()
This returns the properties associated with the message. |
java.lang.String |
getUsername()
Gets the set username |
void |
initialize(java.lang.String connectionFactoryJndiName,
java.lang.String destinationJndiName,
byte[] msg)
Initializes a MessageTaskInfo using the specified connection factory, destination, and message data. |
void |
initialize(java.lang.String connectionFactoryJndiName,
java.lang.String destinationJndiName,
java.util.Map msg)
Initializes a MessageTaskInfo using the specified connection factory, destination, and message data. |
void |
initialize(java.lang.String connectionFactoryJndiName,
java.lang.String destinationJndiName,
java.lang.String msg)
Initializes a MessageTaskInfo using the specified connection factory, destination, and message data. |
void |
setConnectionFactoryJndiName(java.lang.String connectionFactoryJndiName)
Sets the JNDI name of either a queue connection factory, or a topic connection factory. |
void |
setDestinationJndiName(java.lang.String destinationJndiName)
Sets the JNDI name of a JMS destination. |
int |
setJMSPriority()
Deprecated. |
void |
setJMSPriority(int priority)
Determines the JMS Priority that the message will be sent with. |
void |
setMessageData(byte[] msg)
Sets the message data. |
void |
setMessageData(java.util.Map msg)
Sets the message data. |
void |
setMessageData(java.lang.String msg)
Sets the message data. |
void |
setMessageHeaders(java.util.Map headers)
This allows message properties to be specified for the message. |
void |
setPassword(java.lang.String password)
Sets the password which will be used to connect to the JMS ConnectionFactory. |
void |
setUsername(java.lang.String username)
Sets the username which will be used to connect to the JMS ConnectionFactory. |
Methods inherited from interface com.ibm.websphere.scheduler.TaskInfo |
---|
getAutoPurge, getName, getNotificationSink, getNumberOfRepeats, getRepeatInterval, getStartByInterval, getStartTime, getStartTimeInterval, getUserCalendarJNDIName, getUserCalendarSpecifier, setAutoPurge, setInitialState, setName, setNotificationSink, setNotificationSink, setNumberOfRepeats, setRepeatInterval, setStartByInterval, setStartTime, setStartTimeInterval, setUserCalendar, validate |
Methods inherited from interface com.ibm.websphere.scheduler.TaskStatus |
---|
getNextFireTime, getRepeatsLeft, getStatus, getTaskId, getTimeCreated |
Method Detail |
public void initialize(java.lang.String connectionFactoryJndiName, java.lang.String destinationJndiName, java.lang.String msg)
connectionFactoryJndiName
- the JNDI name of the Queue or Topic connection factory.destinationJndiName
- the JNDI name for the destinationmsg
- the String Message to send to the destination when the task fires.public void initialize(java.lang.String connectionFactoryJndiName, java.lang.String destinationJndiName, java.util.Map msg) throws javax.jms.JMSException
connectionFactoryJndiName
- the JNDI name of the Queue or Topic connection factory.destinationJndiName
- the JNDI name for the destinationmsg
- the MapMessage to send to the destination when the task fires.
javax.jms.JMSException
- a message key in the supplied map is not a java.lang.String or a value is not
serializable.public void initialize(java.lang.String connectionFactoryJndiName, java.lang.String destinationJndiName, byte[] msg)
connectionFactoryJndiName
- the JNDI name of the Queue or Topic connection factory.destinationJndiName
- the JNDI name for the destinationmsg
- the array of bytes to send to the destination when the task fires.public void setConnectionFactoryJndiName(java.lang.String connectionFactoryJndiName)
connectionFactoryJndiName
- the JNDI name of the connection factory.public java.lang.String getConnectionFactoryJndiName()
public void setDestinationJndiName(java.lang.String destinationJndiName)
destinationJndiName
- the destination JNDI name.public java.lang.String getDestinationJndiName()
public void setMessageData(java.lang.String msg)
javax.jms.StringMessage
will be sent when the task fires.
Note: Only one type of message can be sent in a single MessageTaskInfo
instance.
msg
- any text message.public void setMessageData(java.util.Map msg)
javax.jms.MapMessage
will be sent when the task fires.
msg
- any Map of Serializable data.public void setMessageData(byte[] msg)
msg
- any array of bytes.public java.lang.Object getMessageData()
setMessageData
methods.public void setJMSPriority(int priority)
priority
- the JMS prioritypublic int setJMSPriority()
public int getJMSPriority()
public void setUsername(java.lang.String username)
username
- the username.public java.lang.String getUsername()
public void setMessageHeaders(java.util.Map headers) throws javax.jms.JMSException
The allowable types are [Boolean, Byte, Short, Integer, Long, Float, Double, String].
headers
- the Map holding the properties to be used.
javax.jms.JMSException
- an illegal value was detected.public java.util.Map getMessageHeaders()
public void setPassword(java.lang.String password)
password
- the password.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |