|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bluesock.bluemud.driver.User
The User class serves as the bridge between the SocketCommunicator, which is responsible for low-level network I/O, and the Controller, which is responsible for interpretation of user commands and forwarding of world-generated messages to the user.
Constructor Summary | |
User(SocketCommunicator comm,
java.lang.String connectedFromIPAddress)
Constructor |
Method Summary | |
void |
disconnectEvent()
|
Controller |
getController()
Retrieve the Controller instance presently associated with this User instance. |
int |
getIdleTime()
Retrieves the time, in seconds, that this User has been idle. |
java.lang.String |
getIPAddress()
Retrieves the IP address from which this user is connected. |
java.lang.Object |
getProperty(java.lang.String key)
Retrieves information from the properties HashMap. |
java.lang.Object |
getProperty(java.lang.String key,
java.lang.Object def)
Retrieves information from the properties HashMap and if it's not there, it returns the default. |
(package private) SecurityToken |
getSecurityToken()
Retrieve the SecurityToken associated with this User instance. |
java.util.HashMap |
getSocketProperties()
Returns a copy of the telnet properties HashMap. |
boolean |
inLineMode()
Queries the SocketCommunicator as to whether we're in the almighty linemode or not. |
void |
inputEvent(java.lang.String incoming)
Creates and enqueues a new Input Event. |
void |
logout()
This tells the communicator to exit. |
void |
nawsEvent()
Creates and enqueues a Naws Event. |
void |
rawwrite(java.lang.String message)
Send a raw message to the user (over the Socketcommunicator). |
boolean |
setCharacterMode()
Puts the connection into character mode (as opposed to line mode. |
void |
setController(Controller newController)
Specify the controller this User should interact with. |
void |
setLineMode()
Puts the connection into line mode. |
(package private) void |
setSecurityToken(SecurityToken token)
Resets the security token associated with this User object. |
void |
setShouldExit(boolean b)
Sets the shouldExit flag which will kick the User polling thread out of its loop and close the connection. |
void |
start()
|
void |
turnOffEcho()
Tells the user's client to stop echoing text (for passwords and such). |
void |
turnOnEcho()
Tells the user's client to start echoing text (for regular stuff). |
void |
write(java.lang.String message)
Send a message to the user (over the Socketcommunicator). |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public User(SocketCommunicator comm, java.lang.String connectedFromIPAddress)
comm
- The SocketCommunicator instance this User is
bound to for socket communications.connectedFromIPAddress
- The ip address from which the
User connected.Method Detail |
public void setController(Controller newController)
newController
- - The controller this User should
begin interacting with.public Controller getController()
public void write(java.lang.String message)
message
- The message to send.public void rawwrite(java.lang.String message)
message
- The message to send.public void nawsEvent()
public void inputEvent(java.lang.String incoming)
incoming
- The text of the input.public void disconnectEvent()
public void start()
public java.lang.Object getProperty(java.lang.String key)
public java.lang.Object getProperty(java.lang.String key, java.lang.Object def)
public java.lang.String getIPAddress()
public int getIdleTime()
public void setShouldExit(boolean b)
public void turnOnEcho()
public void turnOffEcho()
public boolean setCharacterMode()
public void setLineMode()
public boolean inLineMode()
public java.util.HashMap getSocketProperties()
public void logout()
SecurityToken getSecurityToken()
void setSecurityToken(SecurityToken token)
token
- The new SecurityToken
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |