Examples of FetchProfile


Examples of javax.mail.FetchProfile

      if (DebugFile.trace) DebugFile.writeln("Folder.getMessages("+String.valueOf(iTotalCount)+")");

      Message[] aMsgsObj = oFldr.getMessages();

      FetchProfile oFtchPrfl = new FetchProfile();
      oFtchPrfl.add(FetchProfile.Item.ENVELOPE);
      oFtchPrfl.add(FetchProfile.Item.CONTENT_INFO);
      oFtchPrfl.add(FetchProfile.Item.FLAGS);
      oFtchPrfl.add("X-Priority");
      oFtchPrfl.add("X-Spam-Flag");

      if (DebugFile.trace) {
        DebugFile.writeln("Folder.fetch(Message[], ENVELOPE & CONTENT_INFO & FLAGS)");
        oChMeter.start();
      }
View Full Code Here

Examples of javax.mail.FetchProfile

         // Attributes & Flags for all messages ..
         Message[] msgs = folder.getMessages();

         // Use a suitable FetchProfile
         FetchProfile fp = new FetchProfile();
         fp.add(FetchProfile.Item.ENVELOPE);
         fp.add(FetchProfile.Item.FLAGS);
         fp.add("X-Mailer");
         folder.fetch(msgs, fp);

         for (int i = 0; i < msgs.length; i++) {
            int level = 0;
            System.out.println("\n=========MESSAGE #" + (i + 1) + ":=================");
View Full Code Here

Examples of javax.mail.FetchProfile

            addResult(aFolder);

            Message[] messages = aFolder.getMessages();

            // Use a suitable FetchProfile
            FetchProfile fp = new FetchProfile();
            fp.add(FetchProfile.Item.ENVELOPE);
            fp.add(FetchProfile.Item.FLAGS);
            fp.add("X-Mailer");
            aFolder.fetch(messages, fp);

            // add all messages to the result
            addResult(messages);
View Full Code Here

Examples of javax.mail.FetchProfile

  private static void fetchHeaderInfo(RewriteContext hr,Message[] msgs,
                                      EmailConnection tmpEmailConn,
                                      String headerlist) throws MessagingException {

    Properties props = hr.request.props;
    FetchProfile fp = new FetchProfile();
    StringBuffer msgindex = new StringBuffer();
    String connHandle = getConnHandle(hr);
    StringTokenizer headerNames;
    String msgNum;
    long startmillis,endmillis;

    /* Build the prefetch profile */

    startmillis = System.currentTimeMillis();

    if (headerlist != null) {
      headerNames = new StringTokenizer(headerlist,", ");

      fp.add(FetchProfile.Item.FLAGS);

      while (headerNames.hasMoreTokens()) {
        fp.add(headerNames.nextToken());
      }
    } else {
      hr.request.log(Server.LOG_DIAGNOSTIC,connHandle,"no header list specified" +
                     " - retrieving all headers");

      fp.add(FetchProfile.Item.FLAGS);
      fp.add(FetchProfile.Item.ENVELOPE);
      fp.add(FetchProfile.Item.CONTENT_INFO);
    }

    /* Do a prefetch of the header/envelope information */

    tmpEmailConn.currentFolder.getFolder().fetch(msgs,fp);
View Full Code Here

Examples of javax.mail.FetchProfile

     * @param folder   the folder to fetch messages from
     * @param messages the messages to fetch
     * @throws MessagingException in case of JavMail errors
     */
    protected void fetchMessages(Folder folder, Message[] messages) throws MessagingException {
        FetchProfile contentsProfile = new FetchProfile();
        contentsProfile.add(FetchProfile.Item.ENVELOPE);
        contentsProfile.add(FetchProfile.Item.CONTENT_INFO);
        contentsProfile.add(FetchProfile.Item.FLAGS);
        folder.fetch(messages, contentsProfile);
    }
View Full Code Here

Examples of javax.mail.FetchProfile

  {
    if (_holdsMessages)
    {
      if (_messageListModel == null)
      {
        FetchProfile fetchProfile = new FetchProfile();
        fetchProfile.add(FetchProfile.Item.ENVELOPE);
        fetchProfile.add(FetchProfile.Item.FLAGS);
        _messageListModel = new MessageDataModel(_folder,
                                                 fetchProfile,
                                                 _MESSAGE_LOAD_BLOCK_SIZE);
      }
View Full Code Here

Examples of javax.mail.FetchProfile

            addResult(aFolder);

            Message[] messages = aFolder.getMessages();

            // Use a suitable FetchProfile
            FetchProfile fp = new FetchProfile();
            fp.add(FetchProfile.Item.ENVELOPE);
            fp.add(FetchProfile.Item.FLAGS);
            fp.add("X-Mailer");
            aFolder.fetch(messages, fp);

            // add all messages to the result
            addResult(messages);
View Full Code Here

Examples of org.hibernate.annotations.FetchProfile

      }
    }
  }

  private static void bindFetchProfiles(XAnnotatedElement annotatedElement, Mappings mappings) {
    FetchProfile fetchProfileAnnotation = annotatedElement.getAnnotation( FetchProfile.class );
    FetchProfiles fetchProfileAnnotations = annotatedElement.getAnnotation( FetchProfiles.class );
    if ( fetchProfileAnnotation != null ) {
      bindFetchProfile( fetchProfileAnnotation, mappings );
    }
    if ( fetchProfileAnnotations != null ) {
View Full Code Here

Examples of org.hibernate.annotations.FetchProfile

      }
    }
  }

  private static void bindFetchProfiles(XAnnotatedElement annotatedElement, Mappings mappings) {
    FetchProfile fetchProfileAnnotation = annotatedElement.getAnnotation( FetchProfile.class );
    FetchProfiles fetchProfileAnnotations = annotatedElement.getAnnotation( FetchProfiles.class );
    if ( fetchProfileAnnotation != null ) {
      bindFetchProfile( fetchProfileAnnotation, mappings );
    }
    if ( fetchProfileAnnotations != null ) {
View Full Code Here

Examples of org.hibernate.annotations.FetchProfile

      }
    }
  }

  private static void bindFetchProfiles(XAnnotatedElement annotatedElement, Mappings mappings) {
    FetchProfile fetchProfileAnnotation = annotatedElement.getAnnotation( FetchProfile.class );
    FetchProfiles fetchProfileAnnotations = annotatedElement.getAnnotation( FetchProfiles.class );
    if ( fetchProfileAnnotation != null ) {
      bindFetchProfile( fetchProfileAnnotation, mappings );
    }
    if ( fetchProfileAnnotations != null ) {
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.