All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.download.DcfClientProtocol

java.lang.Object
   |
   +----semper.download.DcfClientProtocol

public class DcfClientProtocol
extends Object
implements ProtocolConstants, Runnable
The DcfClientProtocol module implements the client part of the client-server download protocol

Version:
$Revision: 1.3 $ $Date: 1998/05/28 15:09:45 $
Author:
Petros Pantis, Kostas Tzelepis

Variable Index

 o CLOSED_CONNECTION
State during shutdown connection to the server host
 o END_CONNECTION
State after closing the connection to the server host
 o ERROR
Defines the error state identifier
 o SEND_ERROR
State in which a error will be send to the server host
 o WAIT_FOR_ACK
State in which the current thread suspends his execution and waits for the resume signal from the ClientRequest module.
 o WAIT_FOR_DCF_LIST
State in which the current thread suspends his execution and waits for the resume signal and the list of certificate blocks that are stale or unknown.
 o WAIT_FOR_FILE_LIST
State in which the current thread suspends his execution and waits for the resume signal and the list of all the new/updated files
 o WAIT_TO_DIE
State in which the current thread suspends his execution and waits for the resume signal.

Constructor Index

 o DcfClientProtocol(String, Object, int, ProgressBar)
DcfClientProtocol object constructor

Method Index

 o getCommObject()
Called from the ClientRequest module each time the DcfClientProtocol thread is suspeneded.
 o getError()
Method used to caught the error message
 o getIn()
Method used to obtain the input stream of the connection
 o getOut()
Method used to obtain the output stream of the connection
 o getState()
Retieve the executional state of the DcfClientProtocol thread
 o Notify(int, Object)
Wakes up the suspended DcfClientProtocol thread
 o run()
DcfClientProtocol's main method, which implements the client part of the download protocol
 o start()
Strarts the DcfClientProtocol thread

Variables

 o ERROR
 public static final int ERROR
Defines the error state identifier

 o CLOSED_CONNECTION
 public static int CLOSED_CONNECTION
State during shutdown connection to the server host

 o END_CONNECTION
 public static final int END_CONNECTION
State after closing the connection to the server host

 o SEND_ERROR
 public static final int SEND_ERROR
State in which a error will be send to the server host

 o WAIT_FOR_ACK
 public static final int WAIT_FOR_ACK
State in which the current thread suspends his execution and waits for the resume signal from the ClientRequest module. The next state after resuming, is ether the SEND_ERROR state if something goes wrong with the downloaded files or the UPDATE_DCF is sended to the connected host

 o WAIT_FOR_DCF_LIST
 public static final int WAIT_FOR_DCF_LIST
State in which the current thread suspends his execution and waits for the resume signal and the list of certificate blocks that are stale or unknown.

 o WAIT_FOR_FILE_LIST
 public static final int WAIT_FOR_FILE_LIST
State in which the current thread suspends his execution and waits for the resume signal and the list of all the new/updated files

 o WAIT_TO_DIE
 public static final int WAIT_TO_DIE
State in which the current thread suspends his execution and waits for the resume signal. After this signal has been caught, the thread exits

Constructors

 o DcfClientProtocol
 public DcfClientProtocol(String myid,
                          Object host,
                          int port,
                          ProgressBar bar)
DcfClientProtocol object constructor

Parameters:
myid - client's unique identifier
host - the remote server
port - server's download port number

Methods

 o start
 public void start()
Strarts the DcfClientProtocol thread

 o getIn
 public ObjectInputStream getIn()
Method used to obtain the input stream of the connection

Returns:
value the input stream of the connection
 o getOut
 public ObjectOutputStream getOut()
Method used to obtain the output stream of the connection

Returns:
value the output stream of the connection
 o Notify
 public synchronized void Notify(int status,
                                 Object notifyobj)
Wakes up the suspended DcfClientProtocol thread

Parameters:
status - defines the next execution state of the DcfClientProtocol thread
notifyobj - a object that contains data usefull for the next state
 o getCommObject
 public Object getCommObject()
Called from the ClientRequest module each time the DcfClientProtocol thread is suspeneded.

Returns:
value the request data structure made by the suspended DcfClientProtocol thread
 o getState
 public int getState()
Retieve the executional state of the DcfClientProtocol thread

Returns:
value the current executional state
 o getError
 public String getError()
Method used to caught the error message

Returns:
value the error string object
 o run
 public void run()
DcfClientProtocol's main method, which implements the client part of the download protocol


All Packages  Class Hierarchy  This Package  Previous  Next  Index