Examples of ExecutorFilter


Examples of org.apache.mina.filter.executor.ExecutorFilter

                .getProtocolCodecFactory() ) );

            // Now inject an ExecutorFilter for the write operations
            // We use the same number of thread than the number of IoProcessor
            // (NOTE : this has to be double checked)
            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "executor", new ExecutorFilter(
                new UnorderedThreadPoolExecutor( transport.getNbThreads() ), IoEventType.MESSAGE_RECEIVED ) );

            /*
            // Trace all the incoming and outgoing message to the console
            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "logger", new IoFilterAdapter()
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

        if (_protectIO)
        {
            //Add IO Protection Filters
            IoFilterChain chain = protocolSession.getFilterChain();

            protocolSession.getFilterChain().addLast("tempExecutorFilterForFilterBuilder", new ExecutorFilter());

            ReadThrottleFilterBuilder readfilter = new ReadThrottleFilterBuilder();
            readfilter.setMaximumConnectionBufferSize(_config.getReceiveBufferSize());
            readfilter.attach(chain);
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

            try {
                // Create SocketAcceptor with correct number of processors
                sslSocketAcceptor = buildSocketAcceptor();
                // Customize Executor that will be used by processors to process incoming stanzas
                int eventThreads = JiveGlobals.getIntProperty("xmpp.client_ssl.processing.threads", 16);
                ExecutorFilter executorFilter = new ExecutorFilter();
                ThreadPoolExecutor eventExecutor = (ThreadPoolExecutor)executorFilter.getExecutor();
                final ThreadFactory originalThreadFactory = eventExecutor.getThreadFactory();
                ThreadFactory newThreadFactory = new ThreadFactory()
                {
                    private final AtomicInteger threadId = new AtomicInteger( 0 );
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

                    tmpMsgRead += (readMessages - sessStat.lastMessageRead);
                    tmpBytesWritten += (writtenBytes - sessStat.lastByteWrite);
                    tmpBytesRead += (readBytes - sessStat.lastByteRead);
                    tmpScheduledWrites += session.getScheduledWriteRequests();

                    ExecutorFilter executorFilter =
                            (ExecutorFilter) session.getFilterChain().get(ExecutorThreadModel.class.getName());
                    if (executorFilter != null) {
                        tmpQueuevedEvents += executorFilter.getEventQueueSize(session);
                    }

                    sessStat.lastByteRead = readBytes;
                    sessStat.lastByteWrite = writtenBytes;
                    sessStat.lastMessageRead = readMessages;
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

        // connector config
        connectorConfig = connector.getSessionConfig();

        // using the unordered thread pool is fine as we dont need ordered invocation in our response handler
        workerPool = new UnorderedThreadPoolExecutor(configuration.getMaximumPoolSize());
        connector.getFilterChain().addLast("threadPool", new ExecutorFilter(workerPool));
        if (minaLogger) {
            connector.getFilterChain().addLast("logger", new LoggingFilter());
        }
        appendIoFiltersToChain(filters, connector.getFilterChain());
        if (configuration.getSslContextParameters() != null) {
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

        connector = new NioDatagramConnector(processorCount);

        // using the unordered thread pool is fine as we dont need ordered invocation in our response handler
        workerPool = new UnorderedThreadPoolExecutor(configuration.getMaximumPoolSize());
        connectorConfig = connector.getSessionConfig();
        connector.getFilterChain().addLast("threadPool", new ExecutorFilter(workerPool));
        if (minaLogger) {
            connector.getFilterChain().addLast("logger", new LoggingFilter());
        }
        appendIoFiltersToChain(filters, connector.getFilterChain());
        if (configuration.getSslContextParameters() != null) {
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

           
            // Now inject an ExecutorFilter for the write operations
            // We use the same number of thread than the number of IoProcessor
            // (NOTE : this has to be double checked)
            ((DefaultIoFilterChainBuilder)chain).addLast( "executor",
                    new ExecutorFilter(
                        new UnorderedThreadPoolExecutor( transport.getNbThreads() ),
                        IoEventType.MESSAGE_RECEIVED ) );

            /*
             * The server is now initialized, we can
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

                .getProtocolCodecFactory() ) );

            // Now inject an ExecutorFilter for the write operations
            // We use the same number of thread than the number of IoProcessor
            // (NOTE : this has to be double checked)
            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "executor", new ExecutorFilter(
                new UnorderedThreadPoolExecutor( transport.getNbThreads() ), IoEventType.MESSAGE_RECEIVED ) );

            /*
            // Trace all the incoming and outgoing message to the console
            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "logger", new IoFilterAdapter()
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

                .getProtocolCodecFactory() ) );

            // Now inject an ExecutorFilter for the write operations
            // We use the same number of thread than the number of IoProcessor
            // (NOTE : this has to be double checked)
            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "executor", new ExecutorFilter(
                new UnorderedThreadPoolExecutor( transport.getNbThreads() ), IoEventType.MESSAGE_RECEIVED ) );

            /*
            // Trace all the incoming and outgoing message to the console
            ( ( DefaultIoFilterChainBuilder ) chain ).addLast( "logger", new IoFilterAdapter()
View Full Code Here

Examples of org.apache.mina.filter.executor.ExecutorFilter

            {
//        //Add IO Protection Filters
                IoFilterChain chain = protocolSession.getFilterChain();


                protocolSession.getFilterChain().addLast("tempExecutorFilterForFilterBuilder", new ExecutorFilter());

                ReadThrottleFilterBuilder readfilter = new ReadThrottleFilterBuilder();
                readfilter.setMaximumConnectionBufferSize(BUFFER_READ_LIMIT_SIZE);
                readfilter.attach(chain);
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.