QuickServer
v1.4.1

org.quickserver.net.server
Class TheClient

java.lang.Object
  |
  +--org.quickserver.net.server.TheClient

public class TheClient
extends java.lang.Object

Encapsulates client socket and its configuration details. Used by QuickServer and ClientHandler classes.

Author:
Akshathkumar Shetty

Constructor Summary
TheClient()
           
 
Method Summary
 Authenticator getAuthenticator()
          Returns the Authenticator object that handles the authentication of a client.
 ClientBinaryHandler getClientBinaryHandler()
          Returns the ClientBinaryHandler object that interacts with client sockets.
 ClientCommandHandler getClientCommandHandler()
          Returns the ClientCommandHandler object that interacts with client sockets.
 ClientData getClientData()
          Returns the ClientData object that carries client data.
 ClientObjectHandler getClientObjectHandler()
          Returns the ClientObjectHandler object that interacts with client sockets.
 boolean getCommunicationLogging()
          Returns the communication logging flag.
 int getMaxAuthTry()
          Returns maximum allowed login attempts.
 java.lang.String getMaxAuthTryMsg()
          Returns message to be displayed to the client when maximum allowed login attempts reaches.
 QuickServer getServer()
          Gets the QuickServer object associated with this Client
 Authenticator getServerAuthenticator()
          Deprecated. use getAuthenticator()
 java.net.Socket getSocket()
          Returns client socket associated.
 java.lang.String getTimeoutMsg()
          Returns timeout message.
 boolean getTrusted()
          Returns flag to skip timeout setting and authentication of this client.
 void setAuthenticator(Authenticator authenticator)
          Sets the Authenticator class that handles the authentication of a client.
 void setClientBinaryHandler(ClientBinaryHandler handler)
          Sets the ClientBinaryHandler object that interacts with client sockets.
 void setClientCommandHandler(ClientCommandHandler handler)
          Sets the ClientCommandHandler objects that interacts with client sockets.
 void setClientData(ClientData data)
          Sets the ClientData object that carries client data.
 void setClientObjectHandler(ClientObjectHandler handler)
          Sets the ClientObjectHandler object that interacts with client sockets.
 void setCommunicationLogging(boolean communicationLogging)
          Sets the communication logging flag.
 void setMaxAuthTry(int authTry)
          Sets maximum allowed login attempts.
 void setMaxAuthTryMsg(java.lang.String msg)
          Sets message to be displayed when max login attempt reaches.
 void setServer(QuickServer server)
          Sets the QuickServer object associated with this Client
 void setServerAuthenticator(Authenticator authenticator)
          Deprecated. use setAuthenticator(org.quickserver.net.server.Authenticator)
 void setSocket(java.net.Socket socket)
          Sets client socket associated.
 void setTimeoutMsg(java.lang.String msg)
          Sets timeout message.
 void setTrusted(boolean flag)
          Sets flag to skip timeout setting and authentication of this client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TheClient

public TheClient()
Method Detail

setServer

public void setServer(QuickServer server)
Sets the QuickServer object associated with this Client

See Also:
getServer()

getServer

public QuickServer getServer()
Gets the QuickServer object associated with this Client

See Also:
getServer()

setSocket

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


getSocket

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


setServerAuthenticator

public void setServerAuthenticator(Authenticator authenticator)
Deprecated. use setAuthenticator(org.quickserver.net.server.Authenticator)

Sets the Authenticator class that handles the authentication of a client.

Parameters:
authenticator - object that implements Authenticator.
See Also:
getServerAuthenticator()

getServerAuthenticator

public Authenticator getServerAuthenticator()
Deprecated. use getAuthenticator()

Returns the Authenticator object that handles the authentication of a client.

See Also:
setServerAuthenticator(org.quickserver.net.server.Authenticator)

setAuthenticator

public void setAuthenticator(Authenticator authenticator)
Sets the Authenticator class that handles the authentication of a client.

Parameters:
authenticator - object that implements Authenticator.
Since:
1.3
See Also:
getAuthenticator()

getAuthenticator

public Authenticator getAuthenticator()
Returns the Authenticator object that handles the authentication of a client.

Since:
1.3
See Also:
setAuthenticator(org.quickserver.net.server.Authenticator)

setClientData

public void setClientData(ClientData data)
Sets the ClientData object that carries client data.

Parameters:
data - object of the class that extends ClientData.
See Also:
getClientData()

getClientData

public ClientData getClientData()
Returns the ClientData object that carries client data.

Returns:
object of the class that implements ClientData.
See Also:
setClientData(org.quickserver.net.server.ClientData)

setMaxAuthTry

public void setMaxAuthTry(int authTry)
Sets maximum allowed login attempts.

Since:
1.2

getMaxAuthTry

public int getMaxAuthTry()
Returns maximum allowed login attempts.

Since:
1.2

setMaxAuthTryMsg

public void setMaxAuthTryMsg(java.lang.String msg)
Sets message to be displayed when max login attempt reaches.


getMaxAuthTryMsg

public java.lang.String getMaxAuthTryMsg()
Returns message to be displayed to the client when maximum allowed login attempts reaches.


setTimeoutMsg

public void setTimeoutMsg(java.lang.String msg)
Sets timeout message.


getTimeoutMsg

public java.lang.String getTimeoutMsg()
Returns timeout message.


setClientCommandHandler

public void setClientCommandHandler(ClientCommandHandler handler)
Sets the ClientCommandHandler objects that interacts with client sockets.

Parameters:
handler - object that implements ClientCommandHandler
See Also:
getClientCommandHandler()

getClientCommandHandler

public ClientCommandHandler getClientCommandHandler()
Returns the ClientCommandHandler object that interacts with client sockets.

See Also:
setClientCommandHandler(org.quickserver.net.server.ClientCommandHandler)

setClientObjectHandler

public void setClientObjectHandler(ClientObjectHandler handler)
Sets the ClientObjectHandler object that interacts with client sockets.

Parameters:
handler - object that implements ClientObjectHandler
Since:
1.2
See Also:
getClientObjectHandler()

getClientObjectHandler

public ClientObjectHandler getClientObjectHandler()
Returns the ClientObjectHandler object that interacts with client sockets.

Since:
1.2
See Also:
setClientObjectHandler(org.quickserver.net.server.ClientObjectHandler)

getTrusted

public boolean getTrusted()
Returns flag to skip timeout setting and authentication of this client.

Since:
1.3.2

setTrusted

public void setTrusted(boolean flag)
Sets flag to skip timeout setting and authentication of this client.

Since:
1.3.2

setCommunicationLogging

public void setCommunicationLogging(boolean communicationLogging)
Sets the communication logging flag.

Since:
1.3.2
See Also:
getCommunicationLogging()

getCommunicationLogging

public boolean getCommunicationLogging()
Returns the communication logging flag.

Since:
1.3.2
See Also:
setCommunicationLogging(boolean)

setClientBinaryHandler

public void setClientBinaryHandler(ClientBinaryHandler handler)
Sets the ClientBinaryHandler object that interacts with client sockets.

Parameters:
handler - object that implements ClientBinaryHandler
Since:
1.4
See Also:
getClientBinaryHandler()

getClientBinaryHandler

public ClientBinaryHandler getClientBinaryHandler()
Returns the ClientBinaryHandler object that interacts with client sockets.

Since:
1.4
See Also:
setClientBinaryHandler(org.quickserver.net.server.ClientBinaryHandler)

QuickServer
v1.4.1

Copyright © 2003-2004 QuickServer.org