Package org.eclipse.ecf.protocol.msn

Examples of org.eclipse.ecf.protocol.msn.ChatSession


    sendChatMessage(toID, body);
  }

  public void sendChatMessage(ID toID, String body) throws ECFException {
    try {
      ChatSession cs = (ChatSession) chatSessions.get(toID);
      if (cs == null) {
        cs = client.createChatSession(toID.getName());
        cs.addChatSessionListener(new ChatSessionListener(toID));
        chatSessions.put(toID, cs);
      }
      cs.sendMessage(body);
    } catch (IOException e) {
      throw new ECFException(e);
    }
  }
View Full Code Here


  public void sendTypingMessage(ID toID, boolean isTyping, String body)
      throws ECFException {
    try {
      if (isTyping) {
        ChatSession cs = (ChatSession) chatSessions.get(toID);
        if (cs == null) {
          cs = client.createChatSession(toID.getName());
          cs.addChatSessionListener(new ChatSessionListener(toID));
          chatSessions.put(toID, cs);
        }
        cs.sendTypingNotification();
      }
    } catch (IOException e) {
      throw new ECFException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.protocol.msn.ChatSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.