public void readFrom(DataInput in) throws Exception { readFrom(in, true); }
protected GossipData readRequest(DataInput in) { GossipData data=new GossipData(); try { data.readFrom(in); return data; } catch(Exception ex) { log.error(Util.getMessage("FailedReadingRequest"), ex); return null; } }
protected GossipData readRequest(DataInput in, GossipType type) { GossipData data=new GossipData(type); try { data.readFrom(in, false); return data; } catch(Exception ex) { log.error(Util.getMessage("FailedReadingRequest"), ex); return null; } }
public void receive(Address sender, DataInput in) throws Exception { GossipData data=new GossipData(); data.readFrom(in); switch(data.getType()) { case MESSAGE: case SUSPECT: if(receiver != null) receiver.receive(data); break; case GET_MBRS_RSP: notifyResponse(data.getGroup(), data.getPingData()); break; } }
@Override public void receive(Address sender, byte[] buf, int offset, int length) { ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf, offset, length); GossipData data=new GossipData(); try { data.readFrom(in); switch(data.getType()) { case MESSAGE: case SUSPECT: if(receiver != null) receiver.receive(data); break; case GET_MBRS_RSP: notifyResponse(data.getGroup(), data.getPingData()); break; } } catch(Exception ex) { log.error(Util.getMessage("FailedReadingData"), ex); } }
ByteArrayDataInputStream input=new ByteArrayDataInputStream(buf, offset, length); GossipData data=new GossipData(); data.readFrom(input); dump(data);
public void readFrom(DataInput in) throws Exception { readFrom(in, true); }
protected GossipData readRequest(DataInput in) { GossipData data=new GossipData(); try { data.readFrom(in); return data; } catch(Exception ex) { log.error(Util.getMessage("FailedReadingRequest"), ex); return null; } }
protected GossipData readRequest(DataInput in, GossipType type) { GossipData data=new GossipData(type); try { data.readFrom(in, false); return data; } catch(Exception ex) { log.error(Util.getMessage("FailedReadingRequest"), ex); return null; } }
gossip_rsp.readFrom(in); if(gossip_rsp.mbrs != null) { // merge with ret for(Iterator it=gossip_rsp.mbrs.iterator(); it.hasNext();) {
public void receive(Address sender, DataInput in) throws Exception { GossipData data=new GossipData(); data.readFrom(in); switch(data.getType()) { case MESSAGE: case SUSPECT: if(receiver != null) receiver.receive(data); break; case GET_MBRS_RSP: notifyResponse(data.getGroup(), data.getPingData()); break; } }
@Override public void receive(Address sender, byte[] buf, int offset, int length) { ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf, offset, length); GossipData data=new GossipData(); try { data.readFrom(in); switch(data.getType()) { case MESSAGE: case SUSPECT: if(receiver != null) receiver.receive(data); break; case GET_MBRS_RSP: notifyResponse(data.getGroup(), data.getPingData()); break; } } catch(Exception ex) { log.error(Util.getMessage("FailedReadingData"), ex); } }
ByteArrayDataInputStream input=new ByteArrayDataInputStream(buf, offset, length); GossipData data=new GossipData(); data.readFrom(input); dump(data);