lexx.server
Interface ClientBase

All Known Implementing Classes:
Client, ClientHttp

public interface ClientBase

Inteferace which all clients but follow irrespective of what protocol is used

Copyright (c) 2002-2003

Since:
25/02/2003
Version:
1.0
Author:
Mohammed Imran

Method Summary
 int getClientNum()
          Tells you the number of clients that are on-line
 javax.swing.JPanel getPanel()
          The GUI for instant messaging.
 void releaseFile(java.lang.String filename)
          Unlocks the file when you have finished with it, so other clients can use it
 boolean requestFile(java.lang.String filename)
          Requset of file for editing
 void sendFile(java.io.File f)
          Sends the file to the server
 void setStatus(javax.swing.JLabel l)
          Used if you would like to log when the client performs a task
 void updateMyFiles()
          Downloads all the changed files from the server
 void updateServer()
          Uploads all the changed files to the server
 void waitUtilCached()
          This is called when you call the updataMyFiles() method, as it waits until all the files have been successfully updated
 

Method Detail

setStatus

public void setStatus(javax.swing.JLabel l)
Used if you would like to log when the client performs a task

Parameters:
l - where the text will be logged

getPanel

public javax.swing.JPanel getPanel()
The GUI for instant messaging. It should contain inside it all the interactions required for chatting on-line.

Returns:
panel for instant messaging

getClientNum

public int getClientNum()
Tells you the number of clients that are on-line

Returns:
numner of clients that are on-line

updateMyFiles

public void updateMyFiles()
Downloads all the changed files from the server


updateServer

public void updateServer()
Uploads all the changed files to the server


releaseFile

public void releaseFile(java.lang.String filename)
Unlocks the file when you have finished with it, so other clients can use it

Parameters:
filename - name of the file you have just unlocked

requestFile

public boolean requestFile(java.lang.String filename)
Requset of file for editing

Parameters:
filename - the name of the file you wish to edit
Returns:
tells you if someone else has locked the file

sendFile

public void sendFile(java.io.File f)
Sends the file to the server

Parameters:
f - the file you wish to send

waitUtilCached

public void waitUtilCached()
This is called when you call the updataMyFiles() method, as it waits until all the files have been successfully updated