Examples of createListener()


Examples of javax.servlet.AsyncContext.createListener()

public class AsyncFooServlet extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        final AsyncContext actx = req.startAsync();
        actx.addListener(actx.createListener(QuxAsyncListener.class), req, resp);
        Executors.newSingleThreadExecutor().execute(new Runnable() {
            @Override
            public void run() {
                try {
                    Timer.startNew(100l);
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        // set the SSL configuration for the listener
        factory.setSslConfiguration(ssl.createSslConfiguration());
        factory.setImplicitSsl(true);

        // replace the default listener
        serverFactory.addListener("default", factory.createListener());
       
        PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
        userManagerFactory.setFile(new File("myusers.properties"));
       
        serverFactory.setUserManager(userManagerFactory.createUserManager());
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        dccFactory.setPassiveExternalAddress("127.0.0.1");

        listenerFactory.setDataConnectionConfiguration(dccFactory.createDataConnectionConfiguration());

        server.addListener("default", listenerFactory.createListener());
        CommandFactoryFactory cmFact = new CommandFactoryFactory();
        cmFact.setUseDefaultCommands(true);
        cmFact.addCommand("PASV", new PASVTest());
        server.setCommandFactory(cmFact.createCommandFactory());
        return server;
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

       
        // set a really short timeout
        ListenerFactory listenerFactory = new ListenerFactory(serverFactory.getListener("default"));
        listenerFactory.setIdleTimeout(1);
       
        serverFactory.addListener("default", listenerFactory.createListener());
       
        return serverFactory;
    }

    /*
 
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        ListenerFactory listenerFactory = new ListenerFactory();
        listenerFactory.setPort(0);
       
        // let's create two listeners on the same port, second should not start
    
        Listener defaultListener = listenerFactory.createListener();
        Listener secondListener = listenerFactory.createListener();
       
       
        serverFactory.addListener("default", defaultListener);
        serverFactory.addListener("second", secondListener);
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        listenerFactory.setPort(0);
       
        // let's create two listeners on the same port, second should not start
    
        Listener defaultListener = listenerFactory.createListener();
        Listener secondListener = listenerFactory.createListener();
       
       
        serverFactory.addListener("default", defaultListener);
        serverFactory.addListener("second", secondListener);
       
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        dccFactory.setPassiveExternalAddress("127.0.0.1");

        listenerFactory.setDataConnectionConfiguration(dccFactory.createDataConnectionConfiguration());

        server.addListener("default", listenerFactory.createListener());

        return server;
    }

    public void testPasvAddress() throws Exception {
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        dccFactory.setPassivePorts("12347");
        DataConnectionConfiguration dcc=dccFactory.createDataConnectionConfiguration();
       
        listenerFactory.setDataConnectionConfiguration(dcc);
       
        server.addListener("default", listenerFactory.createListener());
        return server;
    }

    public void testPasvAddress() throws Exception {
        client.login(ADMIN_USERNAME, ADMIN_PASSWORD);
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        listenerFactory
                .setDataConnectionConfiguration(createDataConnectionConfigurationFactory()
                        .createDataConnectionConfiguration());

        serverFactory.addListener("default", listenerFactory.createListener());

        PropertiesUserManagerFactory umFactory = new PropertiesUserManagerFactory();
        umFactory.setAdminName("admin");
        umFactory.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        umFactory.setFile(USERS_FILE);
View Full Code Here

Examples of org.apache.ftpserver.listener.ListenerFactory.createListener()

        List<InetAddress> blockedAddresses = new ArrayList<InetAddress>();
        blockedAddresses.add(InetAddress.getByName("localhost"));

        factory.setBlockedAddresses(blockedAddresses);

        server.addListener("default", factory.createListener());
       
        return server;
    }

    @Override
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.