public boolean login(String nickname) throws ChatMemberIsAlreadyRegisteredException {
if (this.chatMemberModelInterface != null) {
throw new ChatMemberIsAlreadyRegisteredException();
}
try {
ChatMemberModelInterface chatMemberModelInterface = new ChatMemberModel(nickname);
boolean result = this.chatServerModelInterface.registerChatClient(chatMemberModelInterface);
if (result)
this.chatMemberModelInterface = chatMemberModelInterface;
return result;
} catch (RemoteException e) {