things.data.transport.smtp
Class DSN

java.lang.Object
  extended by things.data.transport.smtp.DSN

public class DSN
extends java.lang.Object

Represents a DSN feature.

For textual representation in the format RET`ENVID`ORCPT`bS`bF`bD`bN

 This:
 MAIL FROM: RET=HDRS ENVID=QQ123456
 250  Sender ok
 RCPT TO: NOTIFY=SUCCESS,DELAY ORCPT=rfc822;vadrick@things.gatejen.org
 250  Recipient ok
 
 Would become:
 HDRS`QQ123456`vadrick@things.gatejen.org`TRUE`f`f`f
 
 Fields:
 RET = Return type.
 ENVID = Correlation id.
 ORCPT = Original recipient
 bS = if 'TRUE,', request SUCCESS notification.  Any other value is ignored.
 bF = if 'TRUE,', request FAILURE notification.  Any other value is ignored.
 bD = if 'TRUE,', request DELAY notification.  Any other value is ignored.
 bN = if 'TRUE,', request that you NEVER get notification.  Any other value is ignored.
 

Version:
1.0

Version History

EPG - Added by request - 1 JUN 09
 
Author:
Erich P. Gatejen

Field Summary
 java.lang.String ENVID
           
 boolean notifyDelay
           
 boolean notifyFailure
           
 boolean notifyNever
           
 boolean notifySuccess
           
 java.lang.String ORCPT
           
 java.lang.String RET
           
 
Constructor Summary
DSN()
           
 
Method Summary
static DSN parse(java.lang.String dsn)
          DSN as a comma separated field: RET`ENVID`ORCPT`bS`bF`bD`bN
 java.lang.String renderFrom()
          Render the DSN command.
 java.lang.String renderRecipient()
          Render the DSN command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RET

public java.lang.String RET

ENVID

public java.lang.String ENVID

ORCPT

public java.lang.String ORCPT

notifySuccess

public boolean notifySuccess

notifyFailure

public boolean notifyFailure

notifyDelay

public boolean notifyDelay

notifyNever

public boolean notifyNever
Constructor Detail

DSN

public DSN()
Method Detail

parse

public static DSN parse(java.lang.String dsn)
                 throws java.lang.Throwable
DSN as a comma separated field: RET`ENVID`ORCPT`bS`bF`bD`bN

Parameters:
dsn - the textual DSN.
Returns:
the parsed DSN or null if the DSN string is null or empty.
Throws:
java.lang.Throwable - for any format problems.

renderFrom

public java.lang.String renderFrom()
Render the DSN command. Brute force, please.

Returns:
the DSN command as a string.

renderRecipient

public java.lang.String renderRecipient()
Render the DSN command. Brute force, please.

Returns:
the recipient as a string.


Things.