Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.nntp
Class NNTPParser

java.lang.Object
  extended by com.jivesoftware.forum.nntp.NNTPParser

public class NNTPParser
extends java.lang.Object

A parser that understands the basic semantics of the NNTP protocol and can translate them into calls on the NNTP API.


Field Summary
static NNTPResponse WELCOME_NO_POST
          The standard welcome message sent by the server when no posting is allowed.
static NNTPResponse WELCOME_POST
          The standard welcome message sent by the server when posting is allowed.
 
Constructor Summary
NNTPParser(SessionManager manager, Session owner, Connection conn)
          Create a parser for the given session.
 
Method Summary
 boolean parse()
          Parse a socket in a fully blocking manner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WELCOME_POST

public static final NNTPResponse WELCOME_POST
The standard welcome message sent by the server when posting is allowed.


WELCOME_NO_POST

public static final NNTPResponse WELCOME_NO_POST
The standard welcome message sent by the server when no posting is allowed.

Constructor Detail

NNTPParser

public NNTPParser(SessionManager manager,
                  Session owner,
                  Connection conn)

Create a parser for the given session.

The parser will turn NNTP commands into calls on the session object (storing state information between calls to parse on multi-line commands).

Parameters:
owner - The session this parser works for
conn - The connection this parser should send outgoing information on
Method Detail

parse

public boolean parse()
              throws java.io.IOException
Parse a socket in a fully blocking manner.

Returns:
true if parsing completed normally. If false is returned, the end of the stream was reached and connection should be closed.
Throws:
java.io.IOException - if there was trouble reading the line

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.