Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail.token
Class EmailToken

java.lang.Object
  extended by com.jivesoftware.forum.mail.token.EmailToken
All Implemented Interfaces:
Cacheable, com.tangosol.io.ExternalizableLite, java.io.Serializable, java.lang.Comparable

public class EmailToken
extends java.lang.Object
implements java.lang.Comparable, Cacheable, com.tangosol.io.ExternalizableLite

EmailTokens are used by the EmailTokenManager to represent the temporary token ids associated with user watch notification emails. They are not the concern of other parts of the system, but are not implemented as a private inner class to facilitate serialization.

See Also:
Serialized Form

Constructor Summary
EmailToken()
          Default constructor initializes with current time and a random value for token value.
EmailToken(int tokenValue, java.util.Date timestamp)
          Initializes with supplied tokenValue and timestamp.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 int getCachedSize()
          Returns the approximate size of the Object in bytes.
 java.util.Date getTimestamp()
          Returns the date the token was created.
 int getTokenValue()
          Returns the actual token.
 int hashCode()
           
 void readExternal(java.io.DataInput dataInput)
           
 void writeExternal(java.io.DataOutput dataOutput)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailToken

public EmailToken()
Default constructor initializes with current time and a random value for token value.


EmailToken

public EmailToken(int tokenValue,
                  java.util.Date timestamp)
Initializes with supplied tokenValue and timestamp.

Parameters:
tokenValue - value of the token - used to authenticate users.
timestamp - the date the token was created.
Method Detail

getTokenValue

public int getTokenValue()
Returns the actual token.

Returns:
the actual token.

getTimestamp

public java.util.Date getTimestamp()
Returns the date the token was created.

Returns:
the date the token was created.

readExternal

public void readExternal(java.io.DataInput dataInput)
                  throws java.io.IOException
Specified by:
readExternal in interface com.tangosol.io.ExternalizableLite
Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.DataOutput dataOutput)
                   throws java.io.IOException
Specified by:
writeExternal in interface com.tangosol.io.ExternalizableLite
Throws:
java.io.IOException

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

getCachedSize

public int getCachedSize()
Description copied from interface: Cacheable
Returns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.

Specified by:
getCachedSize in interface Cacheable
Returns:
the size of the Object in bytes.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.