infoservice.mailsystem.central
Class MailAddressDBEntry

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by infoservice.mailsystem.central.MailAddressDBEntry

public class MailAddressDBEntry
extends AbstractDatabaseEntry

This class is the implementation of an entry in the list of the latest mailaddresses.


Field Summary
private  long m_creationTime
           
private  javax.mail.Address m_mailAddress
          Stores the mailaddress.
private  java.util.Vector m_requestTimes
          Stores the times we have sent a reply to this mailaddress (as Long objects storing the corresponding System.currentTimeMillis() values).
 
Fields inherited from class anon.infoservice.AbstractDatabaseEntry
XML_LAST_UPDATE
 
Constructor Summary
MailAddressDBEntry(javax.mail.Address a_mailAddress, java.util.Vector a_requestTimes)
          Creates a new mailaddress entry.
 
Method Summary
 java.lang.String getId()
          Returns the ID of this mailaddress entry.
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
 java.util.Vector getRequestTimes()
          Returns a list of timestamps (as Long objects storing the corresponding System.currentTimeMillis() values) when we have sent a reply to this mailaddress.
 long getVersionNumber()
          Returns a version number which is used to determine the more recent entry, if two entries are compared (higher version number -> more recent entry).
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
getCreationTime, getExpireTime, isNewerThan, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_mailAddress

private javax.mail.Address m_mailAddress
Stores the mailaddress.


m_creationTime

private long m_creationTime

m_requestTimes

private java.util.Vector m_requestTimes
Stores the times we have sent a reply to this mailaddress (as Long objects storing the corresponding System.currentTimeMillis() values).

Constructor Detail

MailAddressDBEntry

public MailAddressDBEntry(javax.mail.Address a_mailAddress,
                          java.util.Vector a_requestTimes)
Creates a new mailaddress entry.

Parameters:
a_mailAddress - The mailaddress to store.
a_requestTimes - Vector of times, a response was sent to this mailaddress.
Method Detail

getId

public java.lang.String getId()
Returns the ID of this mailaddress entry. It's just the string representation of the mailaddress.

Specified by:
getId in class AbstractDatabaseEntry
Returns:
The ID of this address.

getVersionNumber

public long getVersionNumber()
Returns a version number which is used to determine the more recent entry, if two entries are compared (higher version number -> more recent entry).

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
The version number for this entry, it's just the expire time.

getLastUpdate

public long getLastUpdate()
Description copied from class: AbstractDatabaseEntry
Returns the time in milliseconds when this db entry was created from the origin instance.

Specified by:
getLastUpdate in class AbstractDatabaseEntry
Returns:
the time in milliseconds when this db entry was created from the origin instance

getRequestTimes

public java.util.Vector getRequestTimes()
Returns a list of timestamps (as Long objects storing the corresponding System.currentTimeMillis() values) when we have sent a reply to this mailaddress. Only the latest reply timestamps are stored.

Returns:
The list of timestamps when we have sent a reply to this mailaddress.