Package org.apache.mina.registry

Examples of org.apache.mina.registry.ServiceRegistry.bind()


        VmPipeAddress address = new VmPipeAddress( 8080 );

        // Set up server
        Service service = new Service( "tennis", TransportType.VM_PIPE, address );
        registry.bind( service, new TennisPlayer() );

        // Connect to the server.
        VmPipeConnector connector = new VmPipeConnector();
        ProtocolSession session = connector.connect( address,
                                                     new TennisPlayer() );
View Full Code Here


        ServiceRegistry registry = new SimpleServiceRegistry();

        addLogger( registry );
        // Bind
        Service service = new Service( "reverse", TransportType.SOCKET, PORT );
        registry.bind( service, new ReverseProtocolProvider() );

        System.out.println( "Listening on port " + PORT );
    }

    private static void addLogger( ServiceRegistry registry )
View Full Code Here

       
        addLogger( registry );
       
        // Bind
        Service service = new Service( "echo", TransportType.SOCKET, PORT );
        registry.bind( service, new EchoProtocolHandler() );

        System.out.println( "Listening on port " + PORT );
    }

    private static void addSSLSupport( ServiceRegistry registry )
View Full Code Here

            addSSLSupport( registry );
        }

        // Bind
        Service service = new Service( "http", TransportType.SOCKET, PORT );
        registry.bind( service, new HttpProtocolHandler() );

        System.out.println( "Listening on port " + PORT );
    }

View Full Code Here

    public static void main( String[] args ) throws Throwable
    {
        // Create ServiceRegistry.
        ServiceRegistry registry = new SimpleServiceRegistry();

        registry.bind(
                new Service( "sumUp", TransportType.SOCKET, SERVER_PORT ),
                new ServerProtocolProvider() );

        System.out.println( "Listening on port " + SERVER_PORT );
    }
View Full Code Here

    public static void main( String[] args ) throws Throwable
    {
        // Create ServiceRegistry.
        ServiceRegistry registry = new SimpleServiceRegistry();

        registry.bind(
                new Service( "sumUp", TransportType.SOCKET, SERVER_PORT ),
                new ServerProtocolProvider() );

        System.out.println( "Listening on port " + SERVER_PORT );
    }
View Full Code Here

            addSSLSupport( registry );
        }

        // Bind
        Service service = new Service( "http", TransportType.SOCKET, PORT );
        registry.bind( service, new HttpProtocolHandler() );

        System.out.println( "Listening on port " + PORT );
    }

View Full Code Here

        VmPipeAddress address = new VmPipeAddress( 8080 );

        // Set up server
        Service service = new Service( "tennis", TransportType.VM_PIPE, address );
        registry.bind( service, new TennisPlayer() );

        // Connect to the server.
        VmPipeConnector connector = new VmPipeConnector();
        ProtocolSession session = connector.connect( address,
                                                     new TennisPlayer() );
View Full Code Here

       
        addLogger( registry );
       
        // Bind
        Service service = new Service( "echo", TransportType.SOCKET, PORT );
        registry.bind( service, new EchoProtocolHandler() );

        System.out.println( "Listening on port " + PORT );
    }

    private static void addSSLSupport( ServiceRegistry registry )
View Full Code Here

            addSSLSupport( registry );
        }

        // Bind
        Service service = new Service( "http", TransportType.SOCKET, PORT );
        registry.bind( service, new HttpProtocolHandler() );

        System.out.println( "Listening on port " + PORT );
    }

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.