Package de.fhkn.in.uce.core.concurrent

Examples of de.fhkn.in.uce.core.concurrent.ThreadGroupThreadFactory


        this.successfullAllocation = true;
        return addressAtRelayServer;
    }

    private synchronized void startMessageHandler(final int lifetime) {
        final ThreadFactory specialThreadsFactory = new ThreadGroupThreadFactory();
        final ScheduledExecutorService refreshExecutor = Executors
                .newSingleThreadScheduledExecutor(specialThreadsFactory);
        refreshExecutor.schedule(new RefreshAllocationTask(this.controlConnectionWriter, lifetime),
                Math.max(lifetime - ALLOCATION_LIFETIME_ADVANCE, ALLOCATION_LIFETIME_MIN), TimeUnit.SECONDS);
        this.messageHandlerTask = new MessageHandlerTask(this.controlConnection, this.controlConnectionWriter,
                this.relayServerSocketAddress, this.socketQueue, refreshExecutor);
        specialThreadsFactory.newThread(this.messageHandlerTask).start();
    }
View Full Code Here


    public HolePuncher(final ConnectionListener connectionListener, final SocketAddress localBinding,
            final BlockingQueue<Socket> socketQueue) {
        this.connectionListener = connectionListener;
        this.localBinding = localBinding;
        this.socketQueue = socketQueue;
        this.executor = Executors.newCachedThreadPool(new ThreadGroupThreadFactory());
    }
View Full Code Here

    public HolePunchingTarget(final Socket controlConnection, final String targetId) {
        // this.mediatorSocketAddress = mediatorSocketAddress;
        this.socketToMediator = controlConnection;
        this.targetId = targetId;
        this.socketQueue = new LinkedBlockingQueue<Socket>();
        this.threadFactory = new ThreadGroupThreadFactory();
        this.started = false;
    }
View Full Code Here

     */
    public ConnectionListener(final InetAddress bindingAddress, final int bindingPort) {
        this.bindingAddress = bindingAddress;
        this.bindingPort = bindingPort;
        this.exchangers = new Hashtable<SocketAddress, BlockingQueue<Socket>>();
        this.executor = Executors.newSingleThreadExecutor(new ThreadGroupThreadFactory());
    }
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.core.concurrent.ThreadGroupThreadFactory

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.