You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Class grendel.storage.NewsFolder

java.lang.Object
   |
   +----javax.mail.Folder
           |
           +----grendel.storage.FolderBase
                   |
                   +----grendel.storage.NewsFolder

This class implements a Folder representing a newsgroup.


class  NewsFolder
     extends grendel.storage.FolderBase
{
          // Fields 11
     static final double ALLOWABLE_XOVER_WASTE;
     static final boolean DEBUG;
     static final int MAX_XOVER_REQUEST_SIZE;
     private boolean bogus_group_p;
     private int estimated_message_count;
     private int high_message;
     private boolean loaded;
     private int low_message;
     private String name;
     private Folder parent;
     private NewsStore store;

          // Constructors 1
     NewsFolder(Store, Folder, String);

          // Methods 26
     public void appendMessages(Message[]) throws MessagingException;
     public void close(boolean) throws MessagingException;
     public boolean create(int);
     public boolean delete(boolean);
     long deletedMessageBytes();
     void ensureLoaded();
     public boolean exists();
     public Message[] expunge() throws MessagingException;
     public void fetch(Message[], FetchProfile);
     public Folder getFolder(String);
     public String getFullName();
     public int getMessageCount();
     protected void getMessageCounts();
     InputStream getMessageStream(NewsMessage, boolean) throws IOException;
     public String getName();
     public Folder getParent();
     public char getSeparator();
     public int getType();
     public int getUndeletedMessageCount();
     public int getUnreadMessageCount();
     public boolean hasNewMessages();
     public boolean isOpen();
     public Folder[] list(String);
     public void open(int);
     public boolean renameTo(Folder);
     void setFlagsDirty(boolean, Message, long);
}



Fields


DEBUG

   static final boolean DEBUG


parent

   private Folder parent


name

   private String name


store

   private NewsStore store


loaded

   private boolean loaded


high_message

   private int high_message


low_message

   private int low_message


estimated_message_count

   private int estimated_message_count


bogus_group_p

   private boolean bogus_group_p


ALLOWABLE_XOVER_WASTE

   static final double ALLOWABLE_XOVER_WASTE

The maximum portion of the elements in an NNTP XOVER request which are allowed to be superfluous. (Some amount of superfluity is good, since it reduces the number of client-server round-trips, at the cost of sending slightly more data per request.)


MAX_XOVER_REQUEST_SIZE

   static final int MAX_XOVER_REQUEST_SIZE

The maximum number of articles which may be requested per NNTP XOVER request. Larger values reduce the number of client-server round-trips; smaller values increase client responsiveness on slow connections.



Constructors


NewsFolder

   NewsFolder(Store s, 
              Folder parent, 
              String name) 



Methods


getSeparator

   public char getSeparator() 
Overrides:
getSeparator in class Folder


getType

   public int getType() 
Overrides:
getType in class Folder


getName

   public String getName() 
Overrides:
getName in class Folder


getFullName

   public String getFullName() 
Overrides:
getFullName in class Folder


getParent

   public Folder getParent() 
Overrides:
getParent in class Folder


list

   public Folder[] list(String pattern) 
Overrides:
list in class Folder


getFolder

   public Folder getFolder(String subfolder) 
Overrides:
getFolder in class Folder


create

   public boolean create(int type) 
Overrides:
create in class Folder


exists

   public boolean exists() 
Overrides:
exists in class Folder


getMessageCounts

   protected void getMessageCounts() 


hasNewMessages

   public boolean hasNewMessages() 
Overrides:
hasNewMessages in class Folder


getMessageCount

   public int getMessageCount() 

Returns the total number of messages in the folder, or -1 if unknown. This includes deleted and unread messages.

Overrides:
getMessageCount in class FolderBase


getUndeletedMessageCount

   public int getUndeletedMessageCount() 

Returns the number of non-deleted messages in the folder, or -1 if unknown. This includes unread messages.



getUnreadMessageCount

   public int getUnreadMessageCount() 

Returns the number of unread messages in the folder, or -1 if unknown. This does not include unread messages that are also deleted.

Overrides:
getUnreadMessageCount in class Folder


deletedMessageBytes

   long deletedMessageBytes() 

Returns the number of bytes consumed by deleted but not expunged messages in the folder, or -1 if unknown.



appendMessages

   public void appendMessages(Message[] msgs)  throws MessagingException
Overrides:
appendMessages in class Folder


fetch

   public void fetch(Message[] msgs, 
                     FetchProfile fp) 
Overrides:
fetch in class Folder


expunge

   public Message[] expunge()  throws MessagingException
Overrides:
expunge in class Folder


delete

   public boolean delete(boolean value) 
Overrides:
delete in class Folder


renameTo

   public boolean renameTo(Folder f) 
Overrides:
renameTo in class Folder


ensureLoaded

   void ensureLoaded() 
Overrides:
ensureLoaded in class FolderBase


open

   public void open(int mode) 
Overrides:
open in class Folder


close

   public void close(boolean doExpunge)  throws MessagingException
Overrides:
close in class Folder


isOpen

   public boolean isOpen() 
Overrides:
isOpen in class Folder


getMessageStream

   InputStream getMessageStream(NewsMessage message, 
                                boolean headers_too)  throws IOException


setFlagsDirty

   void setFlagsDirty(boolean flags_dirty, 
                      Message message, 
                      long old_flags) 

Assert whether any messages have had their flags changed. A child message should call this on its parent when any persistent flag value is changed. If a non-null message is provided, and flags_dirty is true, then notify any observers that this message has changed.

Parameter Description
flags_dirty Whether the flags should currently be considered to be dirty.
message If flags_dirty, the Message (BerkeleyMessage) that has become dirty.
old_flags If message is non-null, the previous value of its flags (Message.flags should be the new, dirty value.)



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4