|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.admc.jamama.Mit
Messsage-In-Transit. Every Message-In-Transit corresponds to a message in a traditional Sendmail queue. These are messages that in the act of being delivered, or in a deferred or frozen state, in which case they can be either dropped or transmitted in the future. Once a message reaches a destination for the designated recipient, it is no longer a Mit because it is no longer in transite. For the time being, I am just making the data fields publicly accessible because Mits are primarily targets of actions, not typical Java objects that control their own fate and behavior. If somebody can show me why encapsulation of these fields would lead to some advantage, please do so. If the objection is that the "user" shouldn't need to know how x is implemented if they just want to "o.getX()", I agree that they don't need to know-- but in our case it hurts nothing and it takes less code than a bunch of unnecessary gets and sets. For visibility purposes, it makes no difference whether I publish "getX()" and "setX(y)" rather than "x" since I anticipate adding no associated behavior related to "x". For the few cases where we want to impart some control over data fields, we'll use traditional methods for access. May need another field like routerData, but for data to be persisted. Could store reason for previous failures, what it is that this Mit is waiting on, etc.
| Field Summary | |
java.lang.String |
explicitRouter
The name of a Jamama Router instance that we want this Mit routed to next. |
java.lang.String[] |
oldRecipients
SMTP RCPT Recipients that have been removed from this message since Jamama received it. |
java.util.HashMap |
routeData
Name/value pairs valid for a single pass through a Pipeline. |
java.lang.String[] |
routeHistory
Route History for the last or current Routing Run. |
java.lang.String[] |
routeRunHistory
Routing Run History. |
SMTPMessage |
smtpMessage
This contains everything needed to transmit or receive or write a message to a UNIX mailbox. |
int |
state
|
static int |
STATE_CONSUMED
Mit is dead and should not be used for anything |
static int |
STATE_DEFERRED
Mit waiting for routing to be attempted |
static int |
STATE_FROZEN
Mit should not be routed |
static int |
STATE_INCIPIENT
Mit is has not yet been routed or persisted |
static int |
STATE_ROUTENOW
Mit should be routed immediately |
static int |
STATE_ROUTING
Mit is currently being Routed |
java.lang.String |
status
A very brief explanation of current status, like "Unable to reach host 'mail.x.com'". |
| Constructor Summary | |
Mit(Repository inRepository)
|
|
| Method Summary | |
void |
accept()
Satisfy SMTP requirements for accepting a message. |
Mit |
clone(Address[] newRecipients,
java.lang.String newExplicitRouter)
Make a copy of self with specified SMTP recipients and explicitRouter. |
Repository |
getRepository()
|
void |
persist(boolean exists)
Store this to the repository. |
java.lang.String |
toString()
Prints all the stuff you would want to persist, except for the message contents (due to resource cost). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int STATE_INCIPIENT
public static final int STATE_ROUTING
public static final int STATE_DEFERRED
public static final int STATE_FROZEN
public static final int STATE_ROUTENOW
public static final int STATE_CONSUMED
public int state
public SMTPMessage smtpMessage
public java.lang.String[] oldRecipients
public java.lang.String explicitRouter
public java.lang.String[] routeRunHistory
public java.lang.String[] routeHistory
public java.util.HashMap routeData
public java.lang.String status
| Constructor Detail |
public Mit(Repository inRepository)
| Method Detail |
public Repository getRepository()
public Mit clone(Address[] newRecipients,
java.lang.String newExplicitRouter)
newRecipients - Contents of the new Recipients fieldnewExplicitRouter - Name of a Router that is valid with the
Routing Director.public void accept()
public void persist(boolean exists)
throws java.io.IOException
exists - Whether "this" already exists in the repository
java.io.IOExceptionpublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||