ADK CVS

tryllian.afc.task.jms
Class QueueTask

java.lang.Object
  extended bytryllian.afc.task.AbstractTask
      extended bytryllian.afc.task.DefaultTask
          extended bytryllian.afc.task.jms.JMSTask
              extended bytryllian.afc.task.jms.QueueTask
All Implemented Interfaces:
java.util.EventListener, MessageHandler, java.io.Serializable, Task
Direct Known Subclasses:
ReactiveJMSTask, SendJMSMessageTask

public class QueueTask
extends JMSTask

This class is a generic task for the Queue tasks. It initializes the session and connection for the Queue tasks.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class tryllian.afc.task.AbstractTask
NL
 
Fields inherited from interface tryllian.afc.task.Task
EMPTY_FINISH_VALUE, FORCED_FINISH_FAILURE, NO_TIME_OUT, TASK_TIMED_OUT
 
Constructor Summary
QueueTask()
          Creates a new instance of QueueTask with the default settings.
QueueTask(java.lang.String jndiFactory, java.lang.String urlProvider, java.lang.String connectionFactory, java.lang.String queueName)
          Create a JMSTask using the specified JMS parameters.
 
Method Summary
protected  javax.jms.QueueConnection getConnection()
          Get the connection used for this JMS Queue.
protected  javax.jms.Queue getQueue()
          Get the queue used for this connection.
protected  javax.jms.QueueSession getSession()
          Get the session used for this JMS Queue.
 void taskEnded()
          Cleans up the JMS resources
 void taskStarted()
          Initialize the connection.
 
Methods inherited from class tryllian.afc.task.jms.JMSTask
getConnectionFactory, getJMSDestination, getJNDIFactory, getURLProvider, setConnectionFactory, setJMSDestination, setJNDIFactory, setURLProvider
 
Methods inherited from class tryllian.afc.task.DefaultTask
addFinishingTask, addTask, getSubtasks, handleHeartbeat, propagateHeartbeat
 
Methods inherited from class tryllian.afc.task.AbstractTask
addTaskListener, fail, fail, finish, finish, finish, forceFinish, forceFinish, getAgentContext, getFinishValue, getState, getSupertask, getTimeOut, handleMessage, heartbeatReceived, logException, messageReceived, removeTaskListener, setAgentContext, setFinishValue, setTimeOut, succeed, succeed, taskAdded, taskRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueTask

public QueueTask()
Creates a new instance of QueueTask with the default settings. The defaults settings are the ones set in the default contructor of the JMSTask and :

See Also:
JMSTask.JMSTask(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

QueueTask

public QueueTask(java.lang.String jndiFactory,
                 java.lang.String urlProvider,
                 java.lang.String connectionFactory,
                 java.lang.String queueName)
Create a JMSTask using the specified JMS parameters.

Parameters:
jndiFactory - JNDI factory name
urlProvider - the provider URL of the JMS system.
connectionFactory - JMS factory name
queueName - name of the receiving queue
Method Detail

taskStarted

public void taskStarted()
Initialize the connection.

Overrides:
taskStarted in class AbstractTask

taskEnded

public void taskEnded()
Cleans up the JMS resources

Overrides:
taskEnded in class AbstractTask

getQueue

protected javax.jms.Queue getQueue()
Get the queue used for this connection.

Returns:
the current queue or null if the queue is not yet created.

getSession

protected javax.jms.QueueSession getSession()
Get the session used for this JMS Queue.

Returns:
the current session or null if the session is not yet created.

getConnection

protected javax.jms.QueueConnection getConnection()
Get the connection used for this JMS Queue.

Returns:
the current connection or null if the connection is not yet created.

Copyright 2005, Tryllian Solutions B.V.