Package org.drools.grid.io.impl

Examples of org.drools.grid.io.impl.MultiplexSocketServiceCongifuration


        wplConf.setWhitePages(wp);
        conf.addConfiguration(wplConf);

        if (port >= 0) {
            //Configuring the SocketService
            MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration(new MultiplexSocketServerImpl("127.0.0.1",
                    new MinaAcceptorFactoryService(),
                    SystemEventListenerFactory.getSystemEventListener(),
                    grid));
            socketConf.addService(WhitePages.class.getName(), wplConf.getWhitePages(), port);

            conf.addConfiguration(socketConf);
        }
        conf.configure(grid);
View Full Code Here



       
        if ( port >= 0 ) {
            //Configuring the SocketService
            MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
                                                                                                                              new MinaAcceptorFactoryService(),
                                                                                                                              SystemEventListenerFactory.getSystemEventListener(),
                                                                                                                              grid) );
            socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), port );
            conf.addConfiguration( socketConf );
        }
        conf.configure( grid );

    }
View Full Code Here

        wplConf.setWhitePages(wp);
        conf.addConfiguration(wplConf);

        if (port >= 0) {
            //Configuring the SocketService
            MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration(new MultiplexSocketServerImpl("127.0.0.1",
                    new MinaAcceptorFactoryService(),
                    SystemEventListenerFactory.getSystemEventListener(),
                    grid));
            socketConf.addService(WhitePages.class.getName(), wplConf.getWhitePages(), port);

            conf.addConfiguration(socketConf);
        }
        conf.configure(grid);
View Full Code Here

//        SchedulerLocalConfiguration schlConf = new SchedulerLocalConfiguration( "myLocalSched" );
//        conf.addConfiguration( schlConf );
       
        if ( port >= 0 ) {
            //Configuring the SocketService
            MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
                                                                                                                                     new MinaAcceptorFactoryService(),
                                                                                                                                     SystemEventListenerFactory.getSystemEventListener(),
                                                                                                                                     grid) );
            socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), port );
//            socketConf.addService( SchedulerService.class.getName(), schlConf.getSchedulerService(), port );
                       
            conf.addConfiguration( socketConf );                       
        }
        conf.configure( grid );
View Full Code Here

//        SchedulerLocalConfiguration schlConf = new SchedulerLocalConfiguration( "myLocalSched" );
//        conf.addConfiguration( schlConf );
       
        if ( port >= 0 ) {
            //Configuring the SocketService
            MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
                                                                                                                              new MinaAcceptorFactoryService(),
                                                                                                                              SystemEventListenerFactory.getSystemEventListener(),
                                                                                                                              grid) );
            socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), port );
//            socketConf.addService( SchedulerService.class.getName(), schlConf.getSchedulerService(), port );
                       
            conf.addConfiguration( socketConf );                       
        }
        conf.configure( grid );
View Full Code Here

        return true;
    }

    public void afterPropertiesSet() throws Exception {
        this.grid = new GridImpl( new HashMap() );
        MultiplexSocketServiceCongifuration socketConf = null;

        if ( this.coreServices == null ) {
            this.coreServices = new HashMap();
        }

        GridPeerConfiguration conf = new GridPeerConfiguration();
        GridPeerServiceConfiguration coreSeviceLookupConf = new CoreServicesLookupConfiguration( this.coreServices );
        conf.addConfiguration( coreSeviceLookupConf );

        //Configuring the WhitePages
        if ( this.whitePages != null ) {
            WhitePagesLocalConfiguration wplConf = new WhitePagesLocalConfiguration();
            wplConf.setWhitePages( this.whitePages );
            conf.addConfiguration( wplConf );
        }

        conf.configure( this.grid );

        // We do this after the main grid configuration, to make sure all services are instantiated
        if ( this.socketServiceConfiguration != null ) {
            AcceptorFactoryService acc = null;
            if ( "mina".equals( this.socketServiceConfiguration.getAcceptor() ) ) {
                acc = new MinaAcceptorFactoryService();
            }

            if ( acc == null ) {
                // Mina is the default for the moment
                acc = new MinaAcceptorFactoryService();
            }

            socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( this.socketServiceConfiguration.getIp(),
                                                                                                 acc,
                                                                                                 SystemEventListenerFactory.getSystemEventListener(),
                                                                                                 this.grid ) );

            for ( String[] services : this.socketServiceConfiguration.getServices() ) {
                Object service = ((GridImpl) this.grid).get( services[0].trim() );
                if ( service == null ) {
                    throw new RuntimeException( "Unable to configure socket. Service '" + services[0] + "' could not be found" );
                }
                if ( "auto".equals( services[1].trim() ) ) {

                } else {
                    socketConf.addService( services[0].trim(),
                                           service,
                                           Integer.parseInt( services[1].trim() ) );
                }
            }

            socketConf.configureService( this.grid );
        }
    }
