All Packages Class Hierarchy This Package Previous Next Index
Class semper.download.NewsClient
java.lang.Object
|
+----semper.download.NewsClient
- public class NewsClient
- extends Object
- implements ProtocolConstants
Class which defines and implements the basic functionality in order
to interact with a the CRA/News Server
- Version:
- $Revision: 1.1 $ $Date: 1998/03/13 16:40:56 $
- Author:
- Petros Pantis, Kostas Tzelepis
-
NEWS_ACCEPTED
- State in which the news server accepted the uploaded news
-
NEWS_ERROR
- State identifier which declares that an error has been occured during
news down/uploading
-
RETRIEVE_NEWS
- During this state the news client thread downloads the last
news from the news server
-
SEND_NEWS
- During this state the news client thread uploads news to
the news server
-
UPLOAD_NEWS
- Identifier that informs the news server the intention of the
client to upload news
-
NewsClient(InetAddress, long, Download)
- Object constructor
-
getNews(String[], Vector[])
- Method used to download news from the nes server
-
uploadNews(Credentials, Vector, byte[], String[])
- Method used to upload news to the news server
RETRIEVE_NEWS
public static final int RETRIEVE_NEWS
- During this state the news client thread downloads the last
news from the news server
UPLOAD_NEWS
public static final int UPLOAD_NEWS
- Identifier that informs the news server the intention of the
client to upload news
NEWS_ACCEPTED
public static final int NEWS_ACCEPTED
- State in which the news server accepted the uploaded news
SEND_NEWS
public static final int SEND_NEWS
- During this state the news client thread uploads news to
the news server
NEWS_ERROR
public static final int NEWS_ERROR
- State identifier which declares that an error has been occured during
news down/uploading
NewsClient
public NewsClient(InetAddress host,
long prevC,
Download dm)
- Object constructor
- Parameters:
- host - the ip-address of the current host
- prevC - the last down/upload request time
- dm - a reference to the download manager
getNews
public long getNews(String retMsg[],
Vector newVector[])
- Method used to download news from the nes server
- Parameters:
- retMsg - a String object that stores a error message that occure during news downloading
- newVector - a Vector object in which the downloading news will be stored
- Returns:
- value a negative value if some error occur, else the current time which is send from the news server
uploadNews
public long uploadNews(Credentials creds,
Vector newsVector,
byte signature[],
String retMsg[])
- Method used to upload news to the news server
- Parameters:
- creds - the owned credentials
- newsVector - the news that will be uploaded to the news server
- signature - the signature of the above news structure
- retMsg - used in order to keep the executional status of the request
- Returns:
- value a negative value if some error occur, else the current time which is send from the news server
All Packages Class Hierarchy This Package Previous Next Index