Package net.solosky.maplefetion.net

Examples of net.solosky.maplefetion.net.TransferFactory


   * @param portList
   * @return
   */
  private Transfer buildTransfer(ArrayList<Port> portList)
  {
    TransferFactory factory = this.context.getTransferFactory();
    Transfer transfer = null;
    Port     port     = null;
    Iterator<Port> it = portList.iterator();
    while(it.hasNext()) {
      port = it.next();
      //尝试建立连接
      try {
        logger.trace("try to connect to port = "+port+" ..");
              transfer = factory.createTransfer(port);
            } catch (TransferException e) {
              logger.trace("Connect to port failed - Port = "+port, e);
            }
           
            //如果建立成功就跳出循环,否则继续尝试建立下一个端口的连接
View Full Code Here


    // 如果用户手机在线 或者电脑离线,将建立手机聊天对话框
    if (presence == Presence.OFFLINE) {
      dialog = new BasicChatDialog(this.context, buddy);
    } else if (presence == Presence.ONLINE || presence == Presence.AWAY ||
                presence == Presence.BUSY   || presence == Presence.ROBOT ) { // 如果用户电脑在线,建立在线聊天对话框
      TransferFactory factory = this.context.getTransferFactory();
      if (factory.isMutiConnectionSupported()) {
        dialog = new LiveV2ChatDialog(buddy, this.context);
      } else {
        dialog = new LiveV1ChatDialog(buddy, this.context);
      }
    } else {
View Full Code Here

TOP

Related Classes of net.solosky.maplefetion.net.TransferFactory

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.