Examples of readFrom()


Examples of org.jgroups.Address.readFrom()

                       log.warn(new StringBuffer("packet from ").append(client_addr).append(':').append(client_port).
                              append(" has different version (").append(version).append(") from ours (").
                                append(Version.version).append("). This may cause problems"));
               }
               client_peer_addr=new IpAddress();
               client_peer_addr.readFrom(in);

               updateLastAccessed();
           }
           return client_peer_addr;
       }
View Full Code Here

Examples of org.jgroups.Address.readFrom()

                           log.warn(new StringBuilder("packet from ").append(client_addr).append(':').append(client_port).
                                   append(" has different version (").append(Version.print(version)).append(") from ours (").
                                   append(Version.printVersion()).append("). This may cause problems"));
                   }
                   client_peer_addr=new IpAddress();
                   client_peer_addr.readFrom(in);

                   updateLastAccessed();
               }
               return client_peer_addr;
           }
View Full Code Here

Examples of org.jgroups.Address.readFrom()

                                                                  .append(") from ours (")
                                                                  .append(Version.printVersion())
                                                                  .append("). This may cause problems"));
                }
                Address client_peer_addr=new IpAddress();
                client_peer_addr.readFrom(in);

                updateLastAccessed();
                return client_peer_addr;
            }
            finally {
View Full Code Here

Examples of org.jgroups.Message.readFrom()

                mcast_sock.receive(packet);
                data=packet.getData();
                inp_stream=new ExposedByteArrayInputStream(data, 0, data.length);
                inp=new DataInputStream(inp_stream);
                msg=new Message();
                msg.readFrom(inp);
                up(new Event(Event.MSG, msg));
            }
            catch(SocketException socketEx) {
                break;
            }
View Full Code Here

Examples of org.jgroups.Message.readFrom()

                mcast_sock.receive(packet);
                data=packet.getData();
                inp_stream=new ExposedByteArrayInputStream(data, 0, data.length);
                inp=new DataInputStream(inp_stream);
                msg=new Message();
                msg.readFrom(inp);
                up(new Event(Event.MSG, msg));
            }
            catch(SocketException socketEx) {
                break;
            }
View Full Code Here

Examples of org.jgroups.Message.readFrom()

        if(m != null) {
            try {
                bis=new ByteArrayInputStream(m);
                in=new DataInputStream(bis);
                assembled_msg=new Message(false);
                assembled_msg.readFrom(in);
                if(log.isTraceEnabled()) log.trace("assembled_msg is " + assembled_msg);
                assembled_msg.setSrc(sender); // needed ? YES, because fragments have a null src !!
                num_received_msgs++;
                up_prot.up(new Event(Event.MSG, assembled_msg));
            }
View Full Code Here

Examples of org.jgroups.protocols.PingData.readFrom()

            output.flush();

            short num_rsps=input.readShort();
            for(int i=0; i < num_rsps; i++) {
                PingData rsp=new PingData();
                rsp.readFrom(input);
                rsps.addResponse(rsp, false);
            }
        }
        catch(Exception e) {          
            connectionStateChanged(ConnectionStatus.CONNECTION_BROKEN);
View Full Code Here

Examples of org.jgroups.protocols.pbcast.Digest.readFrom()

        dos.close();
        byte[] buf=outstream.toByteArray();
        ByteArrayInputStream instream=new ByteArrayInputStream(buf);
        DataInputStream dis=new DataInputStream(instream);
        Digest tmp=new Digest();
        tmp.readFrom(dis);
        assertEquals(d, tmp);
    }

    public void testSerializedSize() throws Exception {
        long len=d.serializedSize();
View Full Code Here

Examples of org.jgroups.stack.GossipData.readFrom()

            final DataInputStream input = stub.getInputStream();
            mainloop:
            while (!Thread.currentThread().isInterrupted()) {
                try {                                       
                    GossipData msg = new GossipData();
                    msg.readFrom(input);
                    switch (msg.getType()) {
                        case GossipRouter.DISCONNECT_OK:                           
                            break mainloop;
                        case GossipRouter.MESSAGE:
                            byte[] data = msg.getBuffer();
View Full Code Here

Examples of org.jgroups.stack.IpAddress.readFrom()

        ip.writeTo(dos);
        buf=bos.toByteArray();
        bis=new ByteArrayInputStream(buf);
        dis=new DataInputStream(bis);
        IpAddress ip2=new IpAddress();
        ip2.readFrom(dis);
        Assert.assertEquals(ip, ip2);
    }


    public void testExternalization() throws Exception {
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.