|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.planet_ink.coffee_mud.Common.DefaultSession
public class DefaultSession
| Nested Class Summary | |
|---|---|
static class |
DefaultSession.LoginLogoutThread
|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected PlayerAccount |
acct
|
protected boolean |
afkFlag
|
protected java.lang.String |
afkMessage
|
protected boolean |
bNextByteIs255
|
protected boolean[] |
clientTelnetCodes
|
protected java.lang.String[] |
clookup
|
protected boolean |
connectionComplete
|
protected java.lang.StringBuffer |
curPrevMsg
|
protected int |
currentColor
|
protected java.lang.StringBuffer |
fakeInput
|
protected java.io.BufferedReader |
in
|
protected java.lang.StringBuffer |
input
|
protected boolean |
killFlag
|
protected long |
lastBlahCheck
|
protected int |
lastColor
|
protected java.lang.String |
lastColorStr
|
protected long |
lastKeystroke
|
protected long |
lastLoopTop
|
protected long |
lastNPCFight
|
protected long |
lastPKFight
|
protected long |
lastStart
|
protected long |
lastStop
|
protected java.lang.String |
lastStr
|
protected boolean |
lastWasCR
|
protected boolean |
lastWasLF
|
protected long |
milliTotal
|
protected MOB |
mob
|
protected boolean |
needPrompt
|
protected long |
onlineTime
|
protected java.io.PrintWriter |
out
|
protected java.lang.StringBuffer |
preliminaryInput
|
protected java.util.List<java.lang.String> |
previousCmd
|
protected java.util.List<java.lang.String> |
prevMsgs
|
protected long |
promptLastShown
|
protected java.io.OutputStream |
rawout
|
protected boolean[] |
serverTelnetCodes
|
protected static int |
sessionCounter
|
protected java.util.List |
snoops
|
protected int |
snoopSuspensionStack
|
protected java.net.Socket |
sock
|
protected static int |
SOTIMEOUT
|
protected int |
spamStack
|
protected int |
status
|
protected boolean |
suspendCommandLine
|
protected int |
terminalHeight
|
protected java.lang.String |
terminalType
|
protected int |
terminalWidth
|
protected long |
tickTotal
|
protected long |
userLoginTime
|
protected boolean |
waiting
|
protected java.util.concurrent.locks.ReentrantLock |
writeLock
|
protected long |
writeStartTime
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DefaultSession()
|
|
| Method Summary | |
|---|---|
boolean |
afkFlag()
Returns whether this mob/session is currently Away From Keyboard |
java.lang.String |
afkMessage()
Returns the reason given by the user that they are AFK. |
boolean |
amBeingSnoopedBy(Session S)
Checks to see if the given session is snooping on this one. |
java.lang.String |
blockingIn()
Blocks the current thread until the user attached to this session hits ENTER, returning the characters they enter. |
java.lang.String |
blockingIn(long maxTime)
|
void |
changeTelnetMode(int telnetCode,
boolean onOff)
Change telnet mode by sending the appropriate command to the clients client. |
void |
changeTelnetModeBackwards(int telnetCode,
boolean onOff)
|
void |
changeTelnetModeBackwards(java.io.OutputStream out,
int telnetCode,
boolean onOff)
|
java.lang.String |
choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default)
Prompts the user to enter one character responses from a set of valid choices. |
java.lang.String |
choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default,
long maxTime)
Prompts the user to enter one character responses from a set of valid choices. |
java.lang.String |
choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default,
long maxTime,
java.util.List<java.lang.String> paramsOut)
Prompts the user to enter one character responses from a set of valid choices. |
boolean |
clientTelnetMode(int telnetCode)
Gets a client telnet mode flag. |
java.lang.String[] |
clookup()
Returns a list of telnet coded strings indexed by coffeemud color code. |
protected void |
closeSocks()
|
void |
colorOnlyPrint(java.lang.String msg)
Lower-Medium-level text output method. |
void |
colorOnlyPrint(java.lang.String msg,
boolean noCache)
Lower-Medium-level text output method. |
void |
colorOnlyPrintln(java.lang.String msg)
Lower-Medium-level text output method. |
void |
colorOnlyPrintln(java.lang.String msg,
boolean noCache)
Lower-Medium-level text output method. |
int |
compareTo(CMObject o)
|
boolean |
confirm(java.lang.String Message,
java.lang.String Default)
Prompts the user to enter Y or N, and returns what they enter. |
boolean |
confirm(java.lang.String Message,
java.lang.String Default,
long maxTime)
Prompts the user to enter Y or N, and returns what they enter. |
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
int |
currentColor()
Returns the current color code. |
protected void |
errorOut(java.lang.Exception t)
|
java.lang.String |
getAddress()
Gets the current telnet clients ip address. |
int |
getColor(char c)
Returns the given color code, unless it is one that translates to another, such as ? |
long |
getIdleMillis()
Gets the number of milliseconds since a user entry was registered by this session |
java.util.List<java.lang.String> |
getLastMsgs()
Returns a Vector of the last several message strings received by this user. |
long |
getLastNPCFight()
Gets the milliseconds timestamp since this user last registered a npc fight. |
long |
getLastPKFight()
Gets the milliseconds timestamp since this user last registered a pk fight. |
long |
getMillisOnline()
Gets the milliseconds elapsed since this user came online. |
int |
getPageBreak()
|
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
java.lang.String |
getStat(java.lang.String code)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
java.lang.String[] |
getStatCodes()
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders. |
int |
getStatus()
Gets the tick/thread status of this session object. |
java.lang.String |
getTerminalType()
Gets the terminal type the user has |
long |
getTotalMillis()
Gets the total milliseconds consumed by this session objects thread. |
long |
getTotalTicks()
Gets the total number of ticks consumed by this session object thread. |
int |
getWrap()
Gets the column number for engine word-wrapping. |
protected long |
getWriteStartTime()
|
void |
handleEscape()
|
void |
handleIAC()
|
void |
handleSubOption(int optionCode,
char[] suboptionData,
int dataSize)
|
char |
hotkey(long maxWait)
Waits the given milliseconds for a key to be pressed, after which it returns that key, or \0 if nothing pressed. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
void |
initializeSession(java.net.Socket s,
java.lang.String introTextStr)
Negotiates various telnet options (or attempts to), and prints the introTextStr to the user. |
void |
initTelnetMode(int mobbitmap)
Initializes a telnet mode between this session and the connected client by negotiating certain fundamental flags, like ANSI, MXP, and MSP. |
boolean |
isFake()
Returns true if this session is merely a placeholder, and does not represent an actual user connection. |
boolean |
isLockedUpWriting()
Checks whether this session is currently over its time limit trying to write data to its socket. |
boolean |
isStat(java.lang.String code)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
void |
kill(boolean removeMOB,
boolean dropSession,
boolean killThread)
Force the current player to logoff. |
boolean |
killFlag()
Returns whether this session is done, or slated to be done. |
int |
lastColor()
Returns the previous current color code. |
long |
lastLoopTime()
Returns the last time in milliseconds that this session began its input loop. |
void |
logout(boolean removeMOB)
Allows the user to select a different character, taking them back to the login prompt, or to the account character listing screen, whichever is appropriate. |
java.lang.String |
makeEscape(int c)
Converts a character after the ^ sign (usually a color code) into an appropriate telnet escape sequence string for output. |
MOB |
mob()
Returns the player MOB attached to this session object. |
void |
negotiateTelnetMode(int telnetCode)
Change telnet mode by negotiating the command to the clients client. |
CMObject |
newInstance()
Returns a new instance of this class. |
int |
nonBlockingIn(boolean appendInputFlag)
|
void |
onlyPrint(java.lang.String msg)
Low level text output method. |
void |
onlyPrint(java.lang.String msg,
boolean noCache)
Low level text output method. |
void |
out(char c)
|
void |
out(char[] c)
Lowest level user-output method. |
void |
out(java.lang.String c)
|
java.util.List<java.lang.String> |
previousCMD()
Returns a pre-parsed, pre-filtered Vector of strings representing the last command entered by the user through this session. |
void |
print(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Medium-level text output method. |
void |
print(java.lang.String msg)
Medium-level text output method. |
void |
println(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Medium-level text output method. |
void |
println(java.lang.String msg)
Medium-level text output method. |
java.lang.String |
prompt(java.lang.String Message)
Prompts the user to enter a string, and then returns what the enter. |
java.lang.String |
prompt(java.lang.String Message,
long maxTime)
Prompts the user to enter a string, and then returns what the enter. |
java.lang.String |
prompt(java.lang.String Message,
java.lang.String Default)
Prompts the user to enter a string, and then returns what the enter. |
java.lang.String |
prompt(java.lang.String Message,
java.lang.String Default,
long maxTime)
Prompts the user to enter a string, and then returns what the enter. |
void |
rawOut(java.lang.String msg)
Lowest level user-output method. |
void |
rawPrint(java.lang.String msg)
Low level line-output method. |
void |
rawPrintln(java.lang.String msg)
Low level line-output method. |
int |
read()
|
java.lang.String |
readlineContinue()
Blocks for a short amount of time, returning an input string only if the user happens to have hit enter. |
void |
run()
|
boolean |
serverTelnetMode(int telnetCode)
Gets a server telnet mode flag. |
void |
setAccount(PlayerAccount account)
Sets the player acount attached to this session object. |
void |
setAfkFlag(boolean truefalse)
Sets whether this mob/session is currently Away From Keyboard |
void |
setAFKMessage(java.lang.String str)
Returns the reason given by the user that they are AFK. |
void |
setClientTelnetMode(int telnetCode,
boolean onOff)
Sets a client telnet mode flag. |
void |
setKillFlag(boolean truefalse)
|
void |
setLastNPCFight()
Sets now as the milliseconds timestamp since this user last registered a npc fight. |
void |
setLastPKFight()
Sets now as the milliseconds timestamp since this user last registered a pk fight. |
void |
setMob(MOB newmob)
Sets the player MOB attached to this session object. |
void |
setPreviousCmd(java.util.List cmds)
|
void |
setPromptFlag(boolean truefalse)
Notifies this session to output the users prompt again once it has reached a suitable lapse in text output. |
void |
setServerTelnetMode(int telnetCode,
boolean onOff)
Sets a server telnet mode flag. |
void |
setStat(java.lang.String code,
java.lang.String val)
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. |
void |
showPrompt()
|
int |
snoopSuspension(int change)
Increments or decrements the snoop suspension counter by the given amount. |
void |
startBeingSnoopedBy(Session S)
Notifies this session that the given session is snooping it. |
void |
stdPrint(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Higher-level line output method. |
void |
stdPrint(java.lang.String msg)
Higher-level line output method. |
void |
stdPrintln(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Higher-level line output method. |
void |
stdPrintln(java.lang.String msg)
Higher-level line output method. |
void |
stopBeingSnoopedBy(Session S)
Notifies this session that the given session is no longer snooping it. |
void |
updateLoopTime()
Sets the last time in milliseconds that this session began its input loop. |
void |
wraplessPrint(java.lang.String msg)
Medium-level text output method. |
void |
wraplessPrintln(java.lang.String msg)
Medium-level text output method. |
| 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, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.planet_ink.coffee_mud.Common.interfaces.Session |
|---|
start |
| Field Detail |
|---|
protected static final int SOTIMEOUT
protected static int sessionCounter
protected int status
protected int snoopSuspensionStack
protected java.net.Socket sock
protected java.io.BufferedReader in
protected java.io.PrintWriter out
protected java.io.OutputStream rawout
protected MOB mob
protected PlayerAccount acct
protected boolean killFlag
protected boolean needPrompt
protected boolean afkFlag
protected java.lang.String afkMessage
protected java.lang.StringBuffer input
protected java.lang.StringBuffer preliminaryInput
protected java.lang.StringBuffer fakeInput
protected boolean waiting
protected java.util.List<java.lang.String> previousCmd
protected java.lang.String[] clookup
protected java.lang.String lastColorStr
protected java.lang.String lastStr
protected int spamStack
protected java.util.List snoops
protected java.util.List<java.lang.String> prevMsgs
protected java.lang.StringBuffer curPrevMsg
protected boolean lastWasCR
protected boolean lastWasLF
protected boolean suspendCommandLine
protected boolean[] serverTelnetCodes
protected boolean[] clientTelnetCodes
protected java.lang.String terminalType
protected int terminalWidth
protected int terminalHeight
protected long writeStartTime
protected boolean bNextByteIs255
protected boolean connectionComplete
protected java.util.concurrent.locks.ReentrantLock writeLock
protected int currentColor
protected int lastColor
protected long lastStart
protected long lastStop
protected long lastLoopTop
protected long userLoginTime
protected long onlineTime
protected long lastPKFight
protected long lastNPCFight
protected long lastBlahCheck
protected long milliTotal
protected long tickTotal
protected long lastKeystroke
protected long promptLastShown
| Constructor Detail |
|---|
public DefaultSession()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic boolean isFake()
Session
isFake in interface Sessionpublic CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
public void initializeSession(java.net.Socket s,
java.lang.String introTextStr)
Session
initializeSession in interface Sessions - the socket the user connected fromintroTextStr - introductory text string (Hello!)
public void setServerTelnetMode(int telnetCode,
boolean onOff)
Session
setServerTelnetMode in interface SessiontelnetCode - the telnet codeonOff - true to turn on, false to turn off the flagSession.TELNET_ANSI,
Session.serverTelnetMode(int)public boolean serverTelnetMode(int telnetCode)
Session
serverTelnetMode in interface SessiontelnetCode - the telnet code
Session.TELNET_ANSI,
Session.setServerTelnetMode(int, boolean)
public void setClientTelnetMode(int telnetCode,
boolean onOff)
Session
setClientTelnetMode in interface SessiontelnetCode - the telnet codeonOff - true to turn on, false to turn off the flagSession.TELNET_ANSI,
Session.clientTelnetMode(int)public boolean clientTelnetMode(int telnetCode)
Session
clientTelnetMode in interface SessiontelnetCode - the telnet code
Session.TELNET_ANSI,
Session.setClientTelnetMode(int, boolean)
public void changeTelnetMode(int telnetCode,
boolean onOff)
Session
changeTelnetMode in interface SessiontelnetCode - the telnet codeonOff - true to turn on, false to turn off the flagSession.TELNET_ANSI,
Session.setClientTelnetMode(int, boolean),
Session.setServerTelnetMode(int, boolean)
public void changeTelnetModeBackwards(int telnetCode,
boolean onOff)
public void changeTelnetModeBackwards(java.io.OutputStream out,
int telnetCode,
boolean onOff)
throws java.io.IOException
java.io.IOExceptionpublic void negotiateTelnetMode(int telnetCode)
Session
negotiateTelnetMode in interface SessiontelnetCode - the telnet codeSession.TELNET_ANSI,
Session.setClientTelnetMode(int, boolean),
Session.setServerTelnetMode(int, boolean)public void initTelnetMode(int mobbitmap)
Session
initTelnetMode in interface Sessionmobbitmap - the mobbitmap the bitmap of mob flags to use as a guide in negotiationMOB.getBitmap(),
MOB.ATT_MXP,
Session.changeTelnetMode(int, boolean)public int currentColor()
Session
currentColor in interface SessionSession.getColor(char),
Session.makeEscape(int),
Session.lastColor()public int lastColor()
Session
lastColor in interface SessionSession.getColor(char),
Session.currentColor(),
Session.makeEscape(int)public long getTotalMillis()
Session
getTotalMillis in interface Sessionpublic long getIdleMillis()
Session
getIdleMillis in interface Sessionpublic long getTotalTicks()
Session
getTotalTicks in interface Sessionpublic long getMillisOnline()
Session
getMillisOnline in interface Sessionpublic long lastLoopTime()
Session
lastLoopTime in interface SessionSession.updateLoopTime()public void updateLoopTime()
Session
updateLoopTime in interface SessionSession.lastLoopTime()public long getLastPKFight()
Session
getLastPKFight in interface SessionSession.setLastPKFight(),
Session.setLastNPCFight()public void setLastPKFight()
Session
setLastPKFight in interface SessionSession.getLastPKFight(),
Session.getLastNPCFight()public long getLastNPCFight()
Session
getLastNPCFight in interface SessionSession.setLastPKFight(),
Session.setLastNPCFight()public void setLastNPCFight()
Session
setLastNPCFight in interface SessionSession.getLastPKFight(),
Session.getLastNPCFight()public java.util.List<java.lang.String> getLastMsgs()
Session
getLastMsgs in interface Sessionpublic java.lang.String getTerminalType()
Session
getTerminalType in interface Sessionpublic MOB mob()
Session
mob in interface SessionSession.setMob(MOB)public void setMob(MOB newmob)
Session
setMob in interface Sessionnewmob - the player MOB attached to this session object.Session.mob()public void setAccount(PlayerAccount account)
Session
setAccount in interface Sessionaccount - the player account attached to this session object.Session.mob()public int getWrap()
Session
getWrap in interface Sessionpublic int getPageBreak()
public boolean killFlag()
Session
killFlag in interface SessionSession.logout(boolean),
Session.killFlag()public void setKillFlag(boolean truefalse)
public java.util.List<java.lang.String> previousCMD()
Session
previousCMD in interface Sessionpublic void startBeingSnoopedBy(Session S)
Session
startBeingSnoopedBy in interface SessionS - the session to snoop on me.Session.startBeingSnoopedBy(Session),
Session.stopBeingSnoopedBy(Session),
Session.amBeingSnoopedBy(Session),
Session.snoopSuspension(int)public void stopBeingSnoopedBy(Session S)
Session
stopBeingSnoopedBy in interface SessionS - the session to stop snooping on me.Session.startBeingSnoopedBy(Session),
Session.stopBeingSnoopedBy(Session),
Session.amBeingSnoopedBy(Session),
Session.snoopSuspension(int)public boolean amBeingSnoopedBy(Session S)
Session
amBeingSnoopedBy in interface SessionS - the session to check for a snoop on me.
Session.startBeingSnoopedBy(Session),
Session.stopBeingSnoopedBy(Session),
Session.amBeingSnoopedBy(Session),
Session.snoopSuspension(int)public int snoopSuspension(int change)
Session
snoopSuspension in interface Sessionchange - the amount to change the snoop suspension counter by
Session.startBeingSnoopedBy(Session),
Session.stopBeingSnoopedBy(Session),
Session.amBeingSnoopedBy(Session),
Session.snoopSuspension(int)public void setPreviousCmd(java.util.List cmds)
public boolean afkFlag()
Session
afkFlag in interface SessionSession.setAfkFlag(boolean),
Session.setAFKMessage(String)public void setAfkFlag(boolean truefalse)
Session
setAfkFlag in interface Sessiontruefalse - true if they are AFK, false otherwiseSession.afkFlag(),
Session.afkMessage()public java.lang.String afkMessage()
Session
afkMessage in interface SessionSession.setAfkFlag(boolean),
Session.setAFKMessage(String)public void setAFKMessage(java.lang.String str)
Session
setAFKMessage in interface Sessionstr - the reason given by the user that they are AFK.Session.setAfkFlag(boolean),
Session.afkMessage()protected void errorOut(java.lang.Exception t)
protected long getWriteStartTime()
public boolean isLockedUpWriting()
Session
isLockedUpWriting in interface Sessionpublic void out(char[] c)
Session
out in interface Sessionc - string (as char array) to send out to the userpublic void out(java.lang.String c)
public void out(char c)
public void onlyPrint(java.lang.String msg)
Session
onlyPrint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)
public void onlyPrint(java.lang.String msg,
boolean noCache)
Session
onlyPrint in interface Sessionmsg - the string to send to the usernoCache - true to disable line caching, false otherwiseSession.out(char[])public void rawOut(java.lang.String msg)
Session
rawOut in interface Sessionmsg - the string to send to the userSession.out(char[])public void rawPrint(java.lang.String msg)
Session
rawPrint in interface Sessionmsg - the string to send to the userSession.rawPrint(String)public void print(java.lang.String msg)
Session
print in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void rawPrintln(java.lang.String msg)
Session
rawPrintln in interface Sessionmsg - the string to send to the userSession.rawPrintln(String)public void stdPrint(java.lang.String msg)
Session
stdPrint in interface Sessionmsg - the string to send to the userSession.rawPrint(String)
public void print(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Session
print in interface Sessionsrc - variable for special code parsing: Sourcetrg - variable for special code parsing: Targettol - variable for special code parsing: Toolmsg - the string to send to the userSession.onlyPrint(String, boolean)
public void stdPrint(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Session
stdPrint in interface Sessionsrc - variable for special code parsing: Sourcetrg - variable for special code parsing: Targettol - variable for special code parsing: Toolmsg - the string to send to the userSession.rawPrint(String)public void println(java.lang.String msg)
Session
println in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void wraplessPrintln(java.lang.String msg)
Session
wraplessPrintln in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void wraplessPrint(java.lang.String msg)
Session
wraplessPrint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)public void colorOnlyPrintln(java.lang.String msg)
Session
colorOnlyPrintln in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)
public void colorOnlyPrintln(java.lang.String msg,
boolean noCache)
Session
colorOnlyPrintln in interface Sessionmsg - the string to send to the usernoCache - true to disable line caching, false otherwiseSession.onlyPrint(String, boolean)public void colorOnlyPrint(java.lang.String msg)
Session
colorOnlyPrint in interface Sessionmsg - the string to send to the userSession.onlyPrint(String, boolean)
public void colorOnlyPrint(java.lang.String msg,
boolean noCache)
Session
colorOnlyPrint in interface Sessionmsg - the string to send to the usernoCache - true to disable line caching, false otherwiseSession.onlyPrint(String, boolean)public void stdPrintln(java.lang.String msg)
Session
stdPrintln in interface Sessionmsg - the string to send to the userSession.rawPrintln(String)
public void println(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Session
println in interface Sessionsrc - variable for special code parsing: Sourcetrg - variable for special code parsing: Targettol - variable for special code parsing: Toolmsg - the string to send to the userSession.onlyPrint(String, boolean)
public void stdPrintln(Physical src,
Environmental trg,
Environmental tol,
java.lang.String msg)
Session
stdPrintln in interface Sessionsrc - variable for special code parsing: Sourcetrg - variable for special code parsing: Targettol - variable for special code parsing: Toolmsg - the string to send to the userSession.rawPrintln(String)public void setPromptFlag(boolean truefalse)
Session
setPromptFlag in interface Sessiontruefalse - true to send another prompt, false otherwise
public java.lang.String prompt(java.lang.String Message,
java.lang.String Default,
long maxTime)
throws java.io.IOException
Session
prompt in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing out
java.io.IOException - a disconnect or time outSession.prompt(String),
Session.prompt(String, String),
Session.prompt(String, long)
public java.lang.String prompt(java.lang.String Message,
java.lang.String Default)
throws java.io.IOException
Session
prompt in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits enter
java.io.IOException - a disconnectSession.prompt(String),
Session.prompt(String, long),
Session.prompt(String, String, long)
public java.lang.String prompt(java.lang.String Message,
long maxTime)
throws java.io.IOException
Session
prompt in interface SessionMessage - the prompt message to display to the usermaxTime - max number of milliseconds to wait before timing out
java.io.IOException - a disconnect or time outSession.prompt(String),
Session.prompt(String, String),
Session.prompt(String, String, long)
public java.lang.String prompt(java.lang.String Message)
throws java.io.IOException
Session
prompt in interface SessionMessage - the prompt message to display to the user
java.io.IOException - a disconnectSession.prompt(String, String),
Session.prompt(String, long),
Session.prompt(String, String, long)public int getColor(char c)
Session
getColor in interface Sessionc - the color code
Session.makeEscape(int),
Session.currentColor(),
Session.lastColor()public java.lang.String[] clookup()
Session
clookup in interface Sessionpublic java.lang.String makeEscape(int c)
Session
makeEscape in interface Sessionc - the ^ character code
Session.getColor(char),
Session.currentColor(),
Session.lastColor()
public void handleSubOption(int optionCode,
char[] suboptionData,
int dataSize)
throws java.io.IOException
java.io.IOException
public void handleEscape()
throws java.io.IOException,
java.io.InterruptedIOException
java.io.IOException
java.io.InterruptedIOException
public void handleIAC()
throws java.io.IOException,
java.io.InterruptedIOException
java.io.IOException
java.io.InterruptedIOException
public int read()
throws java.io.IOException
java.io.IOExceptionpublic char hotkey(long maxWait)
Session
hotkey in interface SessionmaxWait - the maximum milliseconds to wait
public int nonBlockingIn(boolean appendInputFlag)
throws java.io.IOException
java.io.IOException
public java.lang.String blockingIn(long maxTime)
throws java.io.IOException
java.io.IOException
public java.lang.String blockingIn()
throws java.io.IOException
Session
blockingIn in interface Sessionjava.io.IOException - any exception generated during input
public java.lang.String readlineContinue()
throws java.io.IOException,
java.net.SocketException
Session
readlineContinue in interface Sessionjava.io.IOException - exceptions thrown, typically a timeout
java.net.SocketException
public boolean confirm(java.lang.String Message,
java.lang.String Default,
long maxTime)
throws java.io.IOException
Session
confirm in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing out
java.io.IOException - a disconnect or time outSession.confirm(String, String)
public boolean confirm(java.lang.String Message,
java.lang.String Default)
throws java.io.IOException
Session
confirm in interface SessionMessage - the prompt message to display to the userDefault - the default response if the user just hits enter
java.io.IOException - a disconnectSession.confirm(String, String, long)
public java.lang.String choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default)
throws java.io.IOException
Session
choose in interface SessionMessage - the prompt message to display to the userChoices - a list of uppercase characters that may be enteredDefault - the default response if the user just hits enter
java.io.IOException - a disconnectSession.choose(String, String, String, long)
public java.lang.String choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default,
long maxTime)
throws java.io.IOException
Session
choose in interface SessionMessage - the prompt message to display to the userChoices - a list of uppercase characters that may be enteredDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing out
java.io.IOException - a disconnect or time outSession.choose(String, String, String)
public java.lang.String choose(java.lang.String Message,
java.lang.String Choices,
java.lang.String Default,
long maxTime,
java.util.List<java.lang.String> paramsOut)
throws java.io.IOException
Session
choose in interface SessionMessage - the prompt message to display to the userChoices - a list of uppercase characters that may be enteredDefault - the default response if the user just hits entermaxTime - max number of milliseconds to wait before timing outparamsOut - an empty list to put any extra crap added to the end of the choice.
java.io.IOException - a disconnectSession.choose(String, String, String, long)
public void kill(boolean removeMOB,
boolean dropSession,
boolean killThread)
Session
kill in interface SessionremoveMOB - true to remove the mob from the gamedropSession - true to force closed sockets, and removed sessionkillThread - true to force a thread death, and false to be more lenientSession.killFlag()public void showPrompt()
protected void closeSocks()
public java.lang.String getAddress()
Session
getAddress in interface Sessionpublic int getStatus()
Session
getStatus in interface SessionSession.STATUS_LOGINpublic void logout(boolean removeMOB)
Session
logout in interface SessionremoveMOB - true to remove the mob from the gamepublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic int getSaveStatIndex()
Modifiable
getSaveStatIndex in interface ModifiableModifiable.getStatCodes(),
Modifiable.getStat(String),
Modifiable.setStat(String, String)public java.lang.String[] getStatCodes()
Modifiable
getStatCodes in interface ModifiableModifiable.getStat(String),
Modifiable.setStat(String, String)public boolean isStat(java.lang.String code)
Modifiable
isStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()public java.lang.String getStat(java.lang.String code)
Modifiable
getStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()
public void setStat(java.lang.String code,
java.lang.String val)
Modifiable
setStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||