Class semper.SemperClient.SCDaemon
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.SemperClient.SCDaemon

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----semper.SemperClient.SCDaemon

public class SCDaemon
extends Thread
implements SCTaskControl
SCDaemon implements a handler for client-server connection requests
Author:
Kostas Tzelepis, Petros Pantis

Variable Index

 o clientsocket

Constructor Index

 o SCDaemon(ServerSocket, SCTimer)
SCDaemon object constructor

Method Index

 o GetFlags()
Retrieves the state flags
 o GetID()
Retrieves the identifier
 o GetObj()
Returns the socket object
 o GetStatus()
Retrieves the current status
 o Handler(Object)
Never called!
 o Notify()
This method is called from the monitor object in order to notify the suspended parser that a new client socket is ready to be parsed
 o run()
This method blocks until a new connection request is arived.
 o SetID(int)
Sets the identifier
 o SetPriority(int)
Change the priority
 o SetStatus()
Sets the default status identifier
 o Stop()
Called from the Monitor object to destroys the SCHTTParser object

Variables

 o clientsocket
  public Socket clientsocket

Constructors

 o SCDaemon
  public SCDaemon(ServerSocket sock,
                  SCTimer mo)
SCDaemon object constructor
Parameters:
sock - the ServerSocket object
mo - the Monitor Timer object

Methods

 o run
  public void run()
This method blocks until a new connection request is arived. After that the socket object will be returned to the SCTimer
Overrides:
run in class Thread
See Also:
WakeUp
 o Notify
  public void Notify()
This method is called from the monitor object in order to notify the suspended parser that a new client socket is ready to be parsed
 o GetFlags
  public int GetFlags()
Retrieves the state flags
Returns:
value the state flags
 o SetPriority
  public void SetPriority(int prio)
Change the priority
Parameters:
prio - the new priority level
 o SetID
  public void SetID(int id)
Sets the identifier
Parameters:
id - the new identifier
 o GetID
  public int GetID()
Retrieves the identifier
Returns:
value the identifier for the current module
 o Stop
  public void Stop()
Called from the Monitor object to destroys the SCHTTParser object
See Also:
Stop
 o Handler
  public void Handler(Object pObj)
Never called!
 o GetStatus
  public int GetStatus()
Retrieves the current status
Returns:
value the status identifier
 o SetStatus
  public void SetStatus()
Sets the default status identifier
 o GetObj
  public Object GetObj()
Returns the socket object
Returns:
value the new socket connection

All Packages  Class Hierarchy  This Package  Previous  Next  Index