Code Search for Developers
 
 
  

IMAPClient.java from AlphaMail at Krugle


Show IMAPClient.java syntax highlighted

import java.io.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;


public class IMAPClient
{
   public static void main(String args[]) throws Exception
   {
      long start, stop;
      start = System.currentTimeMillis();
      LineNumberReader reader = new LineNumberReader(new FileReader("/tmp/imap.ior"));
      String ior = reader.readLine();

      ORB orb = ORB.init(args, null);
      org.omg.CORBA.Object objRef = orb.string_to_object(ior);

      imap server = imapHelper.narrow(objRef);

      stop = System.currentTimeMillis();
      System.out.println("Setup time: " + (stop-start) + " ms");

      start = System.currentTimeMillis();
      for(int i=0; i<1000; i++) {
         server.get_cache_id("tkay","password");
         server.get_cache_location("tkay");
      }
      stop = System.currentTimeMillis();

      System.out.println("2000 CORBA calls in " + (stop-start) + " Milliseconds");
      System.out.println(((stop-start)/2000) + " ms/call");
   }
}




See more files for this project here

AlphaMail

AlphaMail is an accelerated web mail interface with a C++ middleware layer that is more effective than an IMAP proxy which is a highly scalable (10k+ users). The interface includes modern features, Section 508 compliance, and universal browser support.

Project homepage: http://sourceforge.net/projects/alphamail
Programming language(s): C++,Java,JavaScript,Perl
License: other

  IMAPClient.java
  IMAPServer.java
  imap.idl