iaik.smime.ess
Class MLData

java.lang.Object
  extended by iaik.smime.ess.MLData
All Implemented Interfaces:
ASN1Type

public class MLData
extends java.lang.Object
implements ASN1Type

The S/MIMEv3 ESS type MLData.

The Enhanced Security Services for S/MIMEv3 (ESS) (RFC 2634) specifies the MLData type to be included in an MLExpansionHistory attribute for carrying the expansion history describing each mailing list agent (MLA) that has processed a message. As an MLA distributes a message to members of an ML, the MLA records its unique identifier, date and time of expansion, and receipt policy in an MLData structure:

 
 MLData ::= SEQUENCE {  
   mailListIdentifier EntityIdentifier,
   expansionTime GeneralizedTime,  
   mlReceiptPolicy MLReceiptPolicy OPTIONAL }
 
When creating an MLData object the EntityIdentifier uniquely identifying the MLA and the time at which the MLA has processed the message has to be supplied. A MLReceiptPolicy may be subsequently supplied to supersede the originator request for signed receipts, e.g.:
 // the MLA is identified by an IssuerAndSerialNumber:
 IssuerAndSerialNumber issuerAndSerialNumber = ...;
 EntityIdentifier mailListID = new EntityIdentifier(issuerAndSerialNumber);
 // the time the MLA processed the message
 Date expansionTime = ...;
 // create the MLData:
 MLData mlData = new MLData(mailListID, expansionTime);
 // a list of recipients to which receipts should be returned in addition to the originator:
 GeneralNames recipientList = ...;
 // create a MLReceiptPolicy of appropriate type:
 MLReceiptPolicy mlReceiptPolicy = new MLReceiptPolicy(MLReceiptPolicy.IN_ADDITION_TO, recipientList);
 // set the MLReceiptPolicy of the MLData:
 mlData.setMLReceiptPolicy(mlReceiptPolicy);
 
After having created an MLData it may be added to the list of MLData entries of an MLExpansionHistory attribute:
 mlExpansionHistory.addMLData(mlData);
 

See Also:
EntityIdentifier, MLReceiptPolicy, MLExpansionHistory

Constructor Summary
MLData()
          Empty default constructor.
MLData(ASN1Object obj)
          Creates a MLData from an ASN1Object.
MLData(EntityIdentifier mailListIdentifier, java.util.Date expansionTime)
          Creates a MLData object from given mail list identifier and expansion time.
 
Method Summary
 boolean belongsTo(EntityIdentifier mailListIdentifier)
          Checks if this MLData belongs to the MLA identified by the given mail list identifier.
 void decode(ASN1Object obj)
          Decodes an MLData from its ASN.1 representation.
 boolean equals(java.lang.Object obj)
          Compares this MLData to the specified object.
 java.util.Date getExpansionTime()
          Gets the expansion time of this MLData.
 EntityIdentifier getMailListIdentifier()
          Gets the mail list identifier of this MLData.
 MLReceiptPolicy getMLReceiptPolicy()
          Gets the MLReceiptPolicy of this MLData, if present.
 int hashCode()
          Returns a hashcode for this object.
 void setMLReceiptPolicy(MLReceiptPolicy mlReceiptPolicy)
          Sets the optional MLReceiptPolicy component of this MLData.
 ASN1Object toASN1Object()
          Returns this MLData as ASN1Object.
 java.lang.String toString()
          Returns a String representation of this MLData.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MLData

public MLData()
Empty default constructor. Required for dynamic object creation only. Shall NOT be used by an application!


MLData

public MLData(EntityIdentifier mailListIdentifier,
              java.util.Date expansionTime)
Creates a MLData object from given mail list identifier and expansion time.

Use method setMLReceiptPolicy if you have to set the optional MLReceiptPolicy component.

Parameters:
mailListIdentifier - the entity identifier identifying the mail list agent (MLA) to which this MLData belongs
expansionTime - the time at which the MLA processed the message

MLData

public MLData(ASN1Object obj)
       throws CodingException
Creates a MLData from an ASN1Object.

Parameters:
obj - the MLData as ASN1Object
Throws:
CodingException - if an error occurs while parsing the ASN1Object
Method Detail

setMLReceiptPolicy

public void setMLReceiptPolicy(MLReceiptPolicy mlReceiptPolicy)
Sets the optional MLReceiptPolicy component of this MLData.

Parameters:
mlReceiptPolicy - the receipt policy superseding the originator request for signed receipts

getMailListIdentifier

public EntityIdentifier getMailListIdentifier()
Gets the mail list identifier of this MLData.

Returns:
the entity identifier identifying the MLA to which this MLData belongs

getExpansionTime

public java.util.Date getExpansionTime()
Gets the expansion time of this MLData.

Returns:
the time at which the MLA has processed the message

getMLReceiptPolicy

public MLReceiptPolicy getMLReceiptPolicy()
Gets the MLReceiptPolicy of this MLData, if present.

Returns:
the receipt policy superseding the originator request for signed receipts, or null if no MLReceiptPolicy is set

belongsTo

public boolean belongsTo(EntityIdentifier mailListIdentifier)
Checks if this MLData belongs to the MLA identified by the given mail list identifier.

Parameters:
mailListIdentifier - the EntityIdentifier identifying the MLA in mind
Returns:
true if this MLData belongs to the MLA identified by the given mail list identifier.

equals

public boolean equals(java.lang.Object obj)
Compares this MLData to the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this MLData against.
Returns:
true, if the given object is equal to this MLData, false otherwise

hashCode

public int hashCode()
Returns a hashcode for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this object

decode

public void decode(ASN1Object obj)
            throws CodingException
Decodes an MLData from its ASN.1 representation.

Specified by:
decode in interface ASN1Type
Parameters:
obj - the MLData as ASN1Object
Throws:
CodingException - if an error occurs while parsing the ASN1Object

toASN1Object

public ASN1Object toASN1Object()
                        throws CodingException
Returns this MLData as ASN1Object.

Specified by:
toASN1Object in interface ASN1Type
Returns:
this MLData as ASN1Object.
Throws:
CodingException

toString

public java.lang.String toString()
Returns a String representation of this MLData.

Overrides:
toString in class java.lang.Object
Returns:
a String representation

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