com.fuse.projects.fuse_light.net
Class FUSELightConnection

java.lang.Object
  extended by java.lang.Thread
      extended by com.fuse.net.FUSEClientConnection
          extended by com.fuse.projects.fuse_light.net.FUSELightConnection
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ExampleConnection

public class FUSELightConnection
extends FUSEClientConnection

Handles the data connection between client and fuseserver for an user.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  boolean checkedCorrectVersion
           
protected  boolean checkedKeyEncryption
           
protected static java.lang.String FUSECMD_BROADCASTALL
           
protected static java.lang.String FUSECMD_BROADCASTTO
           
protected static java.lang.String FUSECMD_INFORETRIEVE
           
protected static java.lang.String FUSECMD_KEYENCRYPT
           
protected static java.lang.String FUSECMD_LOGIN
           
protected static java.lang.String FUSECMD_REGISTER
           
protected static java.lang.String FUSECMD_STATUSOK
           
protected static java.lang.String FUSECMD_UPDATE
           
protected static java.lang.String FUSECMD_USERKILL
           
protected static java.lang.String FUSECMD_VERSIONCHECK
           
protected static int n
           
 
Fields inherited from class com.fuse.net.FUSEClientConnection
accessLogEntry, client, clientIp, dead, dieTime, fcm, gotOk, id, in, lastMessage, myKey, out, user
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FUSELightConnection(FUSEConnectionManager fcm)
           
 
Method Summary
 void handleClientMessage(java.lang.String msg)
          Processes messages from the client
protected  boolean projectSpecificCommand(java.lang.String command, java.lang.String msg)
          Override this if you want to handle some special messages in your project.
protected  void writeLog(FUSEUser user, java.net.Socket clientSocket, FUSELightConnection conn)
           
 
Methods inherited from class com.fuse.net.FUSEClientConnection
generateError, generateOk, getClientIp, getId, getLastConnectionTime, getUser, getUserInfoString, processFuseMessage, release, releaseConnection, 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

FUSECMD_LOGIN

protected static final java.lang.String FUSECMD_LOGIN
See Also:
Constant Field Values

FUSECMD_REGISTER

protected static final java.lang.String FUSECMD_REGISTER
See Also:
Constant Field Values

FUSECMD_UPDATE

protected static final java.lang.String FUSECMD_UPDATE
See Also:
Constant Field Values

FUSECMD_INFORETRIEVE

protected static final java.lang.String FUSECMD_INFORETRIEVE
See Also:
Constant Field Values

FUSECMD_STATUSOK

protected static final java.lang.String FUSECMD_STATUSOK
See Also:
Constant Field Values

FUSECMD_VERSIONCHECK

protected static final java.lang.String FUSECMD_VERSIONCHECK
See Also:
Constant Field Values

FUSECMD_KEYENCRYPT

protected static final java.lang.String FUSECMD_KEYENCRYPT
See Also:
Constant Field Values

checkedCorrectVersion

protected boolean checkedCorrectVersion

checkedKeyEncryption

protected boolean checkedKeyEncryption

FUSECMD_BROADCASTALL

protected static final java.lang.String FUSECMD_BROADCASTALL
See Also:
Constant Field Values

FUSECMD_BROADCASTTO

protected static final java.lang.String FUSECMD_BROADCASTTO
See Also:
Constant Field Values

FUSECMD_USERKILL

protected static final java.lang.String FUSECMD_USERKILL
See Also:
Constant Field Values

n

protected static int n
Constructor Detail

FUSELightConnection

public FUSELightConnection(FUSEConnectionManager fcm)
Method Detail

handleClientMessage

public void handleClientMessage(java.lang.String msg)
Processes messages from the client

Overrides:
handleClientMessage in class FUSEClientConnection

projectSpecificCommand

protected boolean projectSpecificCommand(java.lang.String command,
                                         java.lang.String msg)
                                  throws java.lang.Exception
Override this if you want to handle some special messages in your project. Return true if you did handle the message, false otherwise

Overrides:
projectSpecificCommand in class FUSEClientConnection
Throws:
java.lang.Exception

writeLog

protected void writeLog(FUSEUser user,
                        java.net.Socket clientSocket,
                        FUSELightConnection conn)