com.hs.mail.imap.mailbox
Class SelectedMailbox

java.lang.Object
  extended by com.hs.mail.imap.mailbox.SelectedMailbox
All Implemented Interfaces:
EventListener

public class SelectedMailbox
extends Object
implements EventListener

Since:
Mar 31, 2010
Author:
Won Chul Doh

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hs.mail.imap.event.EventListener
EventListener.Event
 
Constructor Summary
SelectedMailbox(long sessionID, long mailboxID, boolean readOnly)
          Constructor used to create a selected mailbox.
 
Method Summary
 void add(int msn, long uid)
           
 void event(EventListener.Event event)
          Invoked when an event was fired.
 List<Long> getCachedUids()
           
 EventTracker getEventTracker()
           
 long getMailboxID()
           
 int getMessageNumber(long uid)
          Get the message sequence number corresponding to the given UID from the cache.
 long getUID(int msn)
          Get the UID corresponding to the given message sequence number from the cache.
 boolean isDeletedMailbox()
          Is the mailbox deleted by other session?
 boolean isReadOnly()
           
 boolean isRecent()
          Check whether this mailbox contains recent messages.
 void resetEvents()
           
 void setRecent(boolean recent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectedMailbox

public SelectedMailbox(long sessionID,
                       long mailboxID,
                       boolean readOnly)
Constructor used to create a selected mailbox.

Parameters:
sessionID - ID of the session who selected this mailbox
mailboxID - ID of the selected mailbox
readOnly - Is this mailbox is read-only? If selected via EXAMINE command this mailbox is read-only. Otherwise if selected via SELECT command this mailbox is not read-only.
Method Detail

getEventTracker

public EventTracker getEventTracker()

getCachedUids

public List<Long> getCachedUids()

getMailboxID

public long getMailboxID()

isReadOnly

public boolean isReadOnly()

isRecent

public boolean isRecent()
Check whether this mailbox contains recent messages.


isDeletedMailbox

public boolean isDeletedMailbox()
Is the mailbox deleted by other session?

Returns:
true when the mailbox has been deleted by another session, false otherwise

setRecent

public void setRecent(boolean recent)

getMessageNumber

public int getMessageNumber(long uid)
Get the message sequence number corresponding to the given UID from the cache. If not exist, -1 is returned.


getUID

public long getUID(int msn)
Get the UID corresponding to the given message sequence number from the cache. If not exist, -1 is returned.


add

public void add(int msn,
                long uid)

event

public void event(EventListener.Event event)
Description copied from interface: EventListener
Invoked when an event was fired.

Specified by:
event in interface EventListener

resetEvents

public void resetEvents()


Copyright © 2011. All Rights Reserved.