|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjecttestEnvironment.ReceivalCheck
final class ReceivalCheck
Can be used to validate if a message sent, was received as well or dropped for some reason.
For performance reasons, only an identifying integer (4 bytes) is saved for each message for later comparison.
Field Summary | |
---|---|
private static long |
checkInterval
Interval after which a check for lost messages is performed. |
private static InternalInformationPortController |
internalInformationPort
Reference on component InternalInformationPort . |
private static java.util.logging.Logger |
LOGGER
Logger used to log and display information. |
private static java.util.LinkedList<java.lang.Integer> |
notYetReceived
List with messages, that were "sent", but not "received" so far. |
private static java.lang.Integer[] |
notYetReceivedLastly
Messages, that were "sent" in the last interval, but haven't been "received" yet. |
private static int |
receivedMessages
Number of messages "received" so far. |
private static int |
sentMessages
Number of messages "sent" so far. |
Constructor Summary | |
---|---|
private |
ReceivalCheck()
Empty constructor. |
Method Summary | |
---|---|
protected static void |
addReceivedMessage(int messageID)
Removes the bypassed message identifier from notYetReceived
list. |
protected static void |
addSentMessage(int messageID)
Saves the bypassed message identifier in the notYetReceived
list. |
private static void |
checkReceival()
Checks if messages, which haven't been "received" in the last interval, haven't been "received" it in the actual interval as well (and are therefore considered as lost). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static InternalInformationPortController internalInformationPort
InternalInformationPort
.
Used to display and/or log data and read general settings.
private static final java.util.logging.Logger LOGGER
private static long checkInterval
private static int sentMessages
private static int receivedMessages
private static java.util.LinkedList<java.lang.Integer> notYetReceived
private static java.lang.Integer[] notYetReceivedLastly
Constructor Detail |
---|
private ReceivalCheck()
Method Detail |
---|
private static void checkReceival()
protected static void addSentMessage(int messageID)
notYetReceived
list. If the checkInterval
is reached, a check for lost
messages is performed. Gets called by ClientSimulator
every
time it sends a new message.
checkInterval
protected static void addReceivedMessage(int messageID)
notYetReceived
list. Gets called by ClientSimulator
every time it receives
a reply.
notYetReceived
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |