@Override
  protected void messageReceived(MsnSession session) {
    super.messageReceived(session);

    MsnContactImpl contact =
        (MsnContactImpl) session.getMessenger().getContactList().getContactByEmail(getEmail());

    if (contact != null) {
      contact.setDisplayName(getDisplayName());
      contact.setClientId(MsnClientId.parseInt(getClientId()));
      contact.setStatus(getUserStatus());
      MsnObject obj = getMsnObject();
      if (obj != null) {
        contact.setAvatar(obj);
      }
      ((AbstractMessenger) session.getMessenger()).fireContactStatusChanged(contact);
    }
  }
  @Override
  protected void messageReceived(MsnSession session) {
    super.messageReceived(session);

    MsnSwitchboard switchboard = session.getSwitchboard();
    if (switchboard != null) {
      MsnMessenger messenger = session.getMessenger();
      MsnContactImpl contact =
          (MsnContactImpl) messenger.getContactList().getContactByEmail(getEmail());
      if (contact == null) {
        contact = new MsnContactImpl(messenger.getContactList());
        contact.setEmail(getEmail());
      }

      ((AbstractSwitchboard) switchboard).removeContact(contact);
      ((AbstractMessenger) messenger).fireContactLeaveSwitchboard(switchboard, contact);

      if (switchboard.getAllContacts().length == 0) {
        switchboard.close();
      }
    }
  }