|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread com.fuse.net.FUSEClientConnection
public class FUSEClientConnection
Handles the data connection between client and fuseserver for an user. NOTE: From FUSE Light lots of functionality of this class has been removed and moved to com.fuse.projects.fuse_light.net.FUSELightConnection
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected Access |
accessLogEntry
|
protected java.net.Socket |
client
|
protected java.lang.String |
clientIp
|
protected boolean |
dead
|
protected long |
dieTime
|
protected FUSEConnectionManager |
fcm
|
protected boolean |
gotOk
|
protected int |
id
|
protected java.io.DataInputStream |
in
|
protected long |
lastMessage
|
protected java.lang.String |
myKey
|
protected static int |
n
|
protected java.io.PrintWriter |
out
|
protected FUSEUser |
user
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
FUSEClientConnection(FUSEConnectionManager fcm)
|
Method Summary | |
---|---|
protected void |
generateError(int errorCode,
java.lang.String message)
|
protected void |
generateOk()
|
java.lang.String |
getClientIp()
Returns the ip of this connection as String |
int |
getId()
|
protected long |
getLastConnectionTime()
Called by connectionManager to check whether the connection should be timeouted |
FUSEUser |
getUser()
Returns the user of this connectino |
java.lang.String |
getUserInfoString()
Construct fuse-protocol representation of the user to send to the client |
void |
handleClientMessage(java.lang.String msg)
|
void |
processFuseMessage(java.lang.String type,
java.lang.String data)
Processes and sends a fuse message to the client: # @type \r data\r## |
protected boolean |
projectSpecificCommand(java.lang.String command,
java.lang.String msg)
Override this if you want to handle some different "non-action" messages in your project. |
void |
release()
Kills this connection (throws user out) |
protected void |
releaseConnection()
|
void |
run()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int id
protected java.net.Socket client
protected java.lang.String myKey
protected boolean dead
protected Access accessLogEntry
protected java.io.DataInputStream in
protected java.io.PrintWriter out
protected FUSEConnectionManager fcm
protected long lastMessage
protected long dieTime
protected FUSEUser user
protected java.lang.String clientIp
protected boolean gotOk
protected static int n
Constructor Detail |
---|
public FUSEClientConnection(FUSEConnectionManager fcm)
Method Detail |
---|
public int getId()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected long getLastConnectionTime()
public java.lang.String getClientIp()
public void release()
protected void releaseConnection()
public void processFuseMessage(java.lang.String type, java.lang.String data)
public void handleClientMessage(java.lang.String msg)
protected boolean projectSpecificCommand(java.lang.String command, java.lang.String msg) throws java.lang.Exception
java.lang.Exception
public FUSEUser getUser()
public java.lang.String getUserInfoString()
protected void generateOk()
protected void generateError(int errorCode, java.lang.String message)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |