iaik.smime.ess.utils
Class SignedReceiptException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by iaik.cms.CMSException
              extended by iaik.smime.SMimeException
                  extended by iaik.smime.ess.ESSException
                      extended by iaik.smime.ess.utils.SignedReceiptException
All Implemented Interfaces:
java.io.Serializable

public class SignedReceiptException
extends ESSException

This exception is thrown when the creation of a SignedReceipt fails for some reason. Calling method getReason may be used to get the reason code for the failure.

See Also:
Serialized Form

Field Summary
static int ATTRIBUTE_PARSING_ERROR
          SignedReceipt creation abort reason "Attribute parsing error".
static int ML_RECEIPT_POLICY_VALUE_NONE
          SignedReceipt creation abort reason "MlReceiptPolicy value none".
static int NO_RECEIPT_REQUEST
          SignedReceipt creation abort reason "No receipt request".
static int NOT_A_FIRST_TIER_RECIPIENT
          SignedReceipt creation abort reason "Not a firstTier recipient".
static int NOT_IN_RECEIPTS_FROM_LIST
          SignedReceipt creation abort reason "Not in receiptsFrom list".
protected  int reason_
          The reason why no SignedReceipt has been created.
static int RECEIPT_REQUEST_ATTRIBUTES_MISMATCH
          SignedReceipt creation abort reason "ReceiptRequest attributes mismatch".
 
Constructor Summary
SignedReceiptException()
          Creates a new SignedReceiptException.
SignedReceiptException(int reason)
          Creates an SignedReceiptException for the specified reason.
SignedReceiptException(int reason, java.lang.String message)
          Creates an SignedReceiptException for the specified reason and error message.
SignedReceiptException(java.lang.String msg)
          Creates an SignedReceiptException with a specified message.
 
Method Summary
 int getReason()
          Returns the reason why no SignedReceipt has been created.
static java.lang.String getReasonMsg(int reason)
          Returns a message describing the given reason code.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_RECEIPT_REQUEST

public static final int NO_RECEIPT_REQUEST
SignedReceipt creation abort reason "No receipt request". This reason indicates that no SignedReceipt is created because no signed receipt has been requested by the sender (i.e. no SignerInfo of the original SignedData message does contain the ReceiptRequest attribute.

See Also:
Constant Field Values

NOT_IN_RECEIPTS_FROM_LIST

public static final int NOT_IN_RECEIPTS_FROM_LIST
SignedReceipt creation abort reason "Not in receiptsFrom list". This reason indicates that no receipt has to be sent because no one has been requested from the current recipient (i.e. the ReceiptRequest attribute is present, but the recipients address is not included in the receiptsFrom field.

See Also:
Constant Field Values

ML_RECEIPT_POLICY_VALUE_NONE

public static final int ML_RECEIPT_POLICY_VALUE_NONE
SignedReceipt creation abort reason "MlReceiptPolicy value none". This reason indicates that an MLExpansionHistory attribute is present in the outermost SignedData layer and that its last MLData element has a MLReceiptPolicy value of "none": the the mail list receipt policy supersedes the receipt request of the sender and no signed receipt has to be sent.

See Also:
Constant Field Values

NOT_A_FIRST_TIER_RECIPIENT

public static final int NOT_A_FIRST_TIER_RECIPIENT
SignedReceipt creation abort reason "Not a firstTier recipient". This reason indicates that no receipt has to be sent because receipts are only requested from firstTier recipients but the current recipient is no firstTier recipient (i.e. the outer SignedData layer contains the MLExpansionHistory attribute.

See Also:
Constant Field Values

RECEIPT_REQUEST_ATTRIBUTES_MISMATCH

public static final int RECEIPT_REQUEST_ATTRIBUTES_MISMATCH
SignedReceipt creation abort reason "ReceiptRequest attributes mismatch". This reason indicates that no receipt has to be sent because there are ReceiptRequest attributes included in the SignedData layer that are not identical as required by RFC2634.

See Also:
Constant Field Values

ATTRIBUTE_PARSING_ERROR

public static final int ATTRIBUTE_PARSING_ERROR
SignedReceipt creation abort reason "Attribute parsing error". This reason indicates that no receipt can be sent because an attribute parsing error. Such an error may occur when trying to parse a ReceiptRequest attribute included in the inner SignedData layer or a MLExpansionHistory attribute included in the outer layer.

See Also:
Constant Field Values

reason_

protected int reason_
The reason why no SignedReceipt has been created.

Constructor Detail

SignedReceiptException

public SignedReceiptException()
Creates a new SignedReceiptException.


SignedReceiptException

public SignedReceiptException(java.lang.String msg)
Creates an SignedReceiptException with a specified message.

Parameters:
msg - the message.

SignedReceiptException

public SignedReceiptException(int reason)
Creates an SignedReceiptException for the specified reason. The reason may be one of the following:

Parameters:
reason - the reason why no SignedReceipt has been created

SignedReceiptException

public SignedReceiptException(int reason,
                              java.lang.String message)
Creates an SignedReceiptException for the specified reason and error message. The reason may be one of the following:

Parameters:
reason - the reason why no SignedReceipt has been created
message - the error message
Method Detail

getReason

public int getReason()
Returns the reason why no SignedReceipt has been created. The returned reason may be one of the following:

Returns:
the reason why no SignedReceipt has been created

getReasonMsg

public static java.lang.String getReasonMsg(int reason)
Returns a message describing the given reason code.

Parameters:
reason - the reason code

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC