All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.JavaStack.Protocols.Pt2ptFsm

java.lang.Object
   |
   +----JavaGroups.JavaStack.Protocols.Pt2ptFsm

public class Pt2ptFsm
extends Object
Finite state machine for point-to-point connections between 2 peers (on top of a connection-less transport). Provides lossless, FIFO message reception plus flow control. Implemented using the State pattern (Gamma et al.): each state of a connection is modeled as a separate class, when a state change occurs, the state variable is set to a different instance. Each event is delegated to the state instance, which acts differently depending on its class.

In the ESTABLISHED state, sliding windows are used to provide lossless FIFO, flow-controlled delivery. Depending on the protocol configuration, either an ACK or NAK based scheme is used.

PT2PT acts like a UDP channel (but with retransmission and timeouts). However, when a peer is not up when sending data, this is only reported as a SUSPECT event (Send is asynchronous and therefore cannot throw an exception). In multicast mode, that member will be excluded from the group.


Constructor Index

 o Pt2ptFsm(Protocol)

Constructors

 o Pt2ptFsm
 public Pt2ptFsm(Protocol prot)

All Packages  Class Hierarchy  This Package  Previous  Next  Index