Package org.sonews.daemon.io
Class ThreadedNNTPConnection
java.lang.Object
org.sonews.daemon.io.ThreadedNNTPConnection
- All Implemented Interfaces:
Runnable
,NNTPConnection
@Component
@Scope("prototype")
public class ThreadedNNTPConnection
extends Object
implements NNTPConnection, Runnable
-
Field Summary
Fields inherited from interface org.sonews.daemon.NNTPConnection
MESSAGE_ID_PATTERN, NEWLINE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
getUser()
void
lineReceived
(byte[] raw) Due to the readLockGate there is no need to synchronize this method.void
println
(byte[] line) void
println
(CharSequence line) void
run()
void
setCurrentArticle
(Article art) void
setCurrentGroup
(Group group) void
setLastActivity
(long time) void
-
Constructor Details
-
ThreadedNNTPConnection
-
-
Method Details
-
run
public void run() -
lineReceived
Due to the readLockGate there is no need to synchronize this method.- Parameters:
raw
-- Throws:
IOException
IllegalArgumentException
- if raw is null.IllegalStateException
- if calling thread does not own the readLock.
-
close
- Specified by:
close
in interfaceNNTPConnection
- Throws:
IOException
-
getCurrentArticle
- Specified by:
getCurrentArticle
in interfaceNNTPConnection
-
getCurrentCharset
- Specified by:
getCurrentCharset
in interfaceNNTPConnection
-
getCurrentGroup
- Specified by:
getCurrentGroup
in interfaceNNTPConnection
-
getLastActivity
public long getLastActivity()- Specified by:
getLastActivity
in interfaceNNTPConnection
-
getSocketChannel
- Specified by:
getSocketChannel
in interfaceNNTPConnection
-
getUser
- Specified by:
getUser
in interfaceNNTPConnection
-
println
public void println(byte[] line) - Specified by:
println
in interfaceNNTPConnection
-
println
- Specified by:
println
in interfaceNNTPConnection
-
setCurrentArticle
- Specified by:
setCurrentArticle
in interfaceNNTPConnection
-
setCurrentGroup
- Specified by:
setCurrentGroup
in interfaceNNTPConnection
-
setLastActivity
public void setLastActivity(long time) - Specified by:
setLastActivity
in interfaceNNTPConnection
-
setUser
- Specified by:
setUser
in interfaceNNTPConnection
-