NNTP Functionality


In this example, you will build a read-only web view of the latest posts made to the various comp.lang.java.* newsgroups.

These groups are shown in Figure 4-4.

Figure 4-4. NNTP Group List.


In the next section, you'll look at a simple NNTP browser and compare the simplistic open-and-close approach of the code in Listing 4-2 with a more aggressive caching mechanism.

Clicking on the Most Recent Article link shows us an individual message post, as shown in Figure 4-5. An interface is provided to view earlier and later messages (as determined by the server), and a few of the key headers are provided.

Figure 4-5. Viewing a NNTP post.


Newsgroup Organization

NNTP groups are traditionally organized according to a hierarchy, with the most general name moving from left to right. For example, comp.lang.java.* can be translated to mean "all the groups under the category Computers, Languages, Java." The most infamous section of USENET are the groups under the alt.* category. Many companies have set up their own NNTP servers, independent of USENET, allowing users to post and discuss topics of interest (for example, internal discussions, or external customers discussing product issues). It's important to keep in mind that an NNTP server can be configured to participate in exchanging one or more USENET groups, but it is by no means required.


It's easy to imagine additional functionality, such as posting new messages, displaying additional detail, or even showing a threaded view of the conversation, but this is a reasonable start.



    Apache Jakarta Commons(c) Reusable Java Components
    Real World Web Services
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 137
    Authors: Will Iverson

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net