org.apache.cxf.message.Message.getId()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(187)

本文整理了Java中org.apache.cxf.message.Message.getId()方法的一些代码示例,展示了Message.getId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getId()方法的具体详情如下:
包路径:org.apache.cxf.message.Message
类名称:Message
方法名:getId

Message.getId介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
   public void onItemSelected(AdapterView<?> parent, View view,
       int pos, long id) {
     Message mSelected = (Message) parent.getItemAtPosition(pos);
     Log.i("Id:", mSelected.getId());
   }
   @Override
   public void onNothingSelected(AdapterView<?> arg0) {
     // TODO Auto-generated method stub
     Log.i("Message", "Nothing is selected");
   }
 });

代码示例来源:origin: stackoverflow.com

for (Message msg : messagesList) {
       if (msg.getId().length() == 0) {
         messagesList.remove(msg);
       }
   }

代码示例来源:origin: stackoverflow.com

yourSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
  public void onItemSelected(AdapterView<?> parent, View view,
      int pos, long id) {
    Message mSelected = (Message) parent.getItemAtPosition(pos);
    Log.i("Id:", mSelected.getId());

  }

  @Override
  public void onNothingSelected(AdapterView<?> arg0) {
    // TODO Auto-generated method stub
    Log.i("Message", "Nothing is selected");

  }

});

代码示例来源:origin: stackoverflow.com

spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
  public void onItemSelected(AdapterView<?> parent, View view,
      int pos, long id) {
    Message mSelected = (Message) parent.getItemAtPosition(pos);
    Log.i("Id:", mSelected.getId());

  }

  @Override
  public void onNothingSelected(AdapterView<?> arg0) {
    // TODO Auto-generated method stub
    Log.i("Message", "Nothing is selected");

  }

});

代码示例来源:origin: apache/cxf

public String getId() {
  return message.getId();
}

代码示例来源:origin: org.apache.cxf/cxf-api

public String getId() {
  return message.getId();
}

代码示例来源:origin: org.apache.cxf/cxf-core

public String getId() {
  return message.getId();
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

public String getId() {
  return message.getId();
}

代码示例来源:origin: stackoverflow.com

ArrayList<Message> messagesList = new ArrayList<Message>();
 if (!clearList) {
   messagesList.addAll(messages.getMessagesList());
   for (ListIterator<Message> iterator = messagesList.listIterator();iterator.hasNext();) {
     Message message = iterator.next();
     if (message.getId().length() == 0) {
       iterator.remove();
     }
   }
 }

代码示例来源:origin: stackoverflow.com

public static List<Message> getMessage(ID id, List<Message> list) {
  List<Message> filtered = new ArrayList<Message>();
  for(Message msg : list) {
    if(msg.getId() == theIdWeAreMatchingAgainst) filtered.add(msg);
  }
  return filtered;
}

代码示例来源:origin: stackoverflow.com

chatRoom.getMessages().put(key, Collections.synchronizedList(new ArrayList<Message>()));
  List<List<Message>> allMessages =new LinkedList<List<Message>>(getMessages().values());
   for (List<Message> dayWiseMsgs : allMessages) {
     //List<Message> dayMsgs = new LinkedList<Message>(dayWiseMsgs);
     if (lastMessageId < dayWiseMsgs.get(dayWiseMsgs.size() - 1).getId()) {
       //for (Message msg : dayWiseMsgs) {
       Message msg = null;
       for(int i =0 ; i < dayWiseMsgs.size() ; i++){
         msg = dayWiseMsgs.get(i);
         if (msg.getId() > lastMessageId ) {
           newMessages.add(msg);
           this.setLastPushMessageId(msg.getId());
         }
       }
     }
   }

代码示例来源:origin: stackoverflow.com

Message removeMsg = new ArrayList<Message>();
 for (Message msg : messagesList) {
          if (msg.getId().length() == 0) {
            removeMsg.add(msg);
          }
      }

messagesList.removeAll(removeMsg);

代码示例来源:origin: stackoverflow.com

public synchronized List<Message> test() {
   List<Message> newMessages = new LinkedList<Message>();
   try {
     logger.debug("Last Message Id = " + lastMessageId
         + " For Chat Room=" + this.getName());
     List<List<Message>> allMessages = new LinkedList<List<Message>>(
         getMessages().values());
     for (List<Message> dayWiseMsgs : allMessages) {
       if (CollectionUtils.isNotEmpty(dayWiseMsgs)
           && lastMessageId < dayWiseMsgs.get(
               dayWiseMsgs.size() - 1).getId()) {
         for(Message message : dayWiseMsgs){
           if (message!= null && message.getId() > lastMessageId) {
             newMessages.add(message);
             this.setLastPushMessageId(message.getId());
           }
         }
       }
     }
     allMessages = null;
   } catch (Exception e) {
     e.printStackTrace();
   }
   return newMessages;
 }

代码示例来源:origin: stackoverflow.com

spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
  public void onItemSelected(AdapterView<?> parent, View view,
      int pos, long id) {
    Message mSelected = mSelected.setSpinnerPosition(pos);
    Log.i("Id:", mSelected.getId());

  }
}

