QuickServer
v1.4.5

org.quickserver.net.server
Class MaxClientHandler

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.quickserver.net.server.MaxClientHandler
All Implemented Interfaces:
java.lang.Runnable

public class MaxClientHandler
extends java.lang.Thread

Class that handles excess clients of QuickServer.

This class is used by QuickServer to create a new thread for each new client connected after maximum client connection has reached. This class is responsible to handle excess client sockets. Will log client ip if Logging level is FINEST.

Since:
1.1
Author:
Akshathkumar Shetty

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MaxClientHandler(java.net.Socket client, java.lang.String message)
          Deprecated. use MaxClientHandler(Socket, String, QuickServer)
MaxClientHandler(java.net.Socket client, java.lang.String message, QuickServer quickServer)
          Created new MaxClientHandler thread that handles that client.
 
Method Summary
 java.net.Socket getSocket()
          Returns client socket associated.
 void run()
           
 void setSocket(java.net.Socket socket)
          Sets client socket associated.
 java.lang.String toString()
          Returns the Clients InetAddress if socket not null else will return null
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MaxClientHandler

public MaxClientHandler(java.net.Socket client,
                        java.lang.String message)
Deprecated. use MaxClientHandler(Socket, String, QuickServer)

Created new MaxClientHandler thread that handles that client. It sends the given message and closes the connection.

Parameters:
client - socket to handle
message - reason to be sent to client

MaxClientHandler

public MaxClientHandler(java.net.Socket client,
                        java.lang.String message,
                        QuickServer quickServer)
Created new MaxClientHandler thread that handles that client. It sends the given message and closes the connection.

Parameters:
client - socket to handle
message - reason to be sent to client
quickServer - parent QuickServer
Method Detail

run

public void run()

toString

public java.lang.String toString()
Returns the Clients InetAddress if socket not null else will return null


setSocket

public void setSocket(java.net.Socket socket)
Sets client socket associated.


getSocket

public java.net.Socket getSocket()
Returns client socket associated.


QuickServer
v1.4.5

Copyright © 2003-2005 QuickServer.org