The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search
Class grendel.storage.NewsStore
All Packages  This Package  Class Hierarchy  Class Search  Index

Class grendel.storage.NewsStore

java.lang.Object
   |
   +----javax.mail.Service
           |
           +----javax.mail.Store
                   |
                   +----grendel.storage.NewsStore

Store for News (NNTP) folders.

This class really shouldn't be public, but I haven't figured out how to tie into javamail's Session class properly. So, instead of using Session.getStore(String), you instead need to call NewsStore.GetDefaultStore(Session).


public class  NewsStore
     extends javax.mail.Store
{
          // Fields 4
     protected static NewsStore DefaultStore;
     protected NewsRC newsrc;
     protected NNTPConnection nntp;
     protected NewsFolderRoot root_folder;

          // Constructors 2
     public NewsStore(Session);
     public NewsStore(Session, URLName);

          // Methods 13
     public static Store GetDefaultStore(Session);
     public void close();
     public Folder getDefaultFolder();
     String[] getDefaultSubscriptions();
     public Folder getFolder(String) throws MessagingException;
     public Folder getFolder(URL);
     public Folder getFolder(URLName);
     int[] getGroupCounts(NewsFolder);
     InputStream getMessageStream(NewsMessage, boolean) throws NNTPException, IOException;
     NewsRC getNewsRC();
     private void loadNewsRC(String) throws IOException;
     void openNewsgroup(NewsFolder, long, long);
     protected boolean protocolConnect(String, String, String) throws MessagingException;
}



Fields


nntp

   protected NNTPConnection nntp


newsrc

   protected NewsRC newsrc


root_folder

   protected NewsFolderRoot root_folder


DefaultStore

   protected static NewsStore DefaultStore



Constructors


NewsStore

   public NewsStore(Session s) 


NewsStore

   public NewsStore(Session s, 
                    URLName u) 



Methods


GetDefaultStore

   public static Store GetDefaultStore(Session s) 


getNewsRC

   NewsRC getNewsRC() 


loadNewsRC

   private void loadNewsRC(String host)  throws IOException


protocolConnect

   protected boolean protocolConnect(String host, 
                                     String user, 
                                     String password)  throws MessagingException


close

   public void close() 
Overrides:
close in class Service


getDefaultFolder

   public Folder getDefaultFolder() 
Overrides:
getDefaultFolder in class Store


getFolder

   public Folder getFolder(String name)  throws MessagingException
Overrides:
getFolder in class Store


getFolder

   public Folder getFolder(URL url) 


getFolder

   public Folder getFolder(URLName urlName) 
Overrides:
getFolder in class Store


getMessageStream

   InputStream getMessageStream(NewsMessage message, 
                                boolean headers_too)  throws NNTPException, IOException


getGroupCounts

   int[] getGroupCounts(NewsFolder folder) 

Returns array of int: [ nmessages low hi ]



getDefaultSubscriptions

   String[] getDefaultSubscriptions() 

Returns a list of newsgroups to which new users should be subscribed, if they don't have a newsrc file. Tries to ask the news server for this list; otherwise, uses some builtin defaults.



openNewsgroup

   void openNewsgroup(NewsFolder folder, 
                      long from, 
                      long to) 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4
Copyright © 1998-1999 The Mozilla Organization.
Last modified December 25, 1998.