Package org.jboss.netty.util

Examples of org.jboss.netty.util.ThreadRenamingRunnable


                    (server ? "New I/O server worker #"
                            : "New I/O client worker #") + bossId + '-' + id;

                boolean success = false;
                try {
                    executor.execute(new ThreadRenamingRunnable(this, threadName));
                    success = true;
                } finally {
                    if (!success) {
                        // Release the Selector if the execution fails.
                        try {
View Full Code Here


            future.setSuccess();
            fireChannelBound(channel, channel.getLocalAddress());

            Executor bossExecutor =
                ((NioServerSocketChannelFactory) channel.getFactory()).bossExecutor;
            bossExecutor.execute(new ThreadRenamingRunnable(
                    new Boss(channel),
                    "New I/O server boss #" + id +" (channelId: " + channel.getId() +
                    ", " + channel.getLocalAddress() + ')'));
            bossStarted = true;
        } catch (Throwable t) {
View Full Code Here

                    }

                    // Start the worker thread with the new Selector.
                    boolean success = false;
                    try {
                        bossExecutor.execute(new ThreadRenamingRunnable(
                                this, "New I/O client boss #" + id));
                        success = true;
                    } finally {
                        if (!success) {
                            // Release the Selector if the execution fails.
View Full Code Here

                fireChannelBound(channel, channel.getLocalAddress());
            }
            fireChannelConnected(channel, channel.getRemoteAddress());

            // Start the business.
            workerExecutor.execute(new ThreadRenamingRunnable(
                    new OioWorker(channel),
                    "Old I/O client worker (channelId: " + channel.getId() + ", " +
                    channel.getLocalAddress() + " => " +
                    channel.getRemoteAddress() + ')'));
View Full Code Here

            // Fire events
            future.setSuccess();
            fireChannelBound(channel, channel.getLocalAddress());

            // Start the business.
            workerExecutor.execute(new ThreadRenamingRunnable(
                    new OioDatagramWorker(channel),
                    "Old I/O datagram worker (channelId: " + channel.getId() + ", " +
                    channel.getLocalAddress() + ')'));

            workerStarted = true;
View Full Code Here

                "Old I/O datagram worker (channelId: " + channel.getId() + ", " +
                channel.getLocalAddress() + " => " +
                channel.getRemoteAddress() + ')';
            if (!bound) {
                // Start the business.
                workerExecutor.execute(new ThreadRenamingRunnable(
                        new OioDatagramWorker(channel), threadName));
            } else {
                // Worker started by bind() - just rename.
                Thread workerThread = channel.workerThread;
                if (workerThread != null) {
View Full Code Here

                fireChannelBound(channel, channel.getLocalAddress());
            }
            fireChannelConnected(channel, channel.getRemoteAddress());

            // Start the business.
            workerExecutor.execute(new ThreadRenamingRunnable(
                    new HttpTunnelWorker(channel),
                    "Old I/O client worker (channelId: " + channel.getId() + ", " +
                    channel.getLocalAddress() + " => " +
                    channel.getRemoteAddress() + ')'));
View Full Code Here

            future.setSuccess();
            fireChannelBound(channel, channel.getLocalAddress());

            Executor bossExecutor =
                ((NioServerSocketChannelFactory) channel.getFactory()).bossExecutor;
            bossExecutor.execute(new ThreadRenamingRunnable(
                    new Boss(channel),
                    "New I/O server boss #" + id +" (channelId: " + channel.getId() +
                    ", " + channel.getLocalAddress() + ')'));
            bossStarted = true;
        } catch (Throwable t) {
View Full Code Here

                    channel.socket.register(selector, SelectionKey.OP_CONNECT, channel);
                } catch (ClosedChannelException e) {
                    throw new ChannelException(
                            "Failed to register a socket to the selector.", e);
                }
                bossExecutor.execute(new ThreadRenamingRunnable(
                        this, "New I/O client boss #" + id));
            } else {
                synchronized (selectorGuard) {
                    selector.wakeup();
                    try {
View Full Code Here

            super();
        }

        int autodetectWithTimeout() {
            final BlockingQueue<Integer> resultQueue = new LinkedBlockingQueue<Integer>();
            Runnable detector = new ThreadRenamingRunnable(new Runnable() {
                public void run() {
                    int level = -1;
                    try {
                        level = autodetectWithoutTimeout();
                    } finally {
View Full Code Here

TOP

Related Classes of org.jboss.netty.util.ThreadRenamingRunnable

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.