public void send(Address dest, ByteBuffer data) throws Exception { if(!validateArgs(dest, data)) return; if(dest == null) { sendToAll(data); return; } if(dest.equals(local_addr)) { receive(dest, data); return; } // Get a connection (or create one if not yet existent) and send the data Connection conn=null; try { conn=getConnection(dest); conn.send(data); } catch(Exception ex) { removeConnectionIfPresent(dest, conn); throw ex; } }
public void send(Address dest, byte[] data, int offset, int length) throws Exception { if(!validateArgs(dest, data)) return; if(dest == null) { sendToAll(data, offset, length); return; } if(dest.equals(local_addr)) { receive(dest, data, offset, length); return; } // Get a connection (or create one if not yet existent) and send the data Connection conn=null; try { conn=getConnection(dest); conn.send(data, offset, length); } catch(Exception ex) { removeConnectionIfPresent(dest, conn); throw ex; } }
public void send(Address dest, byte[] data, int offset, int length) throws Exception { if(!validateArgs(dest, data)) return; if(dest == null) { sendToAll(data, offset, length); return; } if(dest.equals(local_addr)) { receive(dest, data, offset, length); return; } // Get a connection (or create one if not yet existent) and send the data Connection conn=null; try { conn=getConnection(dest); conn.send(data, offset, length); } catch(Exception ex) { removeConnectionIfPresent(dest, conn); throw ex; } }
public void send(Address dest, ByteBuffer data) throws Exception { if(!validateArgs(dest, data)) return; if(dest == null) { sendToAll(data); return; } if(dest.equals(local_addr)) { receive(dest, data); return; } // Get a connection (or create one if not yet existent) and send the data Connection conn=null; try { conn=getConnection(dest); conn.send(data); } catch(Exception ex) { removeConnectionIfPresent(dest, conn); throw ex; } }