Package org.tubo.exception

Examples of org.tubo.exception.TuboConsumerLoaderException


        try {
            serverSocket = new ServerSocket(this.port);
            log.info("Server Socket Consumer "+manager.getId()+" is listening on port "+this.port);
        } catch (IOException e) {
            state = STATE_ERROR;
            lastException = new TuboConsumerLoaderException("Error creating ServerSocket",e);
            throw lastException;
        }
        //
        // set wait time for client connection when timeout is expired
        // accept() throw a SocketTimeoutException
        try {
            //FIXME: put this configuration on config file
            serverSocket.setSoTimeout(5*1000);
        } catch (SocketException e) {
            state = STATE_ERROR;
            lastException = new TuboConsumerLoaderException("Error setting accept Timeout",e);
        }
        //
        // get maxCapacity
        String smaxCapacity = manager.getProperty("maxCapacity");
        int maxCapacity;
View Full Code Here


                    //
                    // if timeout is throw then chek if is running and accept again
                    continue;
                } catch(SocketException e) {
                    state = STATE_ERROR;
                    lastException = new TuboConsumerLoaderException("Error on TCP",e);
                    break;
                } catch(IOException e) {
                    state = STATE_ERROR;
                    lastException = new TuboConsumerLoaderException("IO Error",e);
                    break;
                } catch(SecurityException e) {
                    state = STATE_ERROR;
                    lastException = new TuboConsumerLoaderException("Security Error",e);
                    break;
                } catch(IllegalBlockingModeException e) {
                    state = STATE_ERROR;
                    lastException = new TuboConsumerLoaderException("Blocking Mode Error",e);
                    break;
                }

                if (isRunning()) {
                    //
                    // get a consumer for this socket (client)
                    ServerSocketConsumer consumer = null;
                    try {
                        consumer = (ServerSocketConsumer)manager.getConsumer();
                    } catch (TuboResourceException e) {
                        state = STATE_ERROR;
                        lastException = new TuboConsumerLoaderException("Error getting consumer",e);
                        break;
                    }
                    //
                    // create a process thread for this socket
                    ServerSocketConsumerWorker consumerWorker = new ServerSocketConsumerWorker(socket,consumer,manager);
View Full Code Here

TOP

Related Classes of org.tubo.exception.TuboConsumerLoaderException

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.