Package com.jcabi.log

Examples of com.jcabi.log.VerboseRunnable


    @SuppressWarnings("PMD.DoNotUseThreads")
    public void startsAndListensOnPort() throws Exception {
        final int port = PortMocker.reserve();
        final CountDownLatch done = new CountDownLatch(1);
        final Thread thread = new Thread(
            new VerboseRunnable(
                new Callable<Void>() {
                    @Override
                    public Void call() throws Exception {
                        try {
                            Main.main(new String[]{Integer.toString(port)});
View Full Code Here


        final HttpResponse response = new HttpResponse().withBody(res);
        final ServerSocket server = new ServerSocket(0);
        final CountDownLatch done = new CountDownLatch(1);
        final StringBuffer received = new StringBuffer(Tv.HUNDRED);
        new Thread(
            new VerboseRunnable(
                new Callable<Void>() {
                    @Override
                    public Void call() throws Exception {
                        final Socket reading = server.accept();
                        received.append(
View Full Code Here

        throws IOException {
        this.server = new ServerSocket(port);
        this.secured = SSLServerSocketFactory.getDefault()
            .createServerSocket(sslport);
        final HttpThread thread = new HttpThread(this.sockets, hosts);
        final Runnable runnable = new VerboseRunnable(
            new HttpFacade.HttpThreadRunnable(thread), true, false
        );
        for (int idx = 0; idx < HttpFacade.THREADS; ++idx) {
            this.backend.scheduleWithFixedDelay(
                runnable,
View Full Code Here

    /**
     * Start listening to the ports.
     */
    public void listen() {
        this.frontend.scheduleWithFixedDelay(
            new VerboseRunnable(
                new Runnable() {
                    @Override
                    public void run() {
                        HttpFacade.this.process(HttpFacade.this.server);
                    }
                }
            ),
            0L, 1L, TimeUnit.NANOSECONDS
        );
        this.frontend.scheduleWithFixedDelay(
            new VerboseRunnable(
                new Runnable() {
                    @Override
                    public void run() {
                        HttpFacade.this.process(HttpFacade.this.secured);
                    }
View Full Code Here

TOP

Related Classes of com.jcabi.log.VerboseRunnable

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.