Package org.subethamail.wiser

Examples of org.subethamail.wiser.Wiser


    protected void setUp() throws Exception {
        ChainedProperties props = new ChainedProperties( "email.conf", ClassLoaderUtil.getClassLoader( null, getClass(), false ));
        emailHost = props.getProperty( "host", "localhost" );
        emailPort = props.getProperty( "port", "2345" );
       
        wiser = new Wiser();
        wiser.setHostname( emailHost );
        wiser.setPort( Integer.parseInt( emailPort ) );
        wiser.start();
    }
View Full Code Here


    client = new TaskClient(new JMSTaskClientConnector("client 1",
                new JMSTaskClientHandler(SystemEventListenerFactory.getSystemEventListener()),
                clientProperties, context));
    client.connect();

        setWiser(new Wiser());
        getWiser().setHostname(getEmailHost());
        getWiser().setPort(Integer.parseInt(getEmailPort()));        
        getWiser().start();
 
  }
View Full Code Here

        client = new TaskClient(new JMSTaskClientConnector("client 1",
        new JMSTaskClientHandler(SystemEventListenerFactory.getSystemEventListener()),
        clientProperties, context));
        client.connect();

    setWiser(new Wiser());
    getWiser().setHostname(getConf().getProperty("mail.smtp.host"));
    getWiser().setPort(Integer.parseInt(getConf().getProperty("mail.smtp.port")));       
    getWiser().start();
  }
View Full Code Here

        client = new TaskClient(new HornetQTaskClientConnector("client 1",
                  new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
        client.connect("127.0.0.1", 5446);

        setWiser(new Wiser());
        getWiser().setHostname(getEmailHost());
        getWiser().setPort(Integer.parseInt(getEmailPort()));        
        getWiser().start();
    }
View Full Code Here

    client = new TaskClient(new HornetQTaskClientConnector("client 1",
                new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
    client.connect("127.0.0.1", 5446);

    setWiser(new Wiser());
    getWiser().setHostname(getConf().getProperty("mail.smtp.host"));
    getWiser().setPort(Integer.parseInt(getConf().getProperty("mail.smtp.port")));       
    getWiser().start();
  }
View Full Code Here

    client = new TaskClient(new MinaTaskClientConnector("client 1",
            new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
    client.connect("127.0.0.1", 9123);

    setWiser(new Wiser());
    getWiser().setHostname(getEmailHost());
    getWiser().setPort( Integer.parseInt(getEmailPort()));        
    getWiser().start();
  }
View Full Code Here

    client = new TaskClient(new MinaTaskClientConnector("client 1",
                new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
    client.connect("127.0.0.1", 9123);

    setWiser(new Wiser());
    getWiser().setHostname(getConf().getProperty("mail.smtp.host"));
    getWiser().setPort(Integer.parseInt(getConf().getProperty("mail.smtp.port")));       
    getWiser().start();
  }
View Full Code Here

    * We restart SMTP after each Method, because Wiser doesn't have mechanism to flush recieved emails.
    */
   @BeforeMethod
   public void startSMTP()
   {
      wiser = new Wiser();
      wiser.setPort(2525);
      wiser.start();
   }
View Full Code Here

  /** */
  @Override
  protected void setUp() throws Exception
  {
    super.setUp();
    this.server = new Wiser();
    this.server.setPort(SMTP_PORT);
    this.server.start();
  }
View Full Code Here

  }

  /** */
  public void testTimeout() throws Exception
  {
    Wiser wiser = new Wiser();
    wiser.setPort(PORT);
    wiser.getServer().setConnectionTimeout(1000);

    wiser.start();

    Socket sock = new Socket(InetAddress.getLocalHost(), PORT);
    OutputStream out = sock.getOutputStream();
    PrintWriter writer = new PrintWriter(new OutputStreamWriter(out));

    writer.print("HELO foo\r\n");
    assert(!writer.checkError());

    Thread.sleep(2000);

    writer.print("HELO bar\r\n");
    assert(writer.checkError());

    wiser.stop();
  }
View Full Code Here

TOP

Related Classes of org.subethamail.wiser.Wiser

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.