Package org.apache.james.mpt

Examples of org.apache.james.mpt.ProtocolSessionBuilder


     */
    public void run() throws Exception {
       System.out.println("Running " + file + " against " + host + ":"  + port + "...");
      
       final ExternalHostSystem host = new ExternalHostSystem(this.host, port, monitor, shabang, null);
       final ProtocolSessionBuilder builder = new ProtocolSessionBuilder();
       final Runner runner = new Runner();
      
       builder.addProtocolLines(file.getName(), new FileInputStream(file), runner.getTestElements());
       runner.runSessions(host);
    }
View Full Code Here


            final AddUser userAdder = (AddUser) it.next();
            userAdder.execute();
        }
       
        final ExternalHostSystem host = new ExternalHostSystem(getHost(), getPort(), this, getShabang(), null);
        final ProtocolSessionBuilder builder = new ProtocolSessionBuilder();
       
        if (scripts == null) {
            scripts = new Union();
            scripts.add(new FileResource(script));
        }
       
        for (final Iterator it=scripts.iterator();it.hasNext();) {
            final Resource resource = (Resource) it.next();
            try {
                final Runner runner = new Runner();
               
                try {
                   
                    final InputStream inputStream = resource.getInputStream();
                    final String name = resource.getName();
                    builder.addProtocolLines(name == null ? "[Unknown]" : name, inputStream, runner.getTestElements());
                    runner.runSessions(host);
                   
                } catch (UnsupportedOperationException e) {
                    log("Resource cannot be read: " + resource.getName(), Project.MSG_WARN);
                }
View Full Code Here

TOP

Related Classes of org.apache.james.mpt.ProtocolSessionBuilder

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.