Package mephi.cybernetics.dhcn.nodes.config

Examples of mephi.cybernetics.dhcn.nodes.config.NodeInfoSocket


                if ( INodeInfo.class.isAssignableFrom(message.getClass()))
                {
                    if (NodeInfoSocket.class.isAssignableFrom(message.getClass()))
                    {
                        System.out.println("New Node");
                        NodeInfoSocket info = (NodeInfoSocket)message;
                        switch (info.getType())
                        {
                            case Config.NODE_CLIENT :
                            {
                                System.out.println("Client");
                                break;
                            }
                            case Config.NODE_SOLVER :
                            {
                                System.out.println("Solver");
                                break;
                            }
                            case Config.NODE_DISPATCHER :
                            {
                                System.out.println("Dispatcher");
                                break;
                            }
                        }
//                        INodeConfig config = null;
//                        if ((info.getType() == Config.NODE_CLIENT) || (info.getType() == Config.NODE_SOLVER))
//                        {
//                            config = new NodeConfigSocket(info.getIp(), info.getPort(), this.counterNodeId, info.getType(), info.getTaskTypes());
//                        }
//                        if (info.getType() == Config.NODE_DISPATCHER)
//                        {
//                            config = new NodeConfigSocket(info.getIp(), info.getPort(), this.counterNodeId, info.getType(), info.getTaskTypes());
//                            NodeInfoSocket dispatcherInfo = new NodeInfoSocket(this.ip, this.port, this.counterNodeId, null, this.id);
//                            this.manager.writeData(dispatcherInfo, config);
//                        }
                        INodeConfig config = new NodeConfigSocket(info.getIp(), info.getPort(), this.counterNodeId, info.getType(), info.getTaskTypes());
                        this.nodes.add(config);
                        counterNodeId++;
                    }
                    continue;
                }
View Full Code Here


        this.ip = ip;
        this.port = port;
        ServerSocket server;
        try
        {
            NodeInfoSocket config = new NodeInfoSocket(localIp, localPort, type, taskTypes);
            this.writeData(config);
            server = new ServerSocket(localPort);
            Socket socket = server.accept();
            in = new ObjectInputStream(socket.getInputStream());
            System.out.println("Dispatcher connect");
View Full Code Here

TOP

Related Classes of mephi.cybernetics.dhcn.nodes.config.NodeInfoSocket

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.