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
-
CLOSED_CONNECTION
- State during shutdown connection to the server host
-
END_CONNECTION
- State after closing the connection to the server host
-
ERROR
- Defines the error state identifier
-
SEND_ERROR
- State in which a error will be send to the server host
-
WAIT_FOR_ACK
- State in which the current thread suspends his execution and waits
for the resume signal from the ClientRequest module.
-
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.
-
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
-
WAIT_TO_DIE
- State in which the current thread suspends his execution and waits
for the resume signal.
-
DcfClientProtocol(String, Object, int, ProgressBar)
- DcfClientProtocol object constructor
-
getCommObject()
- Called from the ClientRequest module each time the DcfClientProtocol thread
is suspeneded.
-
getError()
- Method used to caught the error message
-
getIn()
- Method used to obtain the input stream of the connection
-
getOut()
- Method used to obtain the output stream of the connection
-
getState()
- Retieve the executional state of the DcfClientProtocol thread
-
Notify(int, Object)
- Wakes up the suspended DcfClientProtocol thread
-
run()
- DcfClientProtocol's main method, which implements the client part
of the download protocol
-
start()
- Strarts the DcfClientProtocol thread
ERROR
public static final int ERROR
- Defines the error state identifier
CLOSED_CONNECTION
public static int CLOSED_CONNECTION
- State during shutdown connection to the server host
END_CONNECTION
public static final int END_CONNECTION
- State after closing the connection to the server host
SEND_ERROR
public static final int SEND_ERROR
- State in which a error will be send to the server host
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
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.
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
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
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
start
public void start()
- Strarts the DcfClientProtocol thread
getIn
public ObjectInputStream getIn()
- Method used to obtain the input stream of the connection
- Returns:
- value the input stream of the connection
getOut
public ObjectOutputStream getOut()
- Method used to obtain the output stream of the connection
- Returns:
- value the output stream of the connection
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
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
getState
public int getState()
- Retieve the executional state of the DcfClientProtocol thread
- Returns:
- value the current executional state
getError
public String getError()
- Method used to caught the error message
- Returns:
- value the error string object
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