Package org.apache.mina.filter.logging

Examples of org.apache.mina.filter.logging.LoggingFilter


        acceptor.setCloseOnDeactivation(true);
        // reuse address is default true for datagram
        //acceptor.getFilterChain().addLast("threadPool",
        //                                  new ExecutorFilter(this.getEndpoint().getCamelContext().getExecutorServiceStrategy().newDefaultThreadPool(this, "MinaThreadPool")));
        if (minaLogger) {
            acceptor.getFilterChain().addLast("logger", new LoggingFilter());
        }
        appendIoFiltersToChain(filters, acceptor.getFilterChain());
    }
View Full Code Here


        // connector config
        connectorConfig = connector.getSessionConfig();
        connector.getFilterChain().addLast("threadPool",
                                           new ExecutorFilter(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaThreadPool")));
        if (minaLogger) {
            connector.getFilterChain().addLast("logger", new LoggingFilter());
        }
        appendIoFiltersToChain(filters, connector.getFilterChain());
        configureCodecFactory("Mina2Producer", connector);
        // set connect timeout to mina in seconds
        connector.setConnectTimeoutMillis(timeout);
View Full Code Here

            new NioProcessor(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaDatagramConnector")));
        connectorConfig = connector.getSessionConfig();
        connector.getFilterChain().addLast("threadPool",
                                           new ExecutorFilter(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaThreadPool")));
        if (minaLogger) {
            connector.getFilterChain().addLast("logger", new LoggingFilter());
        }
        appendIoFiltersToChain(filters, connector.getFilterChain());
        configureDataGramCodecFactory("Mina2Producer", connector, configuration);
        // set connect timeout to mina in seconds
        connector.setConnectTimeoutMillis(timeout);
View Full Code Here

        running = true;

        acceptor = new NioSocketAcceptor();

        acceptor.getFilterChain().addLast( "logger",
                                           new LoggingFilter() );
        acceptor.getFilterChain().addLast( "codec",
                                           new ProtocolCodecFilter( new ObjectSerializationCodecFactory() ) );

        acceptor.setHandler( handler );
        acceptor.getSessionConfig().setReadBufferSize( 2048 );
View Full Code Here

        connector.setProxyIoSession(proxyIoSession);

        socketConnector.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);

        connector.getFilterChain().addLast("logger", new LoggingFilter());

        // This command is sent when using a socks proxy to request a page from the web server.
        String cmd = "GET " + url.toExternalForm() + " HTTP/1.0"
                + HttpProxyConstants.CRLF + HttpProxyConstants.CRLF;
View Full Code Here

    public static void main(String[] args) throws Exception {

        NioTcpServer httpServer = new NioTcpServer();

        httpServer.setFilters(new LoggingFilter("INCOMING"),
                new ProtocolCodecFilter<HttpPdu, ByteBuffer, Void, HttpDecoderState>(new HttpServerEncoder(),
                        new HttpServerDecoder()), new LoggingFilter("DECODED"), new DummyHttpSever());

        httpServer.getSessionConfig().setTcpNoDelay(true);

        // Make it use https, injecting a default SSLContext instance
        httpServer.getSessionConfig().setSslContext(BogusSslContextFactory.getInstance(true));
View Full Code Here

    public static void main(String[] args) throws Exception {

        NioTcpServer httpServer = new NioTcpServer();
        httpServer.setReuseAddress(true);
        httpServer.setFilters(new LoggingFilter("INCOMING"),
                new ProtocolCodecFilter<HttpPdu, ByteBuffer, Void, HttpDecoderState>(new HttpServerEncoder(),
                        new HttpServerDecoder()), new LoggingFilter("DECODED"), new DummyHttpSever());

        httpServer.getSessionConfig().setTcpNoDelay(true);

        httpServer.bind(new InetSocketAddress(8080));
View Full Code Here

        LOG.info("starting echo server");

        final NioUdpServer server = new NioUdpServer();

        // create the filter chain for this service
        server.setFilters(new LoggingFilter("LoggingFilter1"), new IoFilter() {

            @Override
            public void sessionOpened(final IoSession session) {
                LOG.info("session {} open", session);
            }
View Full Code Here

        address = new VmPipeAddress(configuration.getPort());
        connector = new VmPipeConnector();

        // connector config
        if (minaLogger) {
            connector.getFilterChain().addLast("logger", new LoggingFilter());
        }
        appendIoFiltersToChain(filters, connector.getFilterChain());
        if (configuration.getSslContextParameters() != null) {
            LOG.warn("Using vm protocol"
                     + ", but an SSLContextParameters instance was provided.  SSLContextParameters is only supported on the TCP protocol.");
View Full Code Here

        // 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) {
            connector.getFilterChain().addFirst("sslFilter", new SslFilter(configuration.getSslContextParameters().createSSLContext(), configuration.isAutoStartTls()));
        }
View Full Code Here

TOP

Related Classes of org.apache.mina.filter.logging.LoggingFilter

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.