com.wm.app.tn.delivery
Class RoutingJob

java.lang.Object
  extended by com.wm.app.tn.util.TNFixedData
      extended by com.wm.app.tn.delivery.GuaranteedJob
          extended by com.wm.app.tn.delivery.RoutingJob
All Implemented Interfaces:
com.wm.data.IData, java.lang.Cloneable

public class RoutingJob
extends GuaranteedJob

A RoutingJob is used for guaranteed execution of asynch routing services. Each async service is associated with a RoutingJob and then passed off to the reliable execution engine for processing.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData
com.wm.app.tn.util.TNFixedData.TreeCursor
 
Field Summary
 
Fields inherited from class com.wm.app.tn.delivery.GuaranteedJob
DELIVERING, DONE, FAILED, HELD, NEW, NO_JOB_ID, PENDING, QUEUED, STATUS_STRINGS, STOPPED
 
Constructor Summary
RoutingJob()
          Default constructor needed for subclasses of TNFixedData
RoutingJob(java.lang.String jobId, java.lang.String serverId, DeliveryService service, com.wm.data.IData inputs, long ttw, int retryLimit, int retryFactor)
          Define a new Job
 
Method Summary
 void addActivityEntry(int type, java.lang.String brief, java.lang.String full)
          Adds an activity log entry.
static com.wm.data.IData create()
          create needed for subclasses of TNFixedData
 java.lang.String getClassification()
          This method should return the job "classification" which is a String representing an abbreviated name for the class.
 com.wm.data.IData getDBIData()
          This method is used by the DB operations when storing jobs.
static java.lang.Object[][] RoutingJobSchema()
           
 void setDBIData(com.wm.data.IData data)
          This method is used by the DB operations when restoring jobs from the database.
 void setInputData(com.wm.data.IData inputData)
          Set any additional service input data.
 
Methods inherited from class com.wm.app.tn.delivery.GuaranteedJob
attempted, codeForMsg, delivering, done, enqueue, exceedsRetries, fail, getBizDocEnvelope, getDeliveryService, getInputData, getInvokeAsUser, getJobId, getOutputData, getQueueName, getRetries, getRetryFactor, getRetryLimit, getServerId, getService, getStatus, getStatusMsg, getStatusVal, getTimeCreated, getTimeUpdated, getTransportStatus, getTransportStatusMessage, getTransportTime, getTTW, GuaranteedJobSchema, hold, invoke, isActive, isComplete, isDelivering, isDone, isExpired, isFailed, isHeld, isNew, isPending, isProcessing, isQueued, isRetry, isStopped, readyToRun, reset, retriesReached, retryFailed, save, setActive, setAttempted, setBizDocEnvelope, setDefaultServerId, setInvokeAsUser, setJobId, setOutputData, setProcessing, setQueueName, setRetries, setRetryFactor, setRetryLimit, setServerId, setService, setStatus, setTimeCreated, setTimeUpdated, setTransportStatus, setTransportStatusMessage, setTransportTime, setTTW, start, stop, toString
 
Methods inherited from class com.wm.app.tn.util.TNFixedData
clone, dataSize, get, get, getCursor, getHashCursor, getIndexCursor, getKey, getSharedCursor, getTreeCursor, indexOf, merge, set, set
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoutingJob

public RoutingJob()
Default constructor needed for subclasses of TNFixedData


RoutingJob

public RoutingJob(java.lang.String jobId,
                  java.lang.String serverId,
                  DeliveryService service,
                  com.wm.data.IData inputs,
                  long ttw,
                  int retryLimit,
                  int retryFactor)
Define a new Job

Parameters:
jobId - job id
serverId - server id
service - service to be invoked when running this job
inputs - service inputs
ttw - Time-to-wait (in milliseconds)
retryLimit - max number of retry attempts
Throws:
DeliveryException
Method Detail

create

public static com.wm.data.IData create()
create needed for subclasses of TNFixedData


RoutingJobSchema

public static java.lang.Object[][] RoutingJobSchema()

getClassification

public java.lang.String getClassification()
Description copied from class: GuaranteedJob
This method should return the job "classification" which is a String representing an abbreviated name for the class. It is used in the UI.

Specified by:
getClassification in class GuaranteedJob
Returns:
the classification

addActivityEntry

public void addActivityEntry(int type,
                             java.lang.String brief,
                             java.lang.String full)
Adds an activity log entry.

Specified by:
addActivityEntry in class GuaranteedJob
Parameters:
type - activity log type
brief - brief message to insert
full - full message to insert

setInputData

public final void setInputData(com.wm.data.IData inputData)
Set any additional service input data. Also checks for "bizdoc" and sets the bizdoc if it exists.

Overrides:
setInputData in class GuaranteedJob
Parameters:
inputData - data to be passed to B2B service

getDBIData

public com.wm.data.IData getDBIData()
This method is used by the DB operations when storing jobs. It contains key/values for the javaclass, senderId, receiverId, service, throwIfAborted, and routingStack.

Specified by:
getDBIData in class GuaranteedJob

setDBIData

public void setDBIData(com.wm.data.IData data)
This method is used by the DB operations when restoring jobs from the database.

Specified by:
setDBIData in class GuaranteedJob
Parameters:
data - data to set