View Full Code Here

//        SchedulerLocalConfiguration schlConf = new SchedulerLocalConfiguration( "myLocalSched" );
//        conf.addConfiguration( schlConf );
       
        if ( port >= 0 ) {
            //Configuring the SocketService
            MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
                                                                                                                              new MinaAcceptorFactoryService(),
                                                                                                                              SystemEventListenerFactory.getSystemEventListener(),
                                                                                                                              grid) );
            socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), port );
//            socketConf.addService( SchedulerService.class.getName(), schlConf.getSchedulerService(), port );
                       
            conf.addConfiguration( socketConf );
        }
        conf.configure( grid );
View Full Code Here

        GridPeerConfiguration conf = new GridPeerConfiguration();

        GridPeerServiceConfiguration coreSeviceConf = new CoreServicesLookupConfiguration( coreServicesMap );
        conf.addConfiguration( coreSeviceConf );

        MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
                                                                                                                          new MinaAcceptorFactoryService(),
                                                                                                                          l,
                                                                                                                          grid1 ) );
        conf.addConfiguration( socketConf );

        WhitePagesLocalConfiguration wplConf = new WhitePagesLocalConfiguration();
        wplConf.setWhitePages( new JpaWhitePages( Persistence.createEntityManagerFactory( "org.drools.grid" ) ) );
        conf.addConfiguration( wplConf );

        socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), 8000 );

        conf.configure( grid1 );

        GridImpl grid2 = new GridImpl( new ConcurrentHashMap<String, Object>() );
        conf = new GridPeerConfiguration();
View Full Code Here

        GridPeerConfiguration conf = new GridPeerConfiguration();

        GridPeerServiceConfiguration coreSeviceConf = new CoreServicesLookupConfiguration( coreServicesMap );
        conf.addConfiguration( coreSeviceConf );

        MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
                                                                                                                          new MinaAcceptorFactoryService(),
                                                                                                                          l,
                                                                                                                          grid1) );
        conf.addConfiguration( socketConf );

        WhitePagesLocalConfiguration wplConf = new WhitePagesLocalConfiguration();
        conf.addConfiguration( wplConf );

        socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), 8000 );

        conf.configure( grid1 );

        GridImpl grid2 = new GridImpl( "peer2", new ConcurrentHashMap<String, Object>() );
        conf = new GridPeerConfiguration();
View Full Code Here

//        SchedulerLocalConfiguration schlConf = new SchedulerLocalConfiguration( "myLocalSched" );
//        conf.addConfiguration( schlConf );
       
        if ( port >= 0 ) {
            //Configuring the SocketService
            MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
                                                                                                                              new MinaAcceptorFactoryService(),
                                                                                                                              SystemEventListenerFactory.getSystemEventListener(),
                                                                                                                              grid) );
           
            socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), port );
           
//            socketConf.addService( SchedulerService.class.getName(), schlConf.getSchedulerService(), port );
                       
            conf.addConfiguration( socketConf );
        }
View Full Code Here

TOP

Related Classes of org.drools.grid.io.impl.MultiplexSocketServiceCongifuration

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.