Package org.apache.commons.net.nntp
Class Article
java.lang.Object
org.apache.commons.net.nntp.Article
- All Implemented Interfaces:
Threadable
This is a class that contains the basic state needed for message retrieval and threading. With thanks to Jamie Zawinski (jwz@jwz.org)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHeaderField
(String name, String val) Deprecated.void
addReference
(String msgId) Adds a message-id to the list of messages that this message references (i.e.private void
int
Deprecated.long
getDate()
getFrom()
String[]
Returns the MessageId references as an array of Stringsboolean
isDummy()
String[]
static void
printThread
(Article article) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.static void
printThread
(Article article, int depth) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.static void
printThread
(Article article, int depth, PrintStream ps) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.static void
printThread
(Article article, PrintStream ps) Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.void
setArticleId
(String string) void
setArticleNumber
(int a) Deprecated.void
setArticleNumber
(long l) void
setChild
(Threadable child) void
void
void
setNext
(Threadable next) void
setSubject
(String string) private void
Attempts to parse the subject line for some typical reply signatures, and strip them outboolean
toString()
-
Field Details
-
articleNumber
private long articleNumber -
subject
-
date
-
articleId
-
simplifiedSubject
-
from
-
references
-
isReply
private boolean isReply -
kid
-
next
-
-
Constructor Details
-
Article
public Article()
-
-
Method Details
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article
- the root of the article 'tree'- Since:
- 3.4
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article
- the root of the article 'tree'depth
- the current tree depth
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article
- the root of the article 'tree'depth
- the current tree depthps
- the PrintStream to use- Since:
- 3.4
-
printThread
Recursive method that traverses a pre-threaded graph (or tree) of connected Article objects and prints them out.- Parameters:
article
- the root of the article 'tree'ps
- the PrintStream to use- Since:
- 3.4
-
addHeaderField
Deprecated. -
addReference
Adds a message-id to the list of messages that this message references (i.e. replies to)- Parameters:
msgId
- the message id to add
-
flushSubjectCache
private void flushSubjectCache() -
getArticleId
-
getArticleNumber
Deprecated. -
getArticleNumberLong
public long getArticleNumberLong() -
getDate
-
getFrom
-
getReferences
Returns the MessageId references as an array of Strings- Returns:
- an array of message-ids
-
getSubject
-
isDummy
public boolean isDummy()- Specified by:
isDummy
in interfaceThreadable
-
makeDummy
- Specified by:
makeDummy
in interfaceThreadable
-
messageThreadId
- Specified by:
messageThreadId
in interfaceThreadable
-
messageThreadReferences
- Specified by:
messageThreadReferences
in interfaceThreadable
-
setArticleId
-
setArticleNumber
Deprecated. -
setArticleNumber
public void setArticleNumber(long l) -
setChild
- Specified by:
setChild
in interfaceThreadable
-
setDate
-
setFrom
-
setNext
- Specified by:
setNext
in interfaceThreadable
-
setSubject
-
simplifiedSubject
- Specified by:
simplifiedSubject
in interfaceThreadable
-
simplifySubject
private void simplifySubject()Attempts to parse the subject line for some typical reply signatures, and strip them out -
subjectIsReply
public boolean subjectIsReply()- Specified by:
subjectIsReply
in interfaceThreadable
-
toString
-