|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChannelController
Controller object that knows about the channel's send and receive buffers. It's main purpose is sending SEQ frames when the controller thinks that's necessary as well as to fragment / queue outgoing messages to respect the window of the other peer.
Method Summary | |
---|---|
void |
checkFrame(long seqno,
int payloadSize)
Validation of the sequence number according to the BEEP specification section 2.2.1.1. |
void |
frameReceived(long seqno,
int size)
Notifies the controller that the frame with sequence number seqno and size size has been completely received. |
void |
sendANS(int messageNumber,
int answerNumber,
Message message)
Send an ANS message with the given messageNumber and answerNumber on the channel of this controller. |
void |
sendERR(int messageNumber,
Message message)
Sends an ERR message with the given messageNumber on the channel of this controller. |
void |
sendMSG(int messageNumber,
Message message)
Sends an MSG message with the given messageNumber on the channel of this controller. |
void |
sendNUL(int messageNumber)
Sends an NUL message with the given messageNumber on the channel of this controller. |
void |
sendRPY(int messageNumber,
Message message)
Sends an RPY message with the given messageNumber on the channel of this controller. |
void |
updateSendWindow(long ackno,
int size)
To be invoked whenever a SEQ frame is received to update the sender window. |
Method Detail |
---|
void updateSendWindow(long ackno, int size)
ackno
- the acknowledged sequence numbersize
- the size of the windowvoid sendANS(int messageNumber, int answerNumber, Message message)
messageNumber
- the message number of the messageanswerNumber
- the answer number of the messagemessage
- the Message to be sentvoid sendNUL(int messageNumber)
messageNumber
- the message number of the Messagevoid sendERR(int messageNumber, Message message)
messageNumber
- the message number of the Messagemessage
- the Message to be sentvoid sendMSG(int messageNumber, Message message)
messageNumber
- the message number of the Messagemessage
- the Message to be sentvoid sendRPY(int messageNumber, Message message)
messageNumber
- the message number of the Messagemessage
- the Message to be sentvoid checkFrame(long seqno, int payloadSize)
Validation of the sequence number according to the BEEP specification section 2.2.1.1.
A frame is poorly formed if the value of the sequence number doesn't correspond to the expected value for the associated channel.
Further, this method checks that the payload size is not greater than the remaining buffer space.
void frameReceived(long seqno, int size)
seqno
- the sequence number of the framesize
- the size of the frame
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |