Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ServerConnectionThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ServerConnectionThread

public class ServerConnectionThread
extends java.lang.Thread
The ServerConnectionThread takes care for the connection with the (applet/application) client. It send client request for the server and return its answer. The connection is performed using sockets.d We chose the 2030 port number as our default number.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ServerConnectionThread(Server server)
          Intialize the sever with the default socket (2030).
ServerConnectionThread(Server server, int socket)
           
 
Method Summary
void acquire(java.lang.String url, java.lang.String engineName)
          Receives an acquire request from the client and sends it to the server.
void closeSession()
          Ends the session
void doneAcquired(boolean succeed)
          Returnes the acquire result of acquiring new angine.
void getRequest()
          Receives the client request and returns the server respone.
void initConnection()
           
void initServer(int socketNumber)
          Inits the server with the correct socketNumber.
void initSession()
          Open a client session requist
static void main(java.lang.String[] args)
          Test run this with no Server
void openSession()
           
void parse(java.lang.String url, java.lang.String engineName)
          Receive client request to parse a new engine and submit it to the server
void replyResult(Message message)
           
void reportSearch(boolean succeed, java.lang.String urlName)
          Receives a search result and return it to the client.
void run()
           
void search(java.util.Vector searchQuery)
          Receives a search requist from the client and sends it to the server.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupted, interrupt, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

ServerConnectionThread

public ServerConnectionThread(Server server)
Intialize the sever with the default socket (2030).

ServerConnectionThread

public ServerConnectionThread(Server server,
                              int socket)
Method Detail

main

public static void main(java.lang.String[] args)
Test run this with no Server

run

public void run()
Overrides:
run in class java.lang.Thread

initServer

public void initServer(int socketNumber)
Inits the server with the correct socketNumber.

openSession

public void openSession()

initSession

public void initSession()
Open a client session requist

initConnection

public void initConnection()

getRequest

public void getRequest()
Receives the client request and returns the server respone.

replyResult

public void replyResult(Message message)

closeSession

public void closeSession()
Ends the session

acquire

public void acquire(java.lang.String url,
                    java.lang.String engineName)
Receives an acquire request from the client and sends it to the server.

search

public void search(java.util.Vector searchQuery)
Receives a search requist from the client and sends it to the server.

doneAcquired

public void doneAcquired(boolean succeed)
Returnes the acquire result of acquiring new angine.

reportSearch

public void reportSearch(boolean succeed,
                         java.lang.String urlName)
Receives a search result and return it to the client.

parse

public void parse(java.lang.String url,
                  java.lang.String engineName)
Receive client request to parse a new engine and submit it to the server

Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD