lexx.server.http
Class ServerHttp

java.lang.Object
  |
  +--lexx.server.http.ServerHttp
All Implemented Interfaces:
java.util.EventListener, HttpServerListener, ServerBase

public final class ServerHttp
extends java.lang.Object
implements HttpServerListener, ServerBase

Server uses the HTTP protocol to communicate<

Due to the limitations of HTTP protocol the client will need to connect to server continously to enable full duplex communication

Copyright (c) 2002-2003

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

Constructor Summary
ServerHttp(int port, int pool, java.lang.String projectDirectory)
           
 
Method Summary
 int getClientNum()
          Tells you the number of clients that are on-line
 javax.swing.JTextArea getLog()
          If log is enables then the text being recieved/sent by server it stored
static void main(java.lang.String[] argv)
          Usage: ServerHttp
ServerHttp
 void service(java.io.InputStream data, java.io.OutputStream out)
          Method invoked when a message is received by the HttpServer
 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
 

Constructor Detail

ServerHttp

public ServerHttp(int port,
                  int pool,
                  java.lang.String projectDirectory)
           throws java.lang.Exception
Method Detail

service

public final void service(java.io.InputStream data,
                          java.io.OutputStream out)
Description copied from interface: HttpServerListener
Method invoked when a message is received by the HttpServer

Specified by:
service in interface HttpServerListener
Parameters:
data - Message data
out - Stream to write response too
Returns:
void

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

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Usage: ServerHttp
ServerHttp

java.lang.Exception

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

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