Examples of popString()


Examples of org.zeromq.ZMsg.popString()

                subtree = msg.popString();
            }
            else
            if (command.equals("CONNECT")) {
                String address = msg.popString();
                String service = msg.popString();
                if (nbrServers < SERVER_MAX) {
                    server [nbrServers++] = new Server(
                            ctx, address, Integer.parseInt(service), subtree);
                    //  We broadcast updates to all known servers
                    publisher.connect(String.format("%s:%d",
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

            else
            //  .split set and get commands
            //  When we set a property, we push the new key-value pair onto
            //  all our connected servers:
            if (command.equals("SET")) {
                String key = msg.popString();
                String value = msg.popString();
                String ttl = msg.popString();
                kvmap.put(key, value);

                //  Send key-value pair on to server
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

            //  .split set and get commands
            //  When we set a property, we push the new key-value pair onto
            //  all our connected servers:
            if (command.equals("SET")) {
                String key = msg.popString();
                String value = msg.popString();
                String ttl = msg.popString();
                kvmap.put(key, value);

                //  Send key-value pair on to server
                kvmsg kvmsg = new kvmsg(0);
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

            //  When we set a property, we push the new key-value pair onto
            //  all our connected servers:
            if (command.equals("SET")) {
                String key = msg.popString();
                String value = msg.popString();
                String ttl = msg.popString();
                kvmap.put(key, value);

                //  Send key-value pair on to server
                kvmsg kvmsg = new kvmsg(0);
                kvmsg.setKey(key);
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

                kvmsg.send(publisher);
                kvmsg.destroy();
            }
            else
            if (command.equals("GET")) {
                String key = msg.popString();
                String value = kvmap.get(key);
                if (value != null)
                    pipe.send(value);
                else
                    pipe.send("");
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

                //  Append UUID to queue, prefixed with '-' for pending
                ZMsg msg = ZMsg.recvMsg(requestPipe);
                if (msg == null)
                    break;          //  Interrupted
                String uuid = msg.popString();
                BufferedWriter wfile = null;
                try {
                    wfile = new BufferedWriter(new FileWriter(TITANIC_DIR + "/queue", true));
                    wfile.write("-" + uuid + "\n");
                } catch (IOException e) {
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

            while (true) {
                ZMsg request = worker.receive(reply);
                if (request == null)
                    break;      //  Interrupted, exit

                String uuid = request.popString();
                String reqFilename = requestFilename(uuid);
                String repFilename = replyFilename(uuid);

                if (new File(repFilename).exists()) {
                    DataInputStream file = null;
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

            while (true) {
                ZMsg request = worker.receive(reply);
                if (request == null)
                    break;      //  Interrupted, exit

                String uuid = request.popString();
                String req_filename = requestFilename(uuid);
                String rep_filename = replyFilename(uuid);
                new File(rep_filename).delete();
                new File(req_filename).delete();
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

        }

        private void controlMessage ()
        {
            ZMsg msg = ZMsg.recvMsg (pipe);
            String method = msg.popString ();
            if (method.equals ("SUBSCRIBE")) {
                String path = msg.popString ();
                //  Store subscription along with any previous ones        
                //  Check we don't already have a subscription for this path
                for (Sub sub: subs) {                                      
View Full Code Here

Examples of org.zeromq.ZMsg.popString()

        private void controlMessage ()
        {
            ZMsg msg = ZMsg.recvMsg (pipe);
            String method = msg.popString ();
            if (method.equals ("SUBSCRIBE")) {
                String path = msg.popString ();
                //  Store subscription along with any previous ones        
                //  Check we don't already have a subscription for this path
                for (Sub sub: subs) {                                      
                    if (path.equals (sub.path))                            
                        return;                                            
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.