Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.netio.rtt
Class ContinuityElement
com.newstep.solid.netio.ProtocolElement
  |
  +--com.newstep.solid.netio.rtt.ContinuityElement
All Implemented Interfaces:
       CommChannelStateListener, ProtocolListener
Direct Known Subclasses:
       ClientContinuityElement, ServerContinuityElement

public abstract class ContinuityElement      
Abstract.
Implements:
ProtocolListener
CommChannelStateListener
 
Links:
Kernel Association Association Link
to Class MessageFramingElement
Associates type:
aggregationByValue
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Directed.
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
protected
Custom properties
link:
aggregationByValue
 
Implementation Implementation Link
to Interface CommChannelStateListener
 
Generalization Generalization Link
to Class ProtocolElement
 
Implementation Implementation Link
to Interface ProtocolListener
 
 

Nested Class Summary
protected class
State
Field Summary
protected LinkedBlockingQueue
private final static String
private boolean
protected TimerTask
final static long
protected final static long
protected int
protected int
protected long
private static Logger
protected int
protected int
protected ReentrantLock
State
State
CHANNEL_CLOSED
State
CONNECTED
State
ERROR
State
MESSAGE_OUT_OF_ORDER
State
MISSED_HEARTBEAT
Constructor Summary
void
Method Summary
void
checkContinuity(Integer ack)
abstract void
abstract TimerTask
abstract void
public void
protected void
protected synchronized boolean
public void
protected void
updateState(State newState)
public void
Field Detail
ackPendingQueue
protected LinkedBlockingQueue ackPendingQueue
Multiplicity:
1
 

className
private final static String className
Final.
Multiplicity:
1
Static.
 

closing
private boolean closing
Multiplicity:
1
 

heartbeatTask
protected TimerTask heartbeatTask
Multiplicity:
1
 

HEARTBEAT_DELAY
final static long HEARTBEAT_DELAY
Final.
Multiplicity:
1
Static.
 

HEARTBEAT_PANIC_DELAY
protected final static long HEARTBEAT_PANIC_DELAY
Final.
Multiplicity:
1
Static.
 

incommingSeqNo
protected int incommingSeqNo
Multiplicity:
1
 

lastAcknowledged
protected int lastAcknowledged
Multiplicity:
1
 

lastHeartbeat
protected long lastHeartbeat
Multiplicity:
1
 

logger
private static Logger logger
Multiplicity:
1
Static.
 

messageFramingElement
protected MessageFramingElement messageFramingElement
Multiplicity:
1
 

outgoingAckNo
protected int outgoingAckNo
Multiplicity:
1
 

outgoingSeqNo
protected int outgoingSeqNo
Multiplicity:
1
 

queLock
protected ReentrantLock queLock
Multiplicity:
1
 

state
State state
Multiplicity:
1
 
Constructor Detail
ContinuityElement
void ContinuityElement ()
 
Stereotype:
create
 
Method Detail
checkContinuity
void checkContinuity (Integer ack)
 
Checks the continuity of the message flow
Parameters:
ack sequence number of the last message the sender is acknowledging
seqNo sequence number of the current message
 

controlMessageReceived
abstract void controlMessageReceived (RttMessage message)
 
Handles control messages ( enable and ID_XXX )
Parameters:
message control message
Abstract.
 

getHeartbeatTask
abstract TimerTask getHeartbeatTask ()
 
Return:
timer task to handle keepalives
Abstract.
 

heartbeatMessageReceived
abstract void heartbeatMessageReceived (HeartBeatMessage message)
 
Handles heartbeat messages
Parameters:
message heartbeat message
Abstract.
 

messageReceived
public void messageReceived (ProtocolMessage message)
 
 

reset
protected void reset ()
 
Resets the state of the continuity element. It is invoked before attempting to reconnect.
 

setClosing
protected synchronized boolean setClosing ()
 
Synchronized.
 

stateChanged
public void stateChanged (CommChannelState newState)
 
 

updateState
protected void updateState (State newState)
 
Single point for state handling
Parameters:
newState state - reason
 

write
public void write (ProtocolMessage message)
 
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD