Package org.apache.mina.core.service

Examples of org.apache.mina.core.service.IoAcceptor.bind()


                    success[0] = true;
                    session.close();
                }
            }
        });
        acceptor.bind(new InetSocketAddress(port));
       
        IoConnector connector = createConnector();
        connector.setHandler(new IoHandlerAdapter() {
            @Override
            public void exceptionCaught(IoSession session, Throwable cause)
View Full Code Here


    public void testConnectFutureSuccessTiming() throws Exception {
        int port = AvailablePortFinder.getNextAvailable(2025);
        IoAcceptor acceptor = createAcceptor();
        acceptor.setHandler(new IoHandlerAdapter());
        acceptor.bind(new InetSocketAddress(port));

        try {
            final StringBuffer buf = new StringBuffer();
            IoConnector connector = createConnector();
            connector.setHandler(new IoHandlerAdapter() {
View Full Code Here

       
        int port = AvailablePortFinder.getNextAvailable(4025);
        IoAcceptor acceptor = createAcceptor();
        acceptor.setHandler(new IoHandlerAdapter());
        InetSocketAddress address = new InetSocketAddress(port);
        acceptor.bind(address);

        IoConnector connector = createConnector();
        connector.setHandler(new IoHandlerAdapter() {
           @Override
            public void sessionCreated(IoSession session) throws Exception {
View Full Code Here

                    // No Nagle's algorithm
                    ( ( NioSocketAcceptor ) acceptor ).getSessionConfig().setTcpNoDelay( true );
                }

                // Start the listener
                acceptor.bind();
            }
        }

        LOG.info( "DNS service started." );
    }
View Full Code Here

                // Inject the chain
                acceptor.setFilterChainBuilder( ntpChain );

                // Start the listener
                acceptor.bind();
            }
        }

        LOG.info( "NTP server started." );
    }
View Full Code Here

                // Inject the protocol handler
                acceptor.setHandler( new KerberosProtocolHandler( this, store ) );

                // Bind to the configured address
                acceptor.bind();
            }
        }

        LOG.info( "Kerberos service started." );
    }
View Full Code Here

               
                // Set the handler
                acceptor.setHandler( new ChangePasswordProtocolHandler( this, store ) );
               
                // Bind
                acceptor.bind();
            }
        }
       
        LOG.info( "ChangePassword service started." );
        //System.out.println( "ChangePassword service started." );
View Full Code Here

               
                // Inject the protocol handler
                acceptor.setHandler( new KerberosProtocolHandler( this, store ) );
               
                // Bind to the configured address
                acceptor.bind();
            }
        }
       
        LOG.info( "Kerberos service started." );
    }
View Full Code Here

                    // No Nagle's algorithm
                    ((NioSocketAcceptor)acceptor).getSessionConfig().setTcpNoDelay( true );
                }
       
                // Start the listener
                acceptor.bind();
            }
        }

        LOG.info( "DNS service started." );
    }
View Full Code Here

               
                // Inject the chain
                acceptor.setFilterChainBuilder( ntpChain );
   
                // Start the listener
                acceptor.bind();
            }
        }
       
        LOG.info( "NTP server started." );
    }
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.