swpchat.server
Class UserInfoHandler
java.lang.Object
|
+--swpchat.server.UserInfoHandler
- All Implemented Interfaces:
- ChatTokens, UserInfoTokens
- public class UserInfoHandler
- extends java.lang.Object
- implements UserInfoTokens
encapsultaes methods for handleing userInfo relating commands
- Version:
- 1.0
- Author:
- Rene Woerzberger, Leonid Ostwald
Fields inherited from interface swpchat.protocol.UserInfoTokens |
STR_CITY, STR_COLOR, STR_EMAIL, STR_FIRSTNAME, STR_HOMEPAGE, STR_LASTNAME, STR_MOTTO, STR_NICKNAME, STR_NULL_INFORMATION, STR_SEX, STR_SEX_DONTKNOW, STR_SEX_FEMALE, STR_SEX_MALE, STR_SHIP_STATUS, STR_STARTUPSEND, STR_STARTUPSEND_NEGATIVE, STR_STARTUPSEND_POSITIVE, STR_STREET, STR_USERINFO_PROP_BEGIN, STR_ZIP |
Fields inherited from interface swpchat.protocol.ChatTokens |
CHAR_ARG_SEP, CHAR_MSG_END, CHAR_MSG_EOL, CHAR_QUOTE, CHAR_STRING_DELIMITER, STR_ARG_SEP, STR_AUTHORIZE, STR_MSG_END, STR_MSG_EOL, STR_NEG_ARG, STR_NEGATIVE, STR_POS_ARG, STR_POSITIVE, STR_QUOTE, STR_REPLY, STR_STRING_DELIMITER, STR_WAIT |
Method Summary |
void |
setUserInfo(java.util.Vector tokenlist)
method converts given vector and saves keyword and values into UserInfo of session |
java.lang.String |
userInfoToString(java.lang.String nickname)
method converts the userInfo of to a sendable String |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
CLS
static final java.lang.String CLS
userCollection
private NickNameCollection userCollection
sessionKey
private java.lang.String sessionKey
UserInfoHandler
public UserInfoHandler(NickNameCollection userCollection,
java.lang.String sessionKey)
- constructor
- Parameters:
userCollection
- the unique collection of the UserInfossessionKey
- the unique sessionKey of the calling ProtocolHandler-Object
setUserInfo
public void setUserInfo(java.util.Vector tokenlist)
throws NoSuchMemberException
- method converts given vector and saves keyword and values into UserInfo of session
- Parameters:
tokenlist
- the vector (tokenized by ChatStreamTokenizer)
userInfoToString
public java.lang.String userInfoToString(java.lang.String nickname)
throws NoSuchMemberException
- method converts the userInfo of to a sendable String
- Parameters:
nickname
- the nickname of the user, who's infos should be send- Returns:
- String of this shape: keyword1:value1:keyword2:value2:....