|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.electrotank.electroserver.plugins.utilities.EventResponse com.electrotank.electroserver.plugins.utilities.LoginResponse
Represents the response from a LoginEventHandler. The event handler will populate this object with the users' details.
Constructor Summary | |
LoginResponse(boolean loginSuccessful,
String message)
Constructs a new LoginResponse and sets the loginSuccess boolean as well as the message that will be returned to the user. |
Method Summary | |
void |
addUserServerVariable(Object key,
Object value)
Adds a single user server variable to the LoginResponse. |
String |
getUsername()
Gets the username from the LoginResponse. |
Map |
getUserServerVariables()
Returns the Map that contains the userServerVariables defined by the event handler. |
boolean |
isLoginSuccessful()
Returns the value of the loginSuccessful boolean. |
boolean |
isModerator()
Returns the value of the isModerator boolean. |
void |
removeUserServerVariable(Object key)
Removes a specific user server variable based on the key. |
void |
setLoginSuccessful(boolean loginSuccessful)
Sets the value of the loginSuccessful boolean. |
void |
setModerator(boolean moderator)
Sets the value of the isModerator boolean. |
void |
setUsername(String username)
Sets the username on the LoginResponse. |
void |
setUserServerVariables(Map userServerVariables)
Sets the user server variables with a Map. |
Methods inherited from class com.electrotank.electroserver.plugins.utilities.EventResponse |
addResponseVariable, getMessage, getResponseVariables, removeResponseVariable, setMessage, setResponseVariables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LoginResponse(boolean loginSuccessful, String message)
loginSuccessful
- a boolean indicating if the user successfully logged in or not.message
- a String that is returned to the calling user. Typically this contains a message
that indicates why login failed or not.Method Detail |
public boolean isLoginSuccessful()
public void setLoginSuccessful(boolean loginSuccessful)
loginSuccessful
- a boolean indicating if the login was successful or not.public boolean isModerator()
public void setModerator(boolean moderator)
moderator
- a boolean indicating if this user is a moderator or not.public Map getUserServerVariables()
public void setUserServerVariables(Map userServerVariables)
userServerVariables
- a Map containing all the user server variables to be set on this LoginResponse.public void addUserServerVariable(Object key, Object value)
key
- the variable key/name.value
- the variable value.public void removeUserServerVariable(Object key)
key
- the key of the user server variable to remove.public void setUsername(String username)
username
- the username to set.public String getUsername()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |