|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.gcs.netutil.NetworkClient | +--com.ibm.gcs.netutil.nntp.NntpClient
This class implements a simple NNTP client. It is used to crawl usenet newsgroups.
NetworkClient
, Serialized FormConstructor Summary | |
NntpClient(java.lang.String hostName,
boolean connect)
Create a new NntpClient. |
|
NntpClient(java.lang.String hostName,
int port,
boolean connect)
Create a new NntpClient. |
Method Summary | |
static void |
foo(java.lang.String[] args)
Some testcode. |
ArticleInfo |
getArticle(int articleNumber)
Return the article with the specified number. |
GroupInfo |
getCurrentGroup()
get the current group's info |
GroupListInfo |
listGroups()
list all groups |
GroupInfo |
setCurrentGroup(java.lang.String groupName)
Switch to a specific group. |
Methods inherited from class com.ibm.gcs.netutil.NetworkClient |
connect, disconnect, getHost, getPort, isConnected |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NntpClient(java.lang.String hostName, int port, boolean connect) throws java.net.UnknownHostException, java.io.IOException
hostName
- - the hostnameport
- - the portjava.net.UnknownHostException
- - Socket could not be opened with specified hostjava.io.IOException
- - DataOutputStream and/or BufferedReader could not be createdpublic NntpClient(java.lang.String hostName, boolean connect) throws java.net.UnknownHostException, java.io.IOException
hostName
- - the hostnamejava.net.UnknownHostException
- - Socket could not be opened with specified hostjava.io.IOException
- - DataOutputStream and/or BufferedReader could not be createdMethod Detail |
public GroupInfo setCurrentGroup(java.lang.String groupName) throws java.io.IOException
groupName
- - the groupnamejava.io.IOException
- - command could not be sent to the serverpublic GroupInfo getCurrentGroup() throws java.io.IOException
java.io.IOException
- - command could not be sent to the serverpublic GroupListInfo listGroups() throws java.io.IOException
groupName
- - the groupnamejava.io.IOException
- - command could not be sent to the serverpublic ArticleInfo getArticle(int articleNumber) throws java.io.IOException
articleNumber
- - the article numberjava.io.IOException
- - command could not be sent to the serverpublic static void foo(java.lang.String[] args)
args
- - command line arguments
|
EIP Web Crawler APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |