com.jivesoftware.forum.nntp
Class NewsGroupListResponse
java.lang.Object
com.jivesoftware.forum.nntp.NNTPResponseBuffer
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 listuseDescription
- True if a description should be included in resultsconnection
- 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 responseconnection
- 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 responseconnection
- The connection this responder uses for sending response
- Throws:
java.io.IOException
- if there was problem sending the response over the
connection.
Copyright © 1999-2006 Jive Software.