Package net.solosky.maplefetion.bean

Examples of net.solosky.maplefetion.bean.Group


      //发送信息收到回复
      SipcReceipt receipt = this.dialog.getMessageFactory()
      .createDefaultReceipt(notify.getFrom(), Integer.toString(notify.getCallID()), notify.getSequence());
      this.dialog.process(receipt);
     
      Group  group  = this.context.getFetionStore().getGroup(notify.getFrom());
     
      Member member = this.context.getFetionStore().getGroupMember(group, notify.getHeader("SO").getValue());
      String body   = notify.getBody()!=null?notify.getBody().toSendString():""//防止产生NULL错误
      GroupDialog groupDialog = this.context.getDialogFactory().findGroupDialog(group);
     
      if(group!=null && member!=null && groupDialog!=null&&this.context.getNotifyEventListener()!=null) {
        this.tryFireNotifyEvent(new GroupMessageEvent(group, member, this.parseMessage(notify), groupDialog));
       
        logger.debug("Received a group message:[ Group="+group.getName()+", from="+member.getDisplayName()+", msg="+body );
      }
    }
View Full Code Here


    {
      List groups = event.getChildren("group");
      Iterator it = groups.iterator();
      while(it.hasNext()) {
        Element el = (Element) it.next();
        Group group = this.context.getFetionStore().getGroup(el.getAttributeValue("uri"));
        if(group!=null) {
          //群信息
          BeanHelper.toBean(Group.class, group, el);
         
          //成员
View Full Code Here

    {
      List groups = XMLHelper.findAll(event, "/event/results/groups/*group");
      Iterator it = groups.iterator();
      while(it.hasNext()){
        Element el = (Element) it.next();
        Group group = this.context.getFetionStore().getGroup(el.getAttributeValue("uri"));
        if(group!=null){
             BeanHelper.toBean(Group.class, group, el);
        }
      }
    }
View Full Code Here

      List groupList = XMLHelper.findAll(event, "/event/results/groups/*group");
    Iterator it = groupList.iterator();
    FetionStore store = this.context.getFetionStore();
    while(it.hasNext()) {
      Element g = (Element) it.next();
      Group group = store.getGroup(g.getAttributeValue("uri"));
      //群下面的成员迭代
      List memberList = XMLHelper.findAll(g, "/group/*member");
      Iterator mit = memberList.iterator();
      while(mit.hasNext()) {
        Element e = (Element) mit.next();
View Full Code Here

     {
       Iterator<Group> it = this.client.getFetionStore().getGroupList().iterator();
       int groupId = 0;
       println("===========================群列表=================================");
       while(it.hasNext()) {
         Group group = it.next();
         this.groupmap.put(Integer.toString(groupId), group.getUri());
         println(groupId+"::"+group.getName()+'\t'+group.getBulletin()+"\t"+ group.getIntro());
         println("-----------------------------------------------------------------");
         Iterator<Member> mit = this.client.getFetionStore().getGroupMemberList(group).iterator();
         while(mit.hasNext()) {
           Member member = mit.next();
           println('\t'+member.getDisplayName()+"\t"+member.getUri());
View Full Code Here

      /**
       * 发送群消息
       */
      public void say(String groupuri, String message) {
        if(groupuri==nullreturn;
        final Group group = this.client.getFetionStore().getGroup(groupuri);
        if(group!=null) {
          GroupDialog dialog = this.client.getDialogFactory().findGroupDialog(group);
          if(dialog!=null) {
            dialog.sendChatMessage(Message.wrap(message), new ActionEventListener() {
              public void fireEevent(ActionEvent event)
              {
                if(event.getEventType()==ActionEventType.SUCCESS){
                  println("提示:发送给群 "+group.getName()+" 的消息发送成功!");
              }else{
                println("提示:发送给群 "+group.getName()+" 的消息发送失败!");
              }
            }});
          }
        }
      }
View Full Code Here

        Element root = XMLHelper.build(response.getBody().toSendString());
      List groupList = XMLHelper.findAll(root, "/results/groups/*group");
      Iterator it = groupList.iterator();
      while(it.hasNext()) {
        Element e = (Element) it.next();
        Group group = store.getGroup(e.getAttributeValue("uri"));
        if(group!=null) {
                BeanHelper.toBean(Group.class, group, e);
          logger.debug("Got a group:"+group);
        }
      }
View Full Code Here

      List groupList = XMLHelper.findAll(root, "/results/group-list/*group");
      Iterator it = groupList.iterator();
      FetionStore store = this.context.getFetionStore();
      while(it.hasNext()) {
        Element e = (Element) it.next();
        Group group = new Group();
        BeanHelper.setValue(group, "uri", e.getAttributeValue("uri"));
        //group.setIdentity( Integer.parseInt(e.getAttributeValue("identity")));
        store.addGroup(group);
      }
    }
View Full Code Here

    Element root = XMLHelper.build(response.getBody().toSendString());
    List groupList = XMLHelper.findAll(root, "/results/groups/*group");
    Iterator it = groupList.iterator();
    while(it.hasNext()) {
      Element g = (Element) it.next();
      Group group = store.getGroup(g.getAttributeValue("uri"));
      //群下面的成员迭代
      List memberList = XMLHelper.findAll(g, "/group/*member");
      Iterator mit = memberList.iterator();
      while(mit.hasNext()) {
        Element e = (Element) mit.next();
View Full Code Here

TOP

Related Classes of net.solosky.maplefetion.bean.Group

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.