org.starhope.appius.test
Class UserLoadTest

java.lang.Object
  extended by java.lang.Thread
      extended by org.starhope.appius.net.NetIOThread
          extended by org.starhope.appius.net.ServerThread
              extended by org.starhope.appius.test.UserLoadTest
All Implemented Interfaces:
Comparable<Thread>, Runnable, Thread.UncaughtExceptionHandler, NetIOHandlerPeer, ServerProcessor, AcceptsMetronomeTicks, HasName, CanProcessCommands

public class UserLoadTest
extends ServerThread

WRITEME: The documentation for this type (UserLoadTest) is incomplete. (brpocock@star-hope.org, Mar 15, 2010)

Author:
brpocock@star-hope.org

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  int serial
          WRITEME: document this field (brpocock@star-hope.org, Mar 15, 2010) serial (UserLoadTest)
 
Fields inherited from class org.starhope.appius.net.ServerThread
busyState, futureDatagrams, idleWarned, keepRunning, lastInputTime, loggedIn, maxInputSize, myUser, preloginCountdown, randomKey, streamProtocolLanguage, tLastNudge, zone
 
Fields inherited from class org.starhope.appius.net.NetIOThread
debug, dialect, in, isDone, language, letsPlayWithFlash, out, socket, state
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
  UserLoadTest()
          WRITEME
private UserLoadTest(int n, Zone z)
          WRITEME
 
Method Summary
protected  void checkInputStream()
          This is an overriding method.
protected  void dropSocketConnection()
          This is an overriding method.
protected  String grabInput()
          This is an overriding method.
protected  void postLogIn(Zone z, String password, AbstractUser user)
          This is an overriding method.
 void run()
          This is an overriding method.
protected  void sendLoginPacket(String zoneName, String nick, String password)
          This is an overriding method.
protected  void sendRawMessageLater(String reply)
          This is an overriding method.
protected  void sendRawMessageNow(String reply)
          This is an overriding method.
private  void spawnChildren()
          WRITEME: document this method (brpocock@star-hope.org, Mar 15, 2010)
 
Methods inherited from class org.starhope.appius.net.ServerThread
adopt, areYouThere, close, commandJSON, disconnectDuplicate, doNudge, doProcessing, doRealClose, end, enterZone, enterZone, equals, failLogin, finalize, genRandomKey, getApple, getIpAddress, getIPAddress, getLanguage, getRandomKey, getRandomKey, getSFSVersion, getStreamProtocolLanguage, getStreamsReady, getUser, getZone, hashCode, isLoggedIn, kickDuplicates, kickDuplicates, logIn_checkPassword, logIn_checkUserAllowed, logIn_loadTest_autoCreateFakeUser, logIn, logout, migrate, processInput_Infinity, processInput_SmartFoxServer, processJSONInput, processJSONPreLogin, processPreLogin, processXMLInput, sendAdminDisconnect, sendAdminMessage, sendAdminMessage, sendBadPassword, sendDeferredDatagrams, sendErrorReply, sendFutureDatagrams, sendGameActionMessage, sendLogKO, sendLogKO, sendNextFutureDatagram, sendNoSuchUser, sendPrivateMessage, sendPublicMessage, sendRawMessage, sendResponse, sendResponse, sendResponse, sendResponse, sendResponse, sendResponseRemote, sendRoomEnteredByUser, sendRoomList, sendRoomList, sendRoomPartedBy, sendRoomUserCount, sendRoomVar, sendSuccessReply, sendUserJoin, sendUserPart, sendUserVariable, setBusyState, setLanguage, setLastInputTime, setLoggedIn, setParallelMode, setSFSVersion, setup, sha1hexify, tattlePrefix, tick_checkIdleKick, tick_checkIdleWarnTime, tick, toInfinityAndBeyond, toString, uncaughtException, userDebug
 
Methods inherited from class org.starhope.appius.net.NetIOThread
compareTo, dropSocket_socketCore, equals, getLanguage_dialect, getRemoteAddress, getSocket, getVerboseBugReplies, isDebug, isParallelMode, processInput, sendError_RAW, setDebug, setLanguage, setVerboseBugReplies, superVerbose, tattle, tattle
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, 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, yield
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.starhope.appius.net.ServerProcessor
start
 
Methods inherited from interface org.starhope.appius.util.HasName
getName
 
Methods inherited from interface org.starhope.util.types.CanProcessCommands
getName
 

Field Detail

serial

private final int serial
WRITEME: document this field (brpocock@star-hope.org, Mar 15, 2010) serial (UserLoadTest)

Constructor Detail

UserLoadTest

public UserLoadTest()
WRITEME


UserLoadTest

private UserLoadTest(int n,
                     Zone z)
WRITEME

Parameters:
n - instance number
z - zone
Method Detail

checkInputStream

protected void checkInputStream()
                         throws UserDeadException
This is an overriding method.

Overrides:
checkInputStream in class NetIOThread
Throws:
UserDeadException - if the remote user has disconnected
See Also:
NetIOThread.checkInputStream()

dropSocketConnection

protected void dropSocketConnection()
This is an overriding method.

Overrides:
dropSocketConnection in class NetIOThread
See Also:
NetIOThread.dropSocketConnection()

grabInput

protected String grabInput()
                    throws UserDeadException
This is an overriding method.

Overrides:
grabInput in class ServerThread
Returns:
the input from the client
Throws:
UserDeadException - if the user disconnects
See Also:
ServerThread.grabInput()

postLogIn

protected void postLogIn(Zone z,
                         String password,
                         AbstractUser user)
This is an overriding method.

Overrides:
postLogIn in class ServerThread
Parameters:
z - zone
password - user's (encrypted) password sequence
user - user
See Also:
ServerThread.postLogIn(org.starhope.appius.game.Zone, java.lang.String, org.starhope.appius.user.AbstractUser)

run

public void run()
This is an overriding method.

Specified by:
run in interface Runnable
Overrides:
run in class ServerThread
See Also:
Thread.run()

sendLoginPacket

protected void sendLoginPacket(String zoneName,
                               String nick,
                               String password)
This is an overriding method.

Overrides:
sendLoginPacket in class ServerThread
Parameters:
zoneName - The name of the zone into which the user has logged in
nick - The user's nickname
password - The user's password (SHA1 encoded with the local random key)
See Also:
ServerThread.sendLoginPacket(java.lang.String, java.lang.String, java.lang.String)

sendRawMessageLater

protected void sendRawMessageLater(String reply)
                            throws UserDeadException
This is an overriding method.

Overrides:
sendRawMessageLater in class ServerThread
Parameters:
reply - The message to be sent in future
Throws:
UserDeadException - if the user is already gone
See Also:
ServerThread.sendRawMessageLater(java.lang.String)

sendRawMessageNow

protected void sendRawMessageNow(String reply)
                          throws UserDeadException
This is an overriding method.

Overrides:
sendRawMessageNow in class NetIOThread
Parameters:
reply - The string to be transmitted to this thread's user
Throws:
UserDeadException - if the user has been disconnected
See Also:
NetIOThread.sendRawMessageNow(java.lang.String)

spawnChildren

private void spawnChildren()
WRITEME: document this method (brpocock@star-hope.org, Mar 15, 2010)