| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|
com.newstep.solid.comm.rtt
|
|
+--com.newstep.solid.comm.rtt.RedundantElement
public class RedundantElement
Implements:
ChannelStatusListener
Links:
Kernel Association Association Link
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
0..1
Supplier navigability:
NAVIGABLE
Supplier role:
redChannel
Supplier visibility:
private
Kernel Association Association Link
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
Kernel Association Association Link
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
Implementation Implementation Link
Generalization Generalization Link
| Field Summary |
|
|
String |
|
|
|
|
|
private static String |
|
private RttState |
|
private String |
|
|
|
private ConcurrentHashMap |
|
|
|
| Constructor Summary |
public void |
|
| Method Summary |
public void |
|
private void |
|
private void |
|
public void |
|
private void |
|
private RttState |
|
|
|
public String |
|
|
|
|
|
private boolean |
|
public void |
|
public void |
|
private void |
|
private void |
|
public void |
|
public void |
|
public void |
|
public String |
|
public void |
|
Multiplicity:
1
private static String className
Multiplicity:
1
Static.
private RttState internalState
Multiplicity:
1
private String name
Multiplicity:
1
String name
Multiplicity:
1
private ConcurrentHashMap retransmitQueues
Multiplicity:
1
Multiplicity:
1
public void RedundantElement (Channel subChannel)
Stereotype:
create
public void addSecondSubChannel (Channel secondSubChannel)
Connects the redundant sub channel of this protocol element
Parameters:
secondSubChannel
private void changeActiveChannel ()
Changes the active channel to the redundant channel
private void cleanUp ()
Cleans up the internal resources of this element
public void close ()
Channel Interface. Passes the close() downstream
Throws:
ChannelException
private void drainOnAck (Channel channel, Integer ack)
Drains the non-acked transmision queues
Parameters:
channel
the channel on which the message came
ack
the sequence number acknoledged
private RttState getInternalState ()
Retrieves the internal state of the channel
Channel Interface;
public String getName ()
Retrieves the redundant channel of this protocol element
Return:
Channel
Channel Interface.
private boolean hasNackMessages (Channel channel)
Checks if the specified channel has not acknowledged messages
Parameters:
channel
Return:
boolean
public void onMessage (Message message)
Channel interface. If the message received is DATA or HEARTBEAT drains
the retransmission queues. Updates the active channel whith the channel
on which the data has been received HEARTBEAT messages are not sent
upstream
public void open ()
Channel Interface. Passes the message donwstream.
Throws:
ChannelException
private void retransmit (Channel channel)
Retransmits the not acked messages for a particular channel
Parameters:
channel
private void setInternalState (RttState state)
Assigns the internal state of the channel
Parameters:
state
public void setName (String name)
public void setRole (Type role)
Sets the role to client or server
ChannelStatusListener Interface. Listens for the state changes from the
elements downstream and takes action. When one of the sub channels chages
state to CLOSED or ERROR tries to retransmit the non-acked messages to
the other channel .
public String toString ()
The external reprezentation of the channel
public void write (Message message)
Writes the message on the active Channel. If a DATA message, it adds it
to the proper retransmission queue .
Throws:
ChannelException
| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|