org.starhope.appius.net
Class BatchProcessor
java.lang.Object
java.lang.Thread
org.starhope.appius.net.NetIOThread
org.starhope.appius.net.ServerThread
org.starhope.appius.net.BatchProcessor
- All Implemented Interfaces:
- Comparable<Thread>, Runnable, Thread.UncaughtExceptionHandler, NetIOHandlerPeer, ServerProcessor, AcceptsMetronomeTicks, HasName, CanProcessCommands
public class BatchProcessor
- extends ServerThread
Process JSON interactions in bulk
- Author:
- brpocock@star-hope.org
Fields inherited from class org.starhope.appius.net.ServerThread |
busyState, futureDatagrams, idleWarned, keepRunning, lastInputTime, loggedIn, maxInputSize, myUser, preloginCountdown, randomKey, streamProtocolLanguage, tLastNudge, zone |
Constructor Summary |
BatchProcessor(Socket newSocket)
WRITEME: Document this constructor brpocock@star-hope.org |
Method Summary |
org.json.JSONObject |
getBatchReplies()
WRITEME: Document this method brpocock@star-hope.org |
String |
getSessionApple(User user)
WRITEME: Document this method brpocock@star-hope.org |
String |
initSession()
WRITEME: Document this method brpocock@star-hope.org |
boolean |
isBatchAuth(String auth,
String userName,
org.json.JSONObject d)
WRITEME: Document this method brpocock@star-hope.org |
protected boolean |
logIn_checkPassword(User user,
String password,
Zone z)
Check whether the supplied password (encrypted in SHA-1) is
correct. |
protected String |
tattlePrefix()
WRITEME: Document this method brpocock@star-hope.org |
String |
toString()
This returns a plethora of debugging-useful information about
this particular server thread. |
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, grabInput, hashCode, isLoggedIn, kickDuplicates, kickDuplicates, logIn_checkUserAllowed, logIn_loadTest_autoCreateFakeUser, logIn, logout, migrate, postLogIn, processInput_Infinity, processInput_SmartFoxServer, processJSONInput, processJSONPreLogin, processPreLogin, processXMLInput, run, sendAdminDisconnect, sendAdminMessage, sendAdminMessage, sendBadPassword, sendDeferredDatagrams, sendErrorReply, sendFutureDatagrams, sendGameActionMessage, sendLoginPacket, sendLogKO, sendLogKO, sendNextFutureDatagram, sendNoSuchUser, sendPrivateMessage, sendPublicMessage, sendRawMessage, sendRawMessageLater, sendResponse, sendResponse, sendResponse, sendResponse, sendResponse, sendResponseRemote, sendRoomEnteredByUser, sendRoomList, sendRoomList, sendRoomPartedBy, sendRoomUserCount, sendRoomVar, sendSuccessReply, sendUserJoin, sendUserPart, sendUserVariable, setBusyState, setLanguage, setLastInputTime, setLoggedIn, setParallelMode, setSFSVersion, setup, sha1hexify, tick_checkIdleKick, tick_checkIdleWarnTime, tick, toInfinityAndBeyond, uncaughtException, userDebug |
Methods inherited from class org.starhope.appius.net.NetIOThread |
checkInputStream, compareTo, dropSocket_socketCore, dropSocketConnection, equals, getLanguage_dialect, getRemoteAddress, getSocket, getVerboseBugReplies, isDebug, isParallelMode, processInput, sendError_RAW, sendRawMessageNow, 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 interface org.starhope.appius.util.HasName |
getName |
BatchProcessor
public BatchProcessor(Socket newSocket)
- WRITEME: Document this constructor brpocock@star-hope.org
- Parameters:
newSocket
- WRITEME
getBatchReplies
public org.json.JSONObject getBatchReplies()
- WRITEME: Document this method brpocock@star-hope.org
- Returns:
- WRITEME
getSessionApple
public String getSessionApple(User user)
- WRITEME: Document this method brpocock@star-hope.org
- Parameters:
user
- WRITEME
- Returns:
- WRITEME
initSession
public String initSession()
- WRITEME: Document this method brpocock@star-hope.org
- Returns:
- session key string
isBatchAuth
public boolean isBatchAuth(String auth,
String userName,
org.json.JSONObject d)
- WRITEME: Document this method brpocock@star-hope.org
- Parameters:
auth
- WRITEMEuserName
- WRITEMEd
- WRITEME
- Returns:
- true, if the batch is authenticated
logIn_checkPassword
protected boolean logIn_checkPassword(User user,
String password,
Zone z)
- Description copied from class:
ServerThread
- Check whether the supplied password (encrypted in SHA-1) is
correct. If it's incorrect, send a norification to that effect.
- Overrides:
logIn_checkPassword
in class ServerThread
- Parameters:
user
- the user attempting to log inpassword
- the seeded SHA-1 hash of the passwordz
- the zone into which the user is attempting to log in
- Returns:
- true, if the password was correct, else false.
- See Also:
ServerThread.logIn_checkPassword(org.starhope.appius.user.User,
java.lang.String, org.starhope.appius.game.Zone)
tattlePrefix
protected String tattlePrefix()
- Description copied from class:
NetIOThread
- WRITEME: Document this method brpocock@star-hope.org
- Overrides:
tattlePrefix
in class ServerThread
- Returns:
- WRITEME
- See Also:
NetIOThread.tattlePrefix()
toString
public String toString()
- This returns a plethora of debugging-useful information about
this particular server thread.
- Overrides:
toString
in class ServerThread
- See Also:
Thread.toString()