Thread: [Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/core ChannelImpl.java,1.4,1.5 Sessi
Status: Beta
Brought to you by:
huston
|
From: Huston F. <hu...@us...> - 2003-06-03 02:38:11
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core
In directory sc8-pr-cvs1:/tmp/cvs-serv5309/src/org/beepcore/beep/core
Modified Files:
ChannelImpl.java SessionImpl.java
Log Message:
more windowing cleanup
Index: ChannelImpl.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/ChannelImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ChannelImpl.java 27 May 2003 21:37:40 -0000 1.4
--- ChannelImpl.java 3 Jun 2003 02:33:21 -0000 1.5
***************
*** 123,126 ****
--- 123,130 ----
private boolean blockingMessageListener = false;
+ // tuningProfile indicates that the profile for this channel will
+ // request a tuning reset
+ private boolean tuningProfile = false;
+
// in shutting down the session
// something for waiting synchronous messages (semaphores or something)
***************
*** 524,531 ****
}
- if (frame.isLast() && getState() == STATE_TUNING) {
- this.session.disableIO();
- }
-
if (frame.getMessageType() == Message.MESSAGE_TYPE_NUL) {
synchronized (recvReplyQueue) {
--- 528,531 ----
***************
*** 659,663 ****
* @param frame - the frame received by the session
*/
! void postFrame(Frame frame) throws BEEPException
{
log.trace("Channel::postFrame");
--- 659,663 ----
* @param frame - the frame received by the session
*/
! boolean postFrame(Frame frame) throws BEEPException
{
log.trace("Channel::postFrame");
***************
*** 680,683 ****
--- 680,686 ----
receiveFrame(frame);
+
+ return !(frame.isLast() == true &&
+ getState() == STATE_TUNING || tuningProfile == true);
}
Index: SessionImpl.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/SessionImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** SessionImpl.java 27 May 2003 21:37:41 -0000 1.5
--- SessionImpl.java 3 Jun 2003 02:33:21 -0000 1.6
***************
*** 1,7 ****
/*
! * Session.java $Revision$ $Date$
*
* Copyright (c) 2001 Invisible Worlds, Inc. All rights reserved.
! * Copyright (c) 2001,2002 Huston Franklin. All rights reserved.
* Copyright (c) 2002 Kevin Kress. All rights reserved.
*
--- 1,7 ----
/*
! * SessionImpl.java $Revision$ $Date$
*
* Copyright (c) 2001 Invisible Worlds, Inc. All rights reserved.
! * Copyright (c) 2001-2003 Huston Franklin. All rights reserved.
* Copyright (c) 2002 Kevin Kress. All rights reserved.
*
***************
*** 638,653 ****
try {
this.changeState(SESSION_STATE_ABORTED);
- this.disableIO();
- channels.clear();
-
- zero = null;
-
- fireSessionTerminated();
} catch (BEEPException e) {
// Ignore this since we are terminating anyway.
}
- }
synchronized void changeState(int newState) throws BEEPException {
try {
--- 638,654 ----
try {
this.changeState(SESSION_STATE_ABORTED);
} catch (BEEPException e) {
// Ignore this since we are terminating anyway.
}
+ this.disableIO();
+ channels.clear();
+
+ zero = null;
+
+ fireSessionTerminated();
+ }
+
synchronized void changeState(int newState) throws BEEPException {
try {
***************
*** 756,761 ****
*
*/
! protected void postFrame(Frame f) throws BEEPException {
! ops[state].postFrame(this, f);
}
--- 757,773 ----
*
*/
! protected boolean postFrame(Frame f) throws BEEPException {
! try {
! return ops[state].postFrame(this, f);
! } catch (BEEPException e) {
! this.terminate(e.getMessage());
!
! return false;
! } catch (Throwable e) {
! log.error("Error posting frame", e);
! this.terminate("Uncaught exception, terminating session");
!
! return false;
! }
}
***************
*** 1773,1777 ****
interface SessionOperations {
void changeState(SessionImpl s, int newState) throws BEEPException;
! void postFrame(SessionImpl s, Frame f) throws BEEPException;
}
--- 1785,1789 ----
interface SessionOperations {
void changeState(SessionImpl s, int newState) throws BEEPException;
! boolean postFrame(SessionImpl s, Frame f) throws BEEPException;
}
***************
*** 1787,1809 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
! try {
! // If we're in a PRE-GREETING state
! // only handle one frame at a time...
! // to avoid processing post-greeting
! // frames before the greeting has been
! // fully handled.
! synchronized (s) {
! ((ChannelImpl)f.getChannel()).postFrame(f);
! }
! } catch (BEEPException e) {
! s.terminate(e.getMessage());
!
! return;
! } catch (Throwable e) {
! log.error("Error posting frame", e);
! s.terminate("Uncaught exception, terminating session");
!
! return;
}
}
--- 1799,1810 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
! // If we're in a PRE-GREETING state
! // only handle one frame at a time...
! // to avoid processing post-greeting
! // frames before the greeting has been
! // fully handled.
! synchronized (s) {
! return ((ChannelImpl)f.getChannel()).postFrame(f);
}
}
***************
*** 1823,1845 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
! try {
! // If we're in a PRE-GREETING state
! // only handle one frame at a time...
! // to avoid processing post-greeting
! // frames before the greeting has been
! // fully handled.
! synchronized (s) {
! ((ChannelImpl)f.getChannel()).postFrame(f);
! }
! } catch (BEEPException e) {
! s.terminate(e.getMessage());
!
! return;
! } catch (Throwable e) {
! log.error("Error posting frame", e);
! s.terminate("Uncaught exception, terminating session");
!
! return;
}
}
--- 1824,1835 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
! // If we're in a PRE-GREETING state
! // only handle one frame at a time...
! // to avoid processing post-greeting
! // frames before the greeting has been
! // fully handled.
! synchronized (s) {
! return ((ChannelImpl)f.getChannel()).postFrame(f);
}
}
***************
*** 1860,1876 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
! try {
! ((ChannelImpl)f.getChannel()).postFrame(f);
! } catch (BEEPException e) {
! s.terminate(e.getMessage());
!
! return;
! } catch (Throwable e) {
! log.error("Error posting frame", e);
! s.terminate("Uncaught exception, terminating session");
!
! return;
! }
}
--- 1850,1855 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
! return ((ChannelImpl)f.getChannel()).postFrame(f);
}
***************
*** 1892,1909 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
! try {
! ((ChannelImpl)f.getChannel()).postFrame(f);
!
! } catch (BEEPException e) {
! s.terminate(e.getMessage());
!
! return;
! } catch (Throwable e) {
! log.error("Error posting frame", e);
! s.terminate("Uncaught exception, terminating session");
!
! return;
! }
}
--- 1871,1876 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
! return ((ChannelImpl)f.getChannel()).postFrame(f);
}
***************
*** 1922,1939 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
! try {
! ((ChannelImpl)f.getChannel()).postFrame(f);
!
! } catch (BEEPException e) {
! s.terminate(e.getMessage());
!
! return;
! } catch (Throwable e) {
! log.error("Error posting frame", e);
! s.terminate("Uncaught exception, terminating session");
!
! return;
! }
}
--- 1889,1894 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
! return ((ChannelImpl)f.getChannel()).postFrame(f);
}
***************
*** 1953,1960 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
// If we're in an error state
log.debug("Dropping a frame because the Session state is " +
"no longer active.");
}
--- 1908,1916 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
// If we're in an error state
log.debug("Dropping a frame because the Session state is " +
"no longer active.");
+ return false;
}
***************
*** 1973,1989 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
! try {
! ((ChannelImpl)f.getChannel()).postFrame(f);
! } catch (BEEPException e) {
! s.terminate(e.getMessage());
!
! return;
! } catch (Throwable e) {
! log.error("Error posting frame", e);
! s.terminate("Uncaught exception, terminating session");
!
! return;
! }
}
--- 1929,1934 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
! return ((ChannelImpl)f.getChannel()).postFrame(f);
}
***************
*** 1996,2003 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
// If we're in an error state
log.debug("Dropping a frame because the Session state is " +
"no longer active.");
}
--- 1941,1949 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
// If we're in an error state
log.debug("Dropping a frame because the Session state is " +
"no longer active.");
+ return false;
}
***************
*** 2010,2017 ****
}
! public void postFrame(SessionImpl s, Frame f) throws BEEPException {
// If we're in an error state
log.debug("Dropping a frame because the Session state is " +
"no longer active.");
}
--- 1956,1964 ----
}
! public boolean postFrame(SessionImpl s, Frame f) throws BEEPException {
// If we're in an error state
log.debug("Dropping a frame because the Session state is " +
"no longer active.");
+ return false;
}
|