|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.beep4j.internal.tcp.DefaultChannelController
public class DefaultChannelController
| Field Summary | |
|---|---|
static int |
MINIMUM_FRAME_SIZE
|
| Constructor Summary | |
|---|---|
DefaultChannelController(Transport transport,
int channel,
int window)
|
|
| 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. |
protected int |
sendFrames(Transport transport)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MINIMUM_FRAME_SIZE
| Constructor Detail |
|---|
public DefaultChannelController(Transport transport,
int channel,
int window)
| Method Detail |
|---|
public void updateSendWindow(long ackno,
int size)
ChannelController
updateSendWindow in interface ChannelControllerackno - the acknowledged sequence numbersize - the size of the window
public void sendANS(int messageNumber,
int answerNumber,
Message message)
ChannelController
sendANS in interface ChannelControllermessageNumber - the message number of the messageanswerNumber - the answer number of the messagemessage - the Message to be sent
public void sendERR(int messageNumber,
Message message)
ChannelController
sendERR in interface ChannelControllermessageNumber - the message number of the Messagemessage - the Message to be sent
public void sendMSG(int messageNumber,
Message message)
ChannelController
sendMSG in interface ChannelControllermessageNumber - the message number of the Messagemessage - the Message to be sentpublic void sendNUL(int messageNumber)
ChannelController
sendNUL in interface ChannelControllermessageNumber - the message number of the Message
public void sendRPY(int messageNumber,
Message message)
ChannelController
sendRPY in interface ChannelControllermessageNumber - the message number of the Messagemessage - the Message to be sent
public void checkFrame(long seqno,
int payloadSize)
ChannelControllerValidation 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.
checkFrame in interface ChannelController
public void frameReceived(long seqno,
int size)
ChannelController
frameReceived in interface ChannelControllerseqno - the sequence number of the framesize - the size of the frameprotected int sendFrames(Transport transport)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||