Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.nntp
Class NewsGroupListResponse

java.lang.Object
  extended by com.jivesoftware.forum.nntp.NNTPResponseBuffer
      extended by com.jivesoftware.forum.nntp.NewsGroupListResponse
All Implemented Interfaces:
NNTPResponse

public class NewsGroupListResponse
extends NNTPResponseBuffer

Contains the response for a news group list command. The NNTP LIST command retrieves a list of groups with or without a description depending on LIST command variant is used. This class formats the response in a generic manner so it can be used by all group listing commands.


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.nntp.NNTPResponse
DOT_TERMINATOR, ENDLINE
 
Method Summary
static NNTPResponse sendList(Connection connection, java.util.Iterator groupIter, boolean useDescription)
          Obtain a new list of the given groups in the Iterator.
static NNTPResponse sendListGroup(Connection connection, java.util.Iterator articleIter)
          Create a list response for NEWGROUPS commands.
static NNTPResponse sendNewGroupList(Connection connection, java.util.Iterator groupIter)
          Create a list response for NEWGROUPS commands.
 
Methods inherited from class com.jivesoftware.forum.nntp.NNTPResponseBuffer
append, appendBulkText, appendLine, appendParameter, appendXParameter, close, endLine, flush, getValue, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sendList

public static NNTPResponse sendList(Connection connection,
                                    java.util.Iterator groupIter,
                                    boolean useDescription)
                             throws java.io.IOException
Obtain a new list of the given groups in the Iterator. If the useDescription flag is true, only include group name and desciption (RFC2980).

Parameters:
groupIter - Iterator over groups to include in the list
useDescription - True if a description should be included in results
connection - The connection this responder uses for sending response
Throws:
java.io.IOException - if there was problem sending the response over the connection.

sendListGroup

public static NNTPResponse sendListGroup(Connection connection,
                                         java.util.Iterator articleIter)
                                  throws java.io.IOException
Create a list response for NEWGROUPS commands. The format is essentially the same as the standard RFC977 LIST response except the response code is different.

Parameters:
articleIter - An iterator over articles to include in response
connection - The connection this responder uses for sending response
Returns:
the response that was generated and sent
Throws:
java.io.IOException - if there was problem sending the response over the connection.

sendNewGroupList

public static NNTPResponse sendNewGroupList(Connection connection,
                                            java.util.Iterator groupIter)
                                     throws java.io.IOException
Create a list response for NEWGROUPS commands. The format is essentially the same as the standard RFC977 LIST response except the response code is different.

Parameters:
groupIter - An iterator over groups to include in response
connection - The connection this responder uses for sending response
Throws:
java.io.IOException - if there was problem sending the response over the connection.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.