Package org.drools.grid.generic

Examples of org.drools.grid.generic.GenericNodeConnector


    }


    public ExecutionNode getExecutionNode(NodeSelectionStrategy strategy) {
        ExecutionNode node = null;
        GenericNodeConnector currentNode = null;
        try {

            //if the strategy is null use the default one
            if (strategy == null) {
                currentNode = getBestNode(new StaticIncrementalSelectionStrategy(this));
            } else {
                strategy.setConnection(this);
                currentNode = getBestNode(strategy);
            }
            if (currentNode.connect()) {
                node = new ExecutionNode();
                node.set(KnowledgeBuilderFactoryService.class, new KnowledgeBuilderProviderRemoteClient(currentNode));
                node.set(KnowledgeBaseFactoryService.class, new KnowledgeBaseProviderRemoteClient(currentNode));
                node.set(DirectoryLookupFactoryService.class, new DirectoryLookupProviderRemoteClient(currentNode, this));
View Full Code Here



    //@Override
    public GenericNodeConnector getBestNode() {
        System.out.println("!!!!!GET BEST NODE = "+counter);
        GenericNodeConnector service = connection.getNodeConnectors().get(counter);
        StaticIncrementalSelectionStrategy.counter = counter +1;
        return service;
    }
View Full Code Here

        System.out.println("Registering: "+  executorId + " -- "+sessionServiceId);
        directoryMap.put(executorId, sessionServiceId);
    }

    public GenericNodeConnector lookup(String executorId) throws RemoteException {
        GenericNodeConnector sessionService = null;
        String sessionServiceId = (String)directoryMap.get(executorId);
        System.out.println("Registry = "+ directoryMap.toString());
        System.out.println("Nodes Services = "+services);
        for(GenericNodeConnector ss : services){
            System.out.println("Session Service id = "+ss.getId() + "needs to match with ="+sessionServiceId);
View Full Code Here

        connection.addDirectoryNode(new DirectoryNodeLocalImpl());

        // setup Client
        NioSocketConnector clientConnector = new NioSocketConnector();
        clientConnector.setHandler( new MinaIoHandler( SystemEventListenerFactory.getSystemEventListener() ) );
        GenericNodeConnector minaClient = new MinaNodeConnector( "client 1",
                                                         clientConnector,
                                                         address,
                                                         SystemEventListenerFactory.getSystemEventListener() );
        connection.addNodeConnector(minaClient);
        node = connection.getExecutionNode(null);
View Full Code Here

TOP

Related Classes of org.drools.grid.generic.GenericNodeConnector

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.