Package org.eclipse.ecf.example.clients

Examples of org.eclipse.ecf.example.clients.XMPPChatRoomClient


          .println("Parameters:  <senderAccount> <senderPassword> <chatroomname>.  e.g. sender@gmail.com senderpassword mychatroom");
      return new Integer(-1);
    }
    senderAccount = originalArgs[0];
    // Create client
    final XMPPChatRoomClient client = new XMPPChatRoomClient(this);
    // connect to senderAccount using senderPassword
    client.connect(senderAccount, originalArgs[1]);
    // get chat room
    final IChatRoomContainer chatRoomContainer = client.createChatRoom(originalArgs[2]);
    // join/connect to chat room
    chatRoomContainer.connect(client.getChatRoomInfo().getRoomID(), null);

    System.out.println("ECF chat room robot sender=" + senderAccount + "  Connected to room: " + client.getChatRoomInfo().getRoomID().getName());
    // Add message listener to chat room
    chatRoomContainer.addMessageListener(this);
    // Get chat room message sender
    sender = chatRoomContainer.getChatRoomMessageSender();
    sender.sendMessage("Hi, I'm a robot. To get rid of me, send me a direct message.");
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.example.clients.XMPPChatRoomClient

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.