Package org.apache.directory.server.dns.protocol

Examples of org.apache.directory.server.dns.protocol.DnsProtocolHandler


            setTransports( transport );

            DatagramAcceptor acceptor = transport.getAcceptor();

            // Set the handler
            acceptor.setHandler( new DnsProtocolHandler( this, store ) );

            // Allow the port to be reused even if the socket is in TIME_WAIT state
            ( ( DatagramSessionConfig ) acceptor.getSessionConfig() ).setReuseAddress( true );

            // Start the listener
            acceptor.bind();
        }
        else
        {
            for ( Transport transport : transports )
            {
                // Get the acceptor
                IoAcceptor acceptor = transport.getAcceptor();

                // Set the handler
                acceptor.setHandler( new DnsProtocolHandler( this, store ) );

                if ( transport instanceof UdpTransport )
                {
                    // Allow the port to be reused even if the socket is in TIME_WAIT state
                    ( ( DatagramSessionConfig ) acceptor.getSessionConfig() ).setReuseAddress( true );
View Full Code Here


            setTransports( transport );
           
            DatagramAcceptor acceptor = (DatagramAcceptor)transport.getAcceptor();

            // Set the handler
            acceptor.setHandler( new DnsProtocolHandler( this, store ) );
   
            // Allow the port to be reused even if the socket is in TIME_WAIT state
            ((DatagramSessionConfig)acceptor.getSessionConfig()).setReuseAddress( true );
           
            // Start the listener
            acceptor.bind();
        }
        else
        {
            for ( Transport transport:transports )
            {
                // Get the acceptor
                IoAcceptor acceptor = transport.getAcceptor();
   
                // Set the handler
                acceptor.setHandler( new DnsProtocolHandler( this, store ) );
       
                if ( transport instanceof UdpTransport )
                {
                // Allow the port to be reused even if the socket is in TIME_WAIT state
                    ((DatagramSessionConfig)acceptor.getSessionConfig()).setReuseAddress( true );
View Full Code Here

        UdpTransport transport = new UdpTransport("127.0.0.1", PORT);
        setTransports( transport );

        DatagramAcceptor acceptor = transport.getAcceptor();

        acceptor.setHandler(new DnsProtocolHandler(this, store) {
            @Override
            public void sessionCreated( IoSession session ) throws Exception {
                // USe our own codec to support AAAA testing
                session.getFilterChain().addFirst( "codec",
                        new ProtocolCodecFilter(new TestDnsProtocolUdpCodecFactory()));
View Full Code Here

            setTransports( transport );
           
            DatagramAcceptor acceptor = (DatagramAcceptor)transport.getAcceptor();

            // Set the handler
            acceptor.setHandler( new DnsProtocolHandler( this, store ) );
   
            // Allow the port to be reused even if the socket is in TIME_WAIT state
            ((DatagramSessionConfig)acceptor.getSessionConfig()).setReuseAddress( true );
           
            // Start the listener
            acceptor.bind();
        }
        else
        {
            for ( Transport transport:transports )
            {
                // Get the acceptor
                IoAcceptor acceptor = transport.getAcceptor();
   
                // Set the handler
                acceptor.setHandler( new DnsProtocolHandler( this, store ) );
       
                if ( transport instanceof UdpTransport )
                {
                // Allow the port to be reused even if the socket is in TIME_WAIT state
                    ((DatagramSessionConfig)acceptor.getSessionConfig()).setReuseAddress( true );
View Full Code Here

            setTransports( transport );

            DatagramAcceptor acceptor = ( DatagramAcceptor ) transport.getAcceptor();

            // Set the handler
            acceptor.setHandler( new DnsProtocolHandler( this, store ) );

            // Allow the port to be reused even if the socket is in TIME_WAIT state
            ( ( DatagramSessionConfig ) acceptor.getSessionConfig() ).setReuseAddress( true );

            // Start the listener
            acceptor.bind();
        }
        else
        {
            for ( Transport transport : transports )
            {
                // Get the acceptor
                IoAcceptor acceptor = transport.getAcceptor();

                // Set the handler
                acceptor.setHandler( new DnsProtocolHandler( this, store ) );

                if ( transport instanceof UdpTransport )
                {
                    // Allow the port to be reused even if the socket is in TIME_WAIT state
                    ( ( DatagramSessionConfig ) acceptor.getSessionConfig() ).setReuseAddress( true );
View Full Code Here

            setTransports( transport );
           
            DatagramAcceptor acceptor = (DatagramAcceptor)transport.getAcceptor();

            // Set the handler
            acceptor.setHandler( new DnsProtocolHandler( this, store ) );
   
            // Allow the port to be reused even if the socket is in TIME_WAIT state
            ((DatagramSessionConfig)acceptor.getSessionConfig()).setReuseAddress( true );
           
            // Start the listener
            acceptor.bind();
        }
        else
        {
            for ( Transport transport:transports )
            {
                // Get the acceptor
                IoAcceptor acceptor = transport.getAcceptor();
   
                // Set the handler
                acceptor.setHandler( new DnsProtocolHandler( this, store ) );
       
                if ( transport instanceof UdpTransport )
                {
                // Allow the port to be reused even if the socket is in TIME_WAIT state
                    ((DatagramSessionConfig)acceptor.getSessionConfig()).setReuseAddress( true );
View Full Code Here

    UdpTransport transport = new UdpTransport("127.0.0.1", PORT);
    setTransports( transport );

    DatagramAcceptor acceptor = transport.getAcceptor();

    acceptor.setHandler(new DnsProtocolHandler(this, store) {
      @Override
      public void sessionCreated( IoSession session ) throws Exception {
        // USe our own codec to support AAAA testing
        session.getFilterChain().addFirst( "codec",
          new ProtocolCodecFilter(new TestDnsProtocolUdpCodecFactory()));
View Full Code Here

TOP

Related Classes of org.apache.directory.server.dns.protocol.DnsProtocolHandler

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.