|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectiaik.smime.ess.ReceiptsFrom
public class ReceiptsFrom
The S/MIMEv3 ESS type ReceiptsFrom.
The Enhanced Security Services
for S/MIMEv3 (ESS) (RFC 2634) specifies the ReceiptsFrom
to be used within a ReceiptRequest
attribute for indicating from whom signed receipts shall be requested:
ReceiptsFrom ::= CHOICE {
allOrFirstTier [0] AllOrFirstTier,
-- formerly "allOrNone [0]AllOrNone"
receiptList [1] SEQUENCE OF GeneralNames }
AllOrFirstTier ::= INTEGER { -- Formerly AllOrNone
allReceipts (0),
firstTierRecipients (1) }
When creating a new ReceiptsFrom you either may supply the allOrFirstTier value indicating to request
receipts from all recipients (0), or
from first tier recipients that
receive the message as members of a mailing list, or you
may supply a specific list
of recipients requested to send a signed receipt:
int allOrFirstTier = ReceiptsFrom.ALL_RECIPIENTS; ReceiptsFrom receiptsFrom = new ReceiptsFrom(allOrFirstTier);respectively
GeneralNames[] receiptList = ...; ReceiptsFrom receiptsFrom = new ReceiptsFrom(receiptList);
ReceiptRequest| Field Summary | |
|---|---|
static int |
ALL_RECIPIENTS
The AllOrFirstTier value allReceipts (0). |
static int |
FIRST_TIER_RECIPIENTS
The AllOrFirstTier value firstTierRecipients (1). |
| Constructor Summary | |
|---|---|
ReceiptsFrom(iaik.asn1.ASN1Object obj)
Creates an ReceiptsFrom from an ASN1Object |
|
ReceiptsFrom(iaik.asn1.structures.GeneralNames[] receiptList)
Creates a ReceiptsFrom from the given receiptList. |
|
ReceiptsFrom(int allOrFirstTier)
Creates a ReceiptsFrom from the given allOrFirstTier value. |
|
ReceiptsFrom(java.lang.String[] recipientAddresses)
Creates a ReceiptsFrom from the given recipients. |
|
| Method Summary | |
|---|---|
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the given ASN.1 ReceiptsFrom object for parsing
the internal structure. |
boolean |
equals(java.lang.Object obj)
Compares this ReceiptsFrom to the specified object. |
int |
getAllOrFirstTier()
Returns the allOrFirstTier value. |
iaik.asn1.structures.GeneralNames[] |
getReceiptList()
Returns a list of recipients requested to send a receipts. |
java.lang.String[] |
getRecipientAddresses()
Returns all recipient email addresses included in this ReceiptsFrom. |
int |
hashCode()
Returns a hashcode for this object. |
iaik.asn1.ASN1Object |
toASN1Object()
Returns this ReceiptsFrom as ASN1Object. |
java.lang.String |
toString()
Returns a string representation of this ReceiptsFrom. |
java.lang.String |
toString(boolean detailed)
Returns a string representation of this ReceiptsFrom. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ALL_RECIPIENTS
public static final int FIRST_TIER_RECIPIENTS
| Constructor Detail |
|---|
public ReceiptsFrom(int allOrFirstTier)
throws java.lang.IllegalArgumentException
allOrFirstTier - the allOrFirstTier value, indicating to
request receipts from all
recipients (0), or only from first tier recipients that receive the message as members
of a mailing list
java.lang.IllegalArgumentException - if the supplied allOrFirstTier value
is invalid (not 0 or 1)
public ReceiptsFrom(iaik.asn1.structures.GeneralNames[] receiptList)
throws java.lang.IllegalArgumentException
receiptList - the list of recipients requested to send receipts
java.lang.IllegalArgumentException
public ReceiptsFrom(java.lang.String[] recipientAddresses)
throws java.lang.IllegalArgumentException
This constructor may be used to immediately supply the email addresses of the intended recipients. The required GeneralNames structures are internally created (for each email address one GeneralNames with only one GeneralName entry of type rfc822Name).
recipientAddresses - the email addresses of the intended recipients
java.lang.IllegalArgumentException
public ReceiptsFrom(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
obj - the ReceiptsFrom as ASN1Object
iaik.asn1.CodingException - if the encoding is invalid| Method Detail |
|---|
public int getAllOrFirstTier()
If the value is 0 receipts are requested from all
recipients. If the value os 1 receipts are requested from first tier recipients that receive the message
as members of a mailing list. If the value is -1 method getReceiptList may be called to get a specific list of recipients requested to
send receipts.
public iaik.asn1.structures.GeneralNames[] getReceiptList()
If this method returns null method getAllOrFirstTier to get the sllOrFirstTier value indicating from whom
receipts are to be requested.
null if this is a allOrFirstTier ReceiptsFrompublic java.lang.String[] getRecipientAddresses()
This method searches the receiptList GeneralNames for all GeneralName objects of type rfc822Name. Any GeneralName of type rfc822Name contributes to the String array of email addresses returned by this method.
null if no
reeiptList is set or no email addresses are specified
public void decode(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
ReceiptsFrom object for parsing
the internal structure.
obj - the ReceiptsFrom as ASN1Object
iaik.asn1.CodingException - if the encoding is invalid
public iaik.asn1.ASN1Object toASN1Object()
throws iaik.asn1.CodingException
iaik.asn1.CodingExceptionpublic boolean equals(java.lang.Object obj)
ReceiptsFrom to the specified object.
equals in class java.lang.Objectobj - the object to compare this ReceiptsFrom
against.
true, if the given object is equal to this
ReceiptsFrom,
false otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(boolean detailed)
detailed - whether to give detailed information
|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
|
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
|