代码示例来源:origin: stackoverflow.com

public class MessageAdapter extends XmlAdapter<Messages,Map<String, Message>> {
  @Override
  public Map<String, Message> unmarshal( Messages value ){
    Map<String, Message> map = new HashMap<String, Message>();
    for( Message msg : value.messages )
      map.put( msg.getId(), msg );
    return map;
  }  

  @Override
  public Messages marshal( Map<String, Message> map ){
    Messages msgCont = new Messages();
    Collection<Message> msgs = map.values();
    msgCont.messages = msgs.toArray(new Message[msgs.size()]);
    return msgCont;
  }
}

代码示例来源:origin: stackoverflow.com

public class TCPClient {
  // ...
  public static void main(String[] args) {
    try (Socket client = new Socket(hostname, PORT);
       BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
       DataOutputStream out = new DataOutputStream(client.getOutputStream())) {
      // ...
      while (!(input = stdIn.readLine()).equalsIgnoreCase("end")) {
        // ...
        encode(message, out);
      }
    } catch (IOException e) {
      e.printStackTrace();
    }
  }

  private static void encode(Message message, DataOutputStream out) throws IOException {
    out.writeUTF(message.getMessage());
    out.writeInt(message.getId());
  }
}

代码示例来源:origin: stackoverflow.com

/**
 * Send an email from the user's mailbox to its recipient.
 *
 * @param service Authorized Gmail API instance.
 * @param userId User's email address. The special value "me"
 * can be used to indicate the authenticated user.
 * @param email Email to be sent.
 * @throws MessagingException
 * @throws IOException
 */
public static void sendMessage(Gmail service, String userId, MimeMessage email)
  throws MessagingException, IOException {
 Message message = createMessageWithEmail(email);
 message = service.users().messages().send(userId, message).execute();
 System.out.println("Message id: " + message.getId());
 System.out.println(message.toPrettyString());
}

代码示例来源:origin: stackoverflow.com

DetachedCriteria msgFromCriteria = DetachedCriteria.forClass(Message.class);
ProjectionList properties = Projections.projectionList();
properties.add(Projections.groupProperty("messageFrom"));
properties.add(Projections.min("id"),"id");
msgFromCriteria.setProjection(properties);

Criteria criteria = s.createCriteria(Message.class);
criteria.add(Subqueries.propertiesIn(new String[]{"messageFrom","id"}, 
  msgFromCriteria));
List<Message> list = criteria.list();

for(Message message:list){
  System.out.println(message.getId()
    +"-------"
    +message.getMessageFrom()
    +"-----"
    +message.getFoobar());
}

代码示例来源:origin: stackoverflow.com

User user = new User();
user.setId(1);
user.setName("stackover");

Message msg = new Message();
msg.setid(10);
msg.setmessage("hi");
msg.setUser(user);

HashMap<Integer, Message> map = new HashMap<>();                 
map.add(new Integer(msg.getId()), msg);

boolean isItInMapById = map.containsKey(new Integer(10));
boolean isItInMapByObject = map.containsValue(msg);

相关文章