[Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/core Session.java,1.23,1.24 Channel
Status: Beta
Brought to you by:
huston
|
From: Huston F. <hu...@us...> - 2002-05-08 02:56:36
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core
In directory usw-pr-cvs1:/tmp/cvs-serv14355/src/org/beepcore/beep/core
Modified Files:
Session.java Channel.java
Log Message:
cleanup
Index: Session.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** Session.java 7 May 2002 05:00:33 -0000 1.23
--- Session.java 8 May 2002 02:56:32 -0000 1.24
***************
*** 587,596 ****
// check the channel state and return the appropriate exception
! if (ch.getState() == Channel.STATE_ERROR) {
! BEEPError e = ch.getErrorMessage();
!
! e.fillInStackTrace();
!
! throw e;
}
--- 587,593 ----
// check the channel state and return the appropriate exception
! if (reply.isError()) {
! reply.getError().fillInStackTrace();
! throw reply.getError();
}
***************
*** 915,924 ****
// check the channel state and return the appropriate exception
! if (channel.getState() == Channel.STATE_ERROR) {
! BEEPError e = channel.getErrorMessage();
!
! e.fillInStackTrace();
!
! throw e;
}
--- 912,918 ----
// check the channel state and return the appropriate exception
! if (reply.isError()) {
! reply.getError().fillInStackTrace();
! throw reply.getError();
}
***************
*** 1557,1560 ****
--- 1551,1555 ----
Channel channel;
boolean disableIO;
+ BEEPError error;
StartReplyListener(Channel channel, boolean disableIO)
***************
*** 1562,1565 ****
--- 1557,1569 ----
this.channel = channel;
this.disableIO = disableIO;
+ this.error = null;
+ }
+
+ boolean isError() {
+ return this.error != null;
+ }
+
+ BEEPError getError() {
+ return this.error;
}
***************
*** 1612,1616 ****
channel.setProfile(uri);
channel.setStartData(data);
- channel.setErrorMessage(null);
// set the state
--- 1616,1619 ----
***************
*** 1662,1669 ****
+ err.getDiagnostic());
! // @todo slop
! channel.setErrorMessage(err);
- // set the state
channel.setState(Channel.STATE_ERROR);
channels.remove(channel.getNumberAsString());
--- 1665,1670 ----
+ err.getDiagnostic());
! this.error = err;
channel.setState(Channel.STATE_ERROR);
channels.remove(channel.getNumberAsString());
***************
*** 1689,1696 ****
--- 1690,1707 ----
Channel channel;
+ BEEPError error;
CloseReplyListener(Channel channel)
{
this.channel = channel;
+ this.error = null;
+ }
+
+ boolean isError() {
+ return this.error != null;
+ }
+
+ BEEPError getError() {
+ return this.error;
}
***************
*** 1709,1713 ****
Log.logEntry(Log.SEV_DEBUG, CORE,
"Received an OK for channel close");
- channel.setErrorMessage(null);
// @todo we should fire an event instead.
--- 1720,1723 ----
***************
*** 1747,1752 ****
+ err.getDiagnostic());
! // @todo slop
! channel.setErrorMessage(err);
// set the state
--- 1757,1761 ----
+ err.getDiagnostic());
! this.error = err;
// set the state
Index: Channel.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Channel.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** Channel.java 30 Mar 2002 16:19:42 -0000 1.21
--- Channel.java 8 May 2002 02:56:32 -0000 1.22
***************
*** 99,104 ****
private int state = STATE_UNINITIALISED;
- private BEEPError errMessage;
-
private Frame previousFrame;
--- 99,102 ----
***************
*** 975,988 ****
{
return this.profile;
- }
-
- BEEPError getErrorMessage()
- {
- return this.errMessage;
- }
-
- void setErrorMessage(BEEPError message)
- {
- this.errMessage = message;
}
--- 973,976 ----
|