lexx.server.socket
Class Server

java.lang.Object
  |
  +--lexx.server.socket.Server
All Implemented Interfaces:
ServerBase

public final class Server
extends java.lang.Object
implements ServerBase

Server uses direct communication via a socket

Copyright (c) 2002-2003

Since:
20/03/2003
Version:
1.0
Author:
Mohammed Imran

Field Summary
static java.lang.String BOOLEAN
           
static java.lang.String CLIENT_NUM
           
(package private)  java.util.Vector clients
           
static java.lang.String END_OF_FILES
           
static java.lang.String FILEDATA
           
static java.lang.String FILENAME
           
static java.lang.String HASHKEY
           
static java.lang.String HASHPROPERTIES
           
(package private) static javax.swing.JTextArea log
           
static java.lang.String MESSAGE
           
(package private)  java.lang.String projectDir
           
static java.lang.String REQUESTFILE
           
static java.lang.String SENDMEFILE
           
static java.lang.String SENDMEHASH
           
static java.lang.String USERNAME
           
 
Constructor Summary
Server(java.lang.String projectPath, int portNum)
           
 
Method Summary
 int getClientNum()
          Tells you the number of clients that are on-line
(package private)  java.util.Vector getClients()
           
(package private)  java.util.Vector getFiles()
          the files that have been locked
 javax.swing.JTextArea getLog()
          If log is enables then the text being recieved/sent by server it stored
static void main(java.lang.String[] args)
          Usage
-----
lexx.server.socket.Server [directory containing project] [port] [proxy address] [proxy port]
lexx.server.socket.Server [directory containing project] [port]
lexx.server.socket.Server [directory containing project]
(package private)  void removeFromClients(java.io.DataOutputStream remoteOut)
           
 void setLog(javax.swing.JTextArea newLog)
          Server logs all messages that are recieved/sent by server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERNAME

public static final java.lang.String USERNAME
See Also:
Constant Field Values

MESSAGE

public static final java.lang.String MESSAGE
See Also:
Constant Field Values

FILEDATA

public static final java.lang.String FILEDATA
See Also:
Constant Field Values

HASHKEY

public static final java.lang.String HASHKEY
See Also:
Constant Field Values

FILENAME

public static final java.lang.String FILENAME
See Also:
Constant Field Values

REQUESTFILE

public static final java.lang.String REQUESTFILE
See Also:
Constant Field Values

BOOLEAN

public static final java.lang.String BOOLEAN
See Also:
Constant Field Values

HASHPROPERTIES

public static final java.lang.String HASHPROPERTIES
See Also:
Constant Field Values

CLIENT_NUM

public static final java.lang.String CLIENT_NUM
See Also:
Constant Field Values

SENDMEFILE

public static final java.lang.String SENDMEFILE
See Also:
Constant Field Values

SENDMEHASH

public static final java.lang.String SENDMEHASH
See Also:
Constant Field Values

END_OF_FILES

public static final java.lang.String END_OF_FILES
See Also:
Constant Field Values

clients

final java.util.Vector clients

projectDir

final java.lang.String projectDir

log

static javax.swing.JTextArea log
Constructor Detail

Server

public Server(java.lang.String projectPath,
              int portNum)
Method Detail

main

public static void main(java.lang.String[] args)
Usage
-----
lexx.server.socket.Server [directory containing project] [port] [proxy address] [proxy port]
lexx.server.socket.Server [directory containing project] [port]
lexx.server.socket.Server [directory containing project]


getClientNum

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

Specified by:
getClientNum in interface ServerBase
Returns:
Tells you the number of clients that are on-line

getLog

public final javax.swing.JTextArea getLog()
If log is enables then the text being recieved/sent by server it stored

Specified by:
getLog in interface ServerBase
Returns:
returns log

setLog

public final void setLog(javax.swing.JTextArea newLog)
Server logs all messages that are recieved/sent by server

Specified by:
setLog in interface ServerBase
Parameters:
newLog - sets the new log

getClients

final java.util.Vector getClients()

removeFromClients

final void removeFromClients(java.io.DataOutputStream remoteOut)

getFiles

final java.util.Vector getFiles()
the files that have been locked

Returns:
the files that have been locked