com.fuse.projects.fuse_light.examples
Class ExampleConnection

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

public class ExampleConnection
extends FUSELightConnection

Example how to extend FUSELightConnection to add own functionality. To use this class, you have to set in properties-file property "connection.class=com.fuse.projects.fuse_light.examples.ExampleConnection" This connection makes a sql-query to the database. Client can send any SQL-query by sending command "QUERYSQL select xx,xx .... FROM ..."

See Also:
com.fuse.project.fuse_light.net.FUSELightConnectionFactory

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected static java.lang.String FUSECMD_QUERYSQL
           
 
Fields inherited from class com.fuse.projects.fuse_light.net.FUSELightConnection
checkedCorrectVersion, checkedKeyEncryption, FUSECMD_BROADCASTALL, FUSECMD_BROADCASTTO, FUSECMD_INFORETRIEVE, FUSECMD_KEYENCRYPT, FUSECMD_LOGIN, FUSECMD_REGISTER, FUSECMD_STATUSOK, FUSECMD_UPDATE, FUSECMD_USERKILL, FUSECMD_VERSIONCHECK, 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
ExampleConnection(FUSEConnectionManager fcm)
          Constructor : only calls super(fcm)
 
Method Summary
protected  boolean projectSpecificCommand(java.lang.String command, java.lang.String msg)
          Override this if you want to handle some special messages in your project.
 
Methods inherited from class com.fuse.projects.fuse_light.net.FUSELightConnection
handleClientMessage, writeLog
 
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_QUERYSQL

protected static final java.lang.String FUSECMD_QUERYSQL
See Also:
Constant Field Values
Constructor Detail

ExampleConnection

public ExampleConnection(FUSEConnectionManager fcm)
Constructor : only calls super(fcm)

Method Detail

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 FUSELightConnection
Throws:
java.lang.Exception