Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## it.unitn.ds.peersim.protocols.transports
Class ReliableTransport

    java.lang.Object
      it.unitn.ds.peersim.protocols.transports.ReliableTransport

All Implemented Interfaces:
  java.lang.Cloneable, peersim.core.Protocol, peersim.transport.Transport

    public class ReliableTransport

extends java.lang.Object
implements peersim.transport.Transport

Distributed Systems Course Project

Year: 2009/2010

University of Trento

ReliableTransport Implement a transport layer that reliably delivers messages.

Version:
  1.0
Author:
  Avancini Mattia, Giampaolo Farina
See Also:
  `http://peersim.sourceforge.net/doc/index.html`

Constructor Summary
`ReliableTransport(java.lang.String prefix)` Instantiates a new reliable transport.

Method Summary
`ReliableTransport` | `clone()` Returns `this`.
`long` | `getLatency(peersim.core.Node src, peersim.core.Node dest)` Returns the latency of the network.
`void` | `send(peersim.core.Node src, peersim.core.Node dest, java.lang.Object msg, int pid)` Sends the message.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ReliableTransport

    public ReliableTransport(java.lang.String prefix)

  Instantiates a new reliable transport.

  Parameters:
    `prefix` - the prefix

Method Detail

### clone

    public ReliableTransport clone()

  Returns `this`. This way only one instance exists in the system that is linked from all the nodes. This is because this protocol has no node specific state.

  Specified by:
    `clone` in interface `peersim.core.Protocol`
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    the reliable transport

### send

    public void send(peersim.core.Node src,
                     peersim.core.Node dest,
                     java.lang.Object msg,
                     int pid)

  Sends the message.

  Specified by:
    `send` in interface `peersim.transport.Transport`
  Parameters:
    `src` - the src
    `dest` - the dest
    `msg` - the msg
    `pid` - the pid

### getLatency

    public long getLatency(peersim.core.Node src,
                           peersim.core.Node dest)

  Returns the latency of the network.

  Specified by:
    `getLatency` in interface `peersim.transport.Transport`
  Parameters:
    `src` - the src
    `dest` - the dest
  Returns:
    the latency

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD