org.filteredpush.applepie.triage
Class StaticApplePieJobPlanner

java.lang.Object
  extended by org.filteredpush.applepie.triage.StaticApplePieJobPlanner
All Implemented Interfaces:
JobPlanner

public class StaticApplePieJobPlanner
extends java.lang.Object
implements JobPlanner


Field Summary
static java.util.Map<java.lang.String,java.lang.String> prototypes
           
 
Constructor Summary
StaticApplePieJobPlanner()
          Load a list of job "prototype" objects that can be cloned to plan a job.
 
Method Summary
 AbstractJob planJob(FPMessage message)
          Examine a message, and produce a job plan for acting upon the message based upon the type of the message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prototypes

public static java.util.Map<java.lang.String,java.lang.String> prototypes
Constructor Detail

StaticApplePieJobPlanner

public StaticApplePieJobPlanner()
Load a list of job "prototype" objects that can be cloned to plan a job. These objects are stored in a map as MessageType key to AbstractJob value pairs.

Method Detail

planJob

public AbstractJob planJob(FPMessage message)
Examine a message, and produce a job plan for acting upon the message based upon the type of the message. When a message of an unknown type is presented, returns an instance of ErrorJob.

Specified by:
planJob in interface JobPlanner
Parameters:
message - the message on which to base the job plan.
Returns:
resulting job plan
Throws:
java.lang.CloneNotSupportedException
UnsupportedMessageTypeException