[Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/core Channel.java,1.19,1.20
Status: Beta
Brought to you by:
huston
|
From: Huston F. <hu...@us...> - 2001-12-15 00:07:22
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core
In directory usw-pr-cvs1:/tmp/cvs-serv1446/src/org/beepcore/beep/core
Modified Files:
Channel.java
Log Message:
more cleanup
Index: Channel.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Channel.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** Channel.java 2001/11/12 16:12:41 1.19
--- Channel.java 2001/12/15 00:07:19 1.20
***************
*** 46,64 ****
static final int STATE_CLOSED = 4;
static final int STATE_ERROR = 5;
- private static final String ERR_CHANNEL_MESSAGE_NUMBER_PREFIX =
- "Incorrect message number: was ";
- private static final String ERR_CHANNEL_MIDDLE = "; expecting ";
- private static final String ERR_CHANNEL_SEQUENCE_NUMBER_PREFIX =
- "Incorrect sequence number: was ";
- private static final String ERR_CHANNEL_ERROR_STATE =
- "Channel in currently experiencing technical difficulties.";
- private static final String ERR_CHANNEL_UNINITIALISED_STATE =
- "Channel is uninitialised.";
- private static final String ERR_CHANNEL_UNKNOWN_STATE =
- "Channel is in an unknown state.";
- private static final String ERR_CHANNEL_INCONSISTENT_FRAME_TYPE_PREFIX =
- "Incorrect message type: was ";
- private static final String ERR_REPLY_RECEIVED_FOR_NO_MESSAGE =
- "Reply received for a message never sent.";
private static final BufferSegment zeroLengthSegment =
new BufferSegment(new byte[0]);
--- 46,49 ----
***************
*** 287,291 ****
// in the buffer right now.
if (size < recvWindowUsed) {
! throw new BEEPException("Size must be less than what is currently in use.");
}
--- 272,277 ----
// in the buffer right now.
if (size < recvWindowUsed) {
! throw new BEEPException("Size must be less than what is " +
! "currently in use.");
}
***************
*** 364,372 ****
switch (state) {
case STATE_ERROR :
! throw new BEEPException(ERR_CHANNEL_ERROR_STATE);
case STATE_UNINITIALISED :
! throw new BEEPException(ERR_CHANNEL_UNINITIALISED_STATE);
default :
! throw new BEEPException(ERR_CHANNEL_UNKNOWN_STATE);
}
}
--- 350,359 ----
switch (state) {
case STATE_ERROR :
! throw new BEEPException("Channel in currently experiencing " +
! "technical difficulties.");
case STATE_UNINITIALISED :
! throw new BEEPException("Channel is uninitialised.");
default :
! throw new BEEPException("Channel is in an unknown state.");
}
}
***************
*** 686,692 ****
if (previousFrame != null) {
if (frame.getMsgno() != previousFrame.getMsgno()) {
! throw new BEEPException(ERR_CHANNEL_MESSAGE_NUMBER_PREFIX
+ frame.getMsgno()
! + ERR_CHANNEL_MIDDLE
+ previousFrame.getMsgno());
}
--- 673,679 ----
if (previousFrame != null) {
if (frame.getMsgno() != previousFrame.getMsgno()) {
! throw new BEEPException("Incorrect message number: was "
+ frame.getMsgno()
! + "; expecting "
+ previousFrame.getMsgno());
}
***************
*** 720,726 ****
if (frame.getMsgno() != mstatus.getMsgno()) {
! throw new BEEPException(ERR_CHANNEL_MESSAGE_NUMBER_PREFIX
+ frame.getMsgno()
! + ERR_CHANNEL_MIDDLE
+ mstatus.getMsgno());
}
--- 707,713 ----
if (frame.getMsgno() != mstatus.getMsgno()) {
! throw new BEEPException("Incorrect message number: was "
+ frame.getMsgno()
! + "; expecting "
+ mstatus.getMsgno());
}
***************
*** 729,736 ****
// is the sequence number correct?
if (frame.getSeqno() != recvSequence) {
! throw new BEEPException(ERR_CHANNEL_SEQUENCE_NUMBER_PREFIX
! + frame.getSeqno()
! + ERR_CHANNEL_MIDDLE
! + recvSequence);
}
--- 716,722 ----
// is the sequence number correct?
if (frame.getSeqno() != recvSequence) {
! throw new BEEPException("Incorrect sequence number: was "
! + frame.getSeqno() + "; expecting "
! + recvSequence);
}
***************
*** 739,746 ****
&& (previousFrame.getMessageType()
!= frame.getMessageType())) {
! throw new BEEPException(ERR_CHANNEL_INCONSISTENT_FRAME_TYPE_PREFIX
! + frame.getMessageTypeString()
! + ERR_CHANNEL_MIDDLE
! + previousFrame.getMessageTypeString());
}
}
--- 725,732 ----
&& (previousFrame.getMessageType()
!= frame.getMessageType())) {
! throw new BEEPException("Incorrect message type: was "
! + frame.getMessageTypeString()
! + "; expecting "
! + previousFrame.getMessageTypeString());
}
}
***************
*** 797,805 ****
switch (state) {
case STATE_ERROR :
! throw new BEEPException(ERR_CHANNEL_ERROR_STATE);
case STATE_UNINITIALISED :
! throw new BEEPException(ERR_CHANNEL_UNINITIALISED_STATE);
default :
! throw new BEEPException(ERR_CHANNEL_UNKNOWN_STATE);
}
}
--- 783,792 ----
switch (state) {
case STATE_ERROR :
! throw new BEEPException("Channel in currently experiencing " +
! "technical difficulties.");
case STATE_UNINITIALISED :
! throw new BEEPException("Channel is uninitialised.");
default :
! throw new BEEPException("Channel is in an unknown state.");
}
}
|