Examples of parseMessage()


Examples of com.google.appengine.api.xmpp.XMPPService.parseMessage()

  private static final Logger log = Logger.getLogger(PullwishFromGTalk.class.getName());

  public void doPost(HttpServletRequest req, HttpServletResponse res)
      throws IOException {
    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
    Message message = xmpp.parseMessage(req);
    JID fromJid = message.getFromJid();
    String body = message.getBody();
    Message msg;

    try {
View Full Code Here

Examples of com.google.appengine.api.xmpp.XMPPService.parseMessage()

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
        throws IOException {
        XMPPService xmppService = XMPPServiceFactory.getXMPPService();
        Message message = xmppService.parseMessage(req);

        log.info("Chat received: " + message.getStanza());

        Entity entity = new Entity("XmppMsg", "test");
        entity.setProperty("type", message.getMessageType().toString());
View Full Code Here

Examples of com.google.appengine.api.xmpp.XMPPService.parseMessage()

    public void doPost(HttpServletRequest req, HttpServletResponse res)
          throws IOException {
        XMPPService xmpp = XMPPServiceFactory.getXMPPService();

        // receive message
        Message message = xmpp.parseMessage(req);
        JID from = message.getFromJid();
        JID[] recipients = message.getRecipientJids();
        JID to = (recipients.length > 0) ? recipients[0] : null;
       
        String body = message.getBody();
View Full Code Here

Examples of com.google.appengine.api.xmpp.XMPPService.parseMessage()

    public void doPost(HttpServletRequest req, HttpServletResponse res)
          throws IOException {
        XMPPService xmpp = XMPPServiceFactory.getXMPPService();

        // receive message
        Message message = xmpp.parseMessage(req);
        JID from = message.getFromJid();
        JID[] recipients = message.getRecipientJids();
        JID to = (recipients.length > 0) ? recipients[0] : null;
       
        String body = message.getBody();
View Full Code Here

Examples of com.google.appengine.api.xmpp.XMPPService.parseMessage()

  public void doPost(HttpServletRequest req, HttpServletResponse res)
      throws IOException {
    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
   
    // receive message
    Message message = xmpp.parseMessage(req);
    JID from = message.getFromJid();
    JID[] recipients = message.getRecipientJids();
    JID to = (recipients.length > 0) ? recipients[0] : null;
   
    String body = message.getBody();
View Full Code Here

Examples of org.apache.james.mime4j.dom.MessageBuilder.parseMessage()

    assertStructure();
  }

  private void assertSaveMessage(String messageFile) throws MimeException, IOException, FileNotFoundException {
    MessageBuilder builder = new DefaultMessageBuilder();
    Message msg = builder.parseMessage(new FileInputStream(new File(TU.TEST_FOLDER, messageFile)));

    store.save(msg);

    final Resource r = resolver.getResource(getResourcePath(msg, store));
    assertNotNull("Expecting non-null Resource", r);
View Full Code Here

Examples of org.apache.james.mime4j.dom.MessageBuilder.parseMessage()

    public Message next() {
      MessageBuilder builder = new DefaultMessageBuilder();
      Message message = null;
      try {
        message = builder.parseMessage(new ByteArrayInputStream(mboxIterator.next().toString().getBytes(MailArchiveServerConstants.DEFAULT_ENCODER.charset().name())));
      } catch (MimeException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of org.apache.james.mime4j.dom.MessageBuilder.parseMessage()

        public void run(byte[] content, int repetitions) throws Exception {
            DefaultStorageProvider.setInstance(new MemoryStorageProvider());
            MessageBuilder builder = new DefaultMessageBuilder();

            for (int i = 0; i < repetitions; i++) {
                builder.parseMessage(new ByteArrayInputStream(content));
            }
        }
    }

    /*
 
View Full Code Here

Examples of org.apache.james.mime4j.dom.MessageBuilder.parseMessage()

    }

    public static void main(String[] args) {
        try {
            final MessageBuilder builder = new DefaultMessageBuilder();
            final Message message = builder.parseMessage(new FileInputStream(args[0]));

            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI(message);
                }
View Full Code Here

Examples of org.apache.james.mime4j.dom.MessageBuilder.parseMessage()

     * @throws MimeIOException
     *                 on MIME protocol violations.
     */
    public Message(InputStream is) throws IOException, MimeException {
        MessageBuilder mb = newMessageBuilder().newMessageBuilder();
        org.apache.james.mime4j.dom.Message mImpl = mb.parseMessage(new EOLConvertingInputStream(is));
       
        this.message = mImpl;
    }

    private MessageServiceFactory newMessageBuilder() throws MimeException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.