Class NetAcctServer.NetAcctServerSession
java.lang.Object
java.lang.Thread
NetAcctServer.NetAcctServerSession
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- NetAcctServer
- class NetAcctServer.NetAcctServerSession
- extends Thread
Handles processing and IO for individual client sessions.
- Author:
- Michael J. Douglas
|
Method Summary |
private String |
boolVal(boolean val)
A simple method to convert a String "true" to a boolean 'true'. |
void |
run()
Process input from the client. |
private boolean |
strToBool(String val)
Complements boolVal( boolean ). |
| 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, toString, yield |
socket
Socket socket
mgr
AcctMgrSpec mgr
log
DrinkLoggerSpec log
NetAcctServer.NetAcctServerSession
public NetAcctServer.NetAcctServerSession(Socket s,
AcctMgrSpec m,
DrinkLoggerSpec l)
- Constructs the session.
Basically, just save the variables.
- Parameters:
s - The socket to talk to the client through.m - The AcctMgrSpec to use for peforming account management through.l - The DrinkLoggerSpec to write log messages to.
run
public void run()
- Process input from the client.
Set up the connection, check to make sure the host is in the ACL, then
grab their input and process it.
boolVal
private String boolVal(boolean val)
- A simple method to convert a String "true" to a boolean 'true'.
- Parameters:
val - The boolean to convert to a string.
strToBool
private boolean strToBool(String val)
- Complements boolVal( boolean ).
boolVal( strToBowl( x ) ).equals(x) == true
- Parameters:
val - The String value to convert to a boolean primitive.