All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.download.DcfServerProtocol

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----semper.download.DcfServerProtocol

public class DcfServerProtocol
extends Thread
implements ProtocolConstants
Implementation for the server-part of the download protocol

Version:
$Revision: 1.2 $ $Date: 1998/03/13 16:26:48 $
Author:
Petros Pantis, Kostas Tzelepis

Variable Index

 o CLOSED_CONNECTION
State in which the connection to the client is closed
 o END_CONNECTION
State before the connection to the client is closed
 o ERROR
State in which a error have been occur
 o SEND_ERROR
State in which a error is sended to the client
 o WAIT_DCF_LIST
During this state the current thread freeze, until the resume signal is send together with a list of new/updated certificate blocks identifier, which is built, consulting the local DCF
 o WAIT_FOR_DCF_UPDATE
During this state the current thread freeze, until the resume signal is send
 o WAIT_FOR_DES_ENCRYPT
During this state the current thread freeze, until a requested file has been encrypted
 o WAIT_FOR_DES_NEGO
During this state the current thread freeze, until a symmetric key has been established between client and the current server thread
 o WAIT_FOR_EXTRACT_FILE_LIST
During this state the current thread freeze, until files are extracted from the negotiated certificate block list
 o WAIT_TO_DIE
During this state the current thread freeze, until the resume signal is send.
 o WAIT_VMF_LIST
During this state the current thread freeze, until the resume signal is send together with a list of certificate blocks.

Constructor Index

 o DcfServerProtocol(Socket)
DcfServerProtocol object constuctor

Method Index

 o getAddress()
Retieves the peer address of the client
 o getCommObject()
Called from the DownloadServer module in order to retrieve/process status information of the suspended DcfServerProtocol thread
 o getId()
Retieves the identifier of the connected client
 o getIn()
Method that return the input stream of the current connection
 o getOut()
Method that return the output stream of the current connection
 o getState()
Returns the current execution state
 o Notify(int, Object)
Wakes up the suspended DcfServerProtocol thread with a new state and data that should be used during the next state
 o run()
Main method that implements server's download protocol

Variables

 o ERROR
 public static int ERROR
State in which a error have been occur

 o CLOSED_CONNECTION
 public static int CLOSED_CONNECTION
State in which the connection to the client is closed

 o END_CONNECTION
 public static final int END_CONNECTION
State before the connection to the client is closed

 o SEND_ERROR
 public static final int SEND_ERROR
State in which a error is sended to the client

 o WAIT_VMF_LIST
 public static final int WAIT_VMF_LIST
During this state the current thread freeze, until the resume signal is send together with a list of certificate blocks.

 o WAIT_DCF_LIST
 public static final int WAIT_DCF_LIST
During this state the current thread freeze, until the resume signal is send together with a list of new/updated certificate blocks identifier, which is built, consulting the local DCF

 o WAIT_FOR_DCF_UPDATE
 public static final int WAIT_FOR_DCF_UPDATE
During this state the current thread freeze, until the resume signal is send

 o WAIT_TO_DIE
 public static final int WAIT_TO_DIE
During this state the current thread freeze, until the resume signal is send. After that, the current thread stopps his execution

 o WAIT_FOR_DES_NEGO
 public static final int WAIT_FOR_DES_NEGO
During this state the current thread freeze, until a symmetric key has been established between client and the current server thread

 o WAIT_FOR_DES_ENCRYPT
 public static final int WAIT_FOR_DES_ENCRYPT
During this state the current thread freeze, until a requested file has been encrypted

 o WAIT_FOR_EXTRACT_FILE_LIST
 public static final int WAIT_FOR_EXTRACT_FILE_LIST
During this state the current thread freeze, until files are extracted from the negotiated certificate block list

Constructors

 o DcfServerProtocol
 public DcfServerProtocol(Socket listensock)
DcfServerProtocol object constuctor

Parameters:
listensock - a socket object created by a client request

Methods

 o getAddress
 public String getAddress()
Retieves the peer address of the client

Returns:
value client's peer address
 o getOut
 public ObjectOutputStream getOut()
Method that return the output stream of the current connection

Returns:
value the output stream of the current connection
 o getIn
 public ObjectInputStream getIn()
Method that return the input stream of the current connection

Returns:
value the input stream of the current connection
 o getId
 public String getId()
Retieves the identifier of the connected client

Returns:
value client's identifier
 o getCommObject
 public Object getCommObject()
Called from the DownloadServer module in order to retrieve/process status information of the suspended DcfServerProtocol thread

Returns:
value the status information
 o getState
 public int getState()
Returns the current execution state

Returns:
value the state identifier
 o Notify
 public synchronized void Notify(int nextstate,
                                 Object sendObj)
Wakes up the suspended DcfServerProtocol thread with a new state and data that should be used during the next state

Parameters:
nextstate - the new state
sendObj - the necessary data structure for the new state
 o run
 public void run()
Main method that implements server's download protocol

Overrides:
run in class Thread

All Packages  Class Hierarchy  This Package  Previous  Next  Index