beepcore-java-commits Mailing List for Java BEEP Core (Page 8)
Status: Beta
Brought to you by:
huston
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(22) |
Aug
(1) |
Sep
|
Oct
(16) |
Nov
(60) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(3) |
Feb
|
Mar
(4) |
Apr
(2) |
May
(13) |
Jun
|
Jul
|
Aug
(10) |
Sep
(34) |
Oct
(27) |
Nov
(2) |
Dec
(2) |
2003 |
Jan
|
Feb
|
Mar
(3) |
Apr
(15) |
May
(11) |
Jun
(14) |
Jul
(5) |
Aug
(1) |
Sep
(24) |
Oct
(4) |
Nov
(26) |
Dec
(1) |
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Huston F. <hu...@us...> - 2002-08-29 01:50:45
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/lib In directory usw-pr-cvs1:/tmp/cvs-serv19606/src/org/beepcore/beep/lib Modified Files: SharedChannel.java Log Message: removed deprecated tag from sendMSG Index: SharedChannel.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/lib/SharedChannel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** SharedChannel.java 22 Aug 2002 05:28:41 -0000 1.6 --- SharedChannel.java 29 Aug 2002 01:50:42 -0000 1.7 *************** *** 90,99 **** * Send a message of type MSG. Sends <code>stream</code> as message's * payload. - * Note: If the stream is not complete, then the send will block - * until it is finished (a <code>read</code> returns a -1). * * @param stream <code>DataStream</code> that is read to send data. * @param replyListener ! * @return MessageStutas Can be queried to get status information about the * message. * --- 90,97 ---- * Send a message of type MSG. Sends <code>stream</code> as message's * payload. * * @param stream <code>DataStream</code> that is read to send data. * @param replyListener ! * @return MessageStatus Can be queried to get status information about the * message. * *************** *** 102,106 **** * * @throws BEEPException - * @deprecated */ public MessageStatus sendMSG(OutputDataStream stream, --- 100,103 ---- |
From: Huston F. <hu...@us...> - 2002-08-27 16:44:32
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile In directory usw-pr-cvs1:/tmp/cvs-serv19046 Modified Files: ProfileConfiguration.java Log Message: Fix from sadda for getProperty with a defaultValue Index: ProfileConfiguration.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/ProfileConfiguration.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ProfileConfiguration.java 27 Aug 2002 16:43:12 -0000 1.4 --- ProfileConfiguration.java 27 Aug 2002 16:44:29 -0000 1.5 *************** *** 61,65 **** */ public String getProperty(String key, String defaultValue) { ! return props.getProperty(key, String defaultValue); } --- 61,65 ---- */ public String getProperty(String key, String defaultValue) { ! return props.getProperty(key, defaultValue); } |
From: Huston F. <hu...@us...> - 2002-08-27 16:43:16
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile In directory usw-pr-cvs1:/tmp/cvs-serv18480 Modified Files: ProfileConfiguration.java Log Message: Fix from sadda for getProperty with a defaultValue Index: ProfileConfiguration.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/ProfileConfiguration.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ProfileConfiguration.java 9 Nov 2001 18:41:23 -0000 1.3 --- ProfileConfiguration.java 27 Aug 2002 16:43:12 -0000 1.4 *************** *** 1,7 **** - /* * ProfileConfiguration.java $Revision$ $Date$ * * Copyright (c) 2001 Invisible Worlds, Inc. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the --- 1,7 ---- /* * ProfileConfiguration.java $Revision$ $Date$ * * Copyright (c) 2001 Invisible Worlds, Inc. All rights reserved. + * Copyright (c) 2002 Huston Franklin All rights reserved. * * The contents of this file are subject to the Blocks Public License (the *************** *** 61,65 **** */ public String getProperty(String key, String defaultValue) { ! return props.getProperty(key); } --- 61,65 ---- */ public String getProperty(String key, String defaultValue) { ! return props.getProperty(key, String defaultValue); } |
From: Kevin K. <ki...@us...> - 2002-08-26 17:53:32
|
Update of /cvsroot/beepcore-java/beepcore-java In directory usw-pr-cvs1:/tmp/cvs-serv18545 Modified Files: build.xml Log Message: switched sasl-compile to depend on core-jar Index: build.xml =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/build.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** build.xml 2 May 2002 02:50:50 -0000 1.16 --- build.xml 26 Aug 2002 17:53:28 -0000 1.17 *************** *** 183,187 **** </target> ! <target name="sasl-compile" depends="core"> <mkdir dir="${sasl.build.dir}"/> <javac srcdir="${sasl.src.dir}/" --- 183,187 ---- </target> ! <target name="sasl-compile" depends="core-jar"> <mkdir dir="${sasl.build.dir}"/> <javac srcdir="${sasl.src.dir}/" |
From: Huston F. <hu...@us...> - 2002-08-22 18:11:28
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous In directory usw-pr-cvs1:/tmp/cvs-serv32164 Modified Files: SASLAnonymousProfile.java Log Message: Kion's fix for bug 469725: NPE on authentication failure Index: SASLAnonymousProfile.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/anonymous/SASLAnonymousProfile.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** SASLAnonymousProfile.java 29 Nov 2001 04:00:00 -0000 1.6 --- SASLAnonymousProfile.java 22 Aug 2002 18:11:22 -0000 1.7 *************** *** 161,165 **** */ public static Session AuthenticateSASLAnonymous(Session session, String id) ! throws BEEPException { if (id == null) { --- 161,165 ---- */ public static Session AuthenticateSASLAnonymous(Session session, String id) ! throws BEEPException, AuthenticationFailureException { if (id == null) { *************** *** 178,181 **** --- 178,190 ---- { auth.wait(); + + //FIX for bug 469725, if authentication fails no local Cred is + //set and a AuthenticationFailureException is thrown + if (ch.getSession().getLocalCredential() == null) + { + throw new AuthenticationFailureException( + "Could not authenticate with SASL/ANON"); + } + return ch.getSession(); } |
From: Huston F. <hu...@us...> - 2002-08-22 18:09:40
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv31435 Modified Files: Session.java Log Message: kion's fix for bug 558390: added fireChannelStarted for listener Index: Session.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** Session.java 20 Aug 2002 03:08:58 -0000 1.28 --- Session.java 22 Aug 2002 18:09:34 -0000 1.29 *************** *** 1231,1234 **** --- 1231,1236 ---- "Leaving profile response to Tuning Profile CCL"); + fireChannelStarted(ch); + return true; } catch (StartChannelException e) { *************** *** 1249,1252 **** --- 1251,1256 ---- return false; } + + fireChannelStarted(ch); return true; |
From: Huston F. <hu...@us...> - 2002-08-22 17:51:35
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/otp In directory usw-pr-cvs1:/tmp/cvs-serv25127 Modified Files: SASLOTPProfile.java Log Message: kion's fix for bug 581621 Index: SASLOTPProfile.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/otp/SASLOTPProfile.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** SASLOTPProfile.java 8 Nov 2001 05:51:34 -0000 1.7 --- SASLOTPProfile.java 22 Aug 2002 17:51:31 -0000 1.8 *************** *** 48,52 **** */ public class SASLOTPProfile ! extends SASLProfile implements StartChannelListener { --- 48,52 ---- */ public class SASLOTPProfile ! extends SASLProfile implements StartChannelListener, Profile { |
From: Huston F. <hu...@us...> - 2002-08-22 05:28:43
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/lib In directory usw-pr-cvs1:/tmp/cvs-serv17089 Modified Files: SharedChannel.java Log Message: sync'd with new constructor signature for Channel Index: SharedChannel.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/lib/SharedChannel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** SharedChannel.java 9 Nov 2001 19:10:58 -0000 1.5 --- SharedChannel.java 22 Aug 2002 05:28:41 -0000 1.6 *************** *** 64,68 **** { super(channel.getProfile(), String.valueOf(channel.getNumber()), ! channel.getMessageListener(), channel.getSession()); this.channel = channel; --- 64,68 ---- { super(channel.getProfile(), String.valueOf(channel.getNumber()), ! channel.getMessageListener(), true, channel.getSession()); this.channel = channel; |
From: Huston F. <hu...@us...> - 2002-08-20 03:09:00
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv19034 Modified Files: Channel.java Session.java Added Files: ThreadedMessageListener.java Log Message: State cleanup and tuning reset fix --- NEW FILE: ThreadedMessageListener.java --- /* * ThreadedMessageListener.java $Revision: 1.1 $ $Date: 2002/08/20 03:08:58 $ * * Copyright (c) 2002 Huston Franklin. All rights reserved. * */ package org.beepcore.beep.core; import edu.oswego.cs.dl.util.concurrent.PooledExecutor; import org.beepcore.beep.util.Log; class ThreadedMessageListener implements MessageListener, Runnable { ThreadedMessageListener(Channel channel, MessageListener listener) { this.channel = channel; this.listener = listener; } public void receiveMSG(Message message) throws BEEPError, AbortChannelException { this.message = (MessageMSG)message; try { callbackQueue.execute(this); } catch (InterruptedException e) { throw new BEEPError(BEEPError.CODE_REQUESTED_ACTION_ABORTED); } } public void run() { try { listener.receiveMSG(message); } catch (BEEPError e) { try { message.sendERR(e); } catch (BEEPException e2) { Log.logEntry(Log.SEV_ERROR, e2); } } catch (AbortChannelException e) { try { channel.close(); } catch (BEEPException e2) { Log.logEntry(Log.SEV_ERROR, e2); } } } public MessageListener getMessageListener() { return listener; } private Channel channel; private MessageListener listener; private MessageMSG message; private static final PooledExecutor callbackQueue = new PooledExecutor(); } Index: Channel.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Channel.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** Channel.java 12 May 2002 00:34:07 -0000 1.24 --- Channel.java 20 Aug 2002 03:08:58 -0000 1.25 *************** *** 3,7 **** * * Copyright (c) 2001 Invisible Worlds, Inc. All rights reserved. ! * Copyright (c) Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the --- 3,7 ---- * * Copyright (c) 2001 Invisible Worlds, Inc. All rights reserved. ! * Copyright (c) 2001,2002 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the *************** *** 23,28 **** import java.util.*; - import edu.oswego.cs.dl.util.concurrent.PooledExecutor; - import org.beepcore.beep.util.BufferSegment; import org.beepcore.beep.util.Log; --- 23,26 ---- *************** *** 43,50 **** // class variables ! static final int STATE_UNINITIALISED = 1; ! static final int STATE_OK = 2; ! static final int STATE_CLOSING = 3; ! static final int STATE_CLOSED = 4; private static final BufferSegment zeroLengthSegment = new BufferSegment(new byte[0]); --- 41,54 ---- // class variables ! public static final int STATE_INITIALIZED = 0; ! public static final int STATE_STARTING = 1; ! public static final int STATE_ACTIVE = 2; ! public static final int STATE_TUNING_PENDING = 3; ! public static final int STATE_TUNING = 4; ! public static final int STATE_CLOSE_PENDING = 5; ! public static final int STATE_CLOSING = 6; ! public static final int STATE_CLOSED = 7; ! public static final int STATE_ABORTED = 8; ! private static final BufferSegment zeroLengthSegment = new BufferSegment(new byte[0]); *************** *** 96,100 **** private LinkedList recvReplyQueue; ! private int state = STATE_UNINITIALISED; private Frame previousFrame; --- 100,104 ---- private LinkedList recvReplyQueue; ! private int state = STATE_INITIALIZED; private Frame previousFrame; *************** *** 117,121 **** private Object applicationData = null; ! private static final PooledExecutor callbackQueue = new PooledExecutor(); // in shutting down the session --- 121,125 ---- private Object applicationData = null; ! private boolean blockingMessageListener = false; // in shutting down the session *************** *** 136,145 **** */ protected Channel(String profile, String number, MessageListener listener, ! Session session) { this.profile = profile; this.encoding = Constants.ENCODING_DEFAULT; this.number = number; ! this.listener = listener; this.session = session; sentSequence = 0; --- 140,149 ---- */ protected Channel(String profile, String number, MessageListener listener, ! boolean blocking, Session session) { this.profile = profile; this.encoding = Constants.ENCODING_DEFAULT; this.number = number; ! this.setMessageListener(listener, blocking); this.session = session; sentSequence = 0; *************** *** 151,155 **** recvMSGQueue = new LinkedList(); recvReplyQueue = new LinkedList(); ! state = STATE_UNINITIALISED; recvWindowUsed = 0; recvWindowSize = DEFAULT_WINDOW_SIZE; --- 155,159 ---- recvMSGQueue = new LinkedList(); recvReplyQueue = new LinkedList(); ! state = STATE_INITIALIZED; recvWindowUsed = 0; recvWindowSize = DEFAULT_WINDOW_SIZE; *************** *** 159,162 **** --- 163,171 ---- } + protected Channel(String profile, String number, Session session) + { + this(profile, number, null, false, session); + } + /** * This is a special constructor for Channel Zero *************** *** 168,172 **** Channel(Session session, String number, ReplyListener rl) { ! this(null, number, null, session); // Add a MSG to the SentMSGQueue to fake channel into accepting the --- 177,181 ---- Channel(Session session, String number, ReplyListener rl) { ! this(null, number, null, false, session); // Add a MSG to the SentMSGQueue to fake channel into accepting the *************** *** 175,179 **** null, rl)); ! state = STATE_OK; } --- 184,188 ---- null, rl)); ! state = STATE_ACTIVE; } *************** *** 266,270 **** { synchronized (this) { ! if ((state != STATE_OK) && (state != STATE_UNINITIALISED)) { throw new BEEPException("Channel in a bad state."); } --- 275,279 ---- { synchronized (this) { ! if ((state != STATE_ACTIVE) && (state != STATE_INITIALIZED)) { throw new BEEPException("Channel in a bad state."); } *************** *** 306,311 **** public MessageListener setMessageListener(MessageListener ml) { ! MessageListener tmp = this.listener; ! this.listener = ml; return tmp; } --- 315,339 ---- public MessageListener setMessageListener(MessageListener ml) { ! return setMessageListener(ml, true); ! } ! ! MessageListener setMessageListener(MessageListener ml, ! boolean blocking) ! { ! MessageListener tmp = getMessageListener(); ! ! if (ml == null) { ! this.listener = null; ! this.blockingMessageListener = false; ! return tmp; ! } ! ! if (blocking) { ! this.listener = new ThreadedMessageListener(this, ml); ! } else { ! this.listener = ml; ! } ! ! this.blockingMessageListener = blocking; return tmp; } *************** *** 316,320 **** public MessageListener getMessageListener() { ! return this.listener; } --- 344,353 ---- public MessageListener getMessageListener() { ! if (this.blockingMessageListener) { ! return ! ((ThreadedMessageListener)this.listener).getMessageListener(); ! } else { ! return this.listener; ! } } *************** *** 348,354 **** MessageStatus status; ! if (state != STATE_OK) { switch (state) { ! case STATE_UNINITIALISED : throw new BEEPException("Channel is uninitialised."); default : --- 381,387 ---- MessageStatus status; ! if (state != STATE_ACTIVE && state != STATE_TUNING) { switch (state) { ! case STATE_INITIALIZED : throw new BEEPException("Channel is uninitialised."); default : *************** *** 393,399 **** * returns the state of the <code>Channel</code> * The possible states are (all defined as Channel.STATE_*): - * STATE_UNINITIALISED - after a channel is created - * STATE_OK - a channel is acknowledged by the other session - * STATE_CLOSED - the channel has been closed */ int getState() --- 426,429 ---- *************** *** 456,492 **** if (notify) { ! try { ! callbackQueue.execute(new Runnable() { ! public void run() { ! MessageMSG m; ! synchronized (recvMSGQueue) { ! m = (MessageMSG)recvMSGQueue.getFirst(); ! synchronized (m) { ! if (m.getDataStream().isComplete()) { ! recvMSGQueue.remove(m); ! } ! m.setNotified(); ! } ! } ! ! try { ! listener.receiveMSG(m); ! } catch (BEEPError e) { ! try { ! m.sendERR(e); ! } catch (BEEPException e2) { ! Log.logEntry(Log.SEV_ERROR, e2); ! } ! } catch (AbortChannelException e) { ! try { ! Channel.this.close(); ! } catch (BEEPException e2) { ! Log.logEntry(Log.SEV_ERROR, e2); ! } ! } ! } ! }); ! } catch (InterruptedException e) { ! throw new BEEPException(e); } } --- 486,514 ---- if (notify) { ! synchronized (recvMSGQueue) { ! final MessageMSG m = ! (MessageMSG)recvMSGQueue.getFirst(); ! synchronized (m) { ! if (m.getDataStream().isComplete()) { ! recvMSGQueue.remove(m); ! } ! m.setNotified(); ! } ! ! try { ! listener.receiveMSG(m); ! } catch (BEEPError e) { ! try { ! m.sendERR(e); ! } catch (BEEPException e2) { ! Log.logEntry(Log.SEV_ERROR, e2); ! } ! } catch (AbortChannelException e) { ! try { ! Channel.this.close(); ! } catch (BEEPException e2) { ! Log.logEntry(Log.SEV_ERROR, e2); ! } ! } } } *************** *** 532,535 **** --- 554,561 ---- } + if (frame.isLast() && getState() == STATE_TUNING) { + this.session.disableIO(); + } + if (frame.getMessageType() == Message.MESSAGE_TYPE_NUL) { synchronized (recvReplyQueue) { *************** *** 680,684 **** int msgno = frame.getMsgno(); ! if (state != STATE_OK) { throw new BEEPException("State is " + state); } --- 706,710 ---- int msgno = frame.getMsgno(); ! if (state != STATE_ACTIVE && state != STATE_TUNING) { throw new BEEPException("State is " + state); } *************** *** 801,807 **** void sendMessage(MessageStatus m) throws BEEPException { ! if (state != STATE_OK) { switch (state) { ! case STATE_UNINITIALISED : throw new BEEPException("Channel is uninitialised."); default : --- 827,833 ---- void sendMessage(MessageStatus m) throws BEEPException { ! if (state != STATE_ACTIVE && state != STATE_TUNING) { switch (state) { ! case STATE_INITIALIZED : throw new BEEPException("Channel is uninitialised."); default : Index: Session.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** Session.java 28 May 2002 04:50:06 -0000 1.27 --- Session.java 20 Aug 2002 03:08:58 -0000 1.28 *************** *** 177,181 **** zero = new Channel(this, CHANNEL_ZERO, greetingListener); ! zero.setMessageListener(new ChannelZeroListener()); channels.put(CHANNEL_ZERO, zero); --- 177,181 ---- zero = new Channel(this, CHANNEL_ZERO, greetingListener); ! zero.setMessageListener(new ChannelZeroListener(), false); channels.put(CHANNEL_ZERO, zero); *************** *** 228,232 **** zero = new Channel(this, CHANNEL_ZERO, greetingListener); ! zero.setMessageListener(new ChannelZeroListener()); channels.put(CHANNEL_ZERO, zero); --- 228,232 ---- zero = new Channel(this, CHANNEL_ZERO, greetingListener); ! zero.setMessageListener(new ChannelZeroListener(), false); channels.put(CHANNEL_ZERO, zero); *************** *** 525,529 **** */ Channel startChannelRequest(Collection profiles, MessageListener listener, ! boolean disableIO) throws BEEPException, BEEPError { --- 525,529 ---- */ Channel startChannelRequest(Collection profiles, MessageListener listener, ! boolean tuning) throws BEEPException, BEEPError { *************** *** 567,571 **** // @todo handle the data element // Create a channel ! Channel ch = new Channel(null, channelNumber, listener, this); // Make a message --- 567,571 ---- // @todo handle the data element // Create a channel ! Channel ch = new Channel(null, channelNumber, listener, true, this); // Make a message *************** *** 574,579 **** StringUtil.stringBufferToAscii(startBuffer)); // Tell Channel Zero to start us up ! StartReplyListener reply = new StartReplyListener(ch, disableIO); synchronized (reply) { this.zero.sendMSG(ds, reply); --- 574,585 ---- StringUtil.stringBufferToAscii(startBuffer)); + if (tuning) { + this.changeState(SESSION_STATE_TUNING_PENDING); + this.changeState(SESSION_STATE_TUNING); + this.zero.setState(Channel.STATE_TUNING); + } + // Tell Channel Zero to start us up ! StartReplyListener reply = new StartReplyListener(ch); synchronized (reply) { this.zero.sendMSG(ds, reply); *************** *** 592,600 **** } ! if (ch.getState() != Channel.STATE_OK) { throw new BEEPException("Error channel state (" + ch.getState() + ")"); } fireChannelStarted(ch); return ch; --- 598,610 ---- } ! if (ch.getState() != Channel.STATE_ACTIVE) { throw new BEEPException("Error channel state (" + ch.getState() + ")"); } + if (tuning) { + ch.setState(Channel.STATE_TUNING); + } + fireChannelStarted(ch); return ch; *************** *** 736,749 **** /** - * Method prevents Channel's window from being updated. - * - * - */ - protected void prohibitChannelWindowUpdates() - { - allowChannelWindowUpdates = false; - } - - /** * This method is used by a tuning profile to reset the session after the * tuning is complete. --- 746,749 ---- *************** *** 964,968 **** // Store the Channel ! ch.setState(Channel.STATE_OK); channels.put(ch.getNumberAsString(), ch); ((Message)zero.getAppData()).sendRPY(ds); --- 964,968 ---- // Store the Channel ! ch.setState(Channel.STATE_ACTIVE); channels.put(ch.getNumberAsString(), ch); ((Message)zero.getAppData()).sendRPY(ds); *************** *** 1221,1225 **** } ! ch = new Channel(p.uri, channelNumber, null, this); try { --- 1221,1225 ---- } ! ch = new Channel(p.uri, channelNumber, this); try { *************** *** 1532,1542 **** Channel channel; - boolean disableIO; BEEPError error; ! StartReplyListener(Channel channel, boolean disableIO) { this.channel = channel; - this.disableIO = disableIO; this.error = null; } --- 1532,1540 ---- Channel channel; BEEPError error; ! StartReplyListener(Channel channel) { this.channel = channel; this.error = null; } *************** *** 1553,1560 **** { try { - if (disableIO) { - Session.this.disableIO(); - } - Element topElement = processMessage(message); --- 1551,1554 ---- *************** *** 1600,1604 **** // set the state ! channel.setState(Channel.STATE_OK); channels.put(channel.getNumberAsString(), channel); --- 1594,1598 ---- // set the state ! channel.setState(Channel.STATE_ACTIVE); channels.put(channel.getNumberAsString(), channel); *************** *** 1612,1622 **** this.notify(); } - - // I'm not sure why this is being done. - if (TuningProfile.isTuningProfile(uri)) { - Log.logEntry(Log.SEV_DEBUG, CORE, - "Disabling this I/O thread"); - Session.this.disableIO(); - } } catch (Exception x) { throw new BEEPException(x.getMessage()); --- 1606,1609 ---- *************** *** 1742,1746 **** // set the state ! channel.setState(Channel.STATE_OK); channels.remove(channel.getNumberAsString()); --- 1729,1733 ---- // set the state ! channel.setState(Channel.STATE_ACTIVE); channels.remove(channel.getNumberAsString()); |
From: Huston F. <hu...@us...> - 2002-08-20 03:04:29
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv17632 Modified Files: TuningProfile.java Log Message: Cleanup Index: TuningProfile.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/TuningProfile.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** TuningProfile.java 8 Nov 2001 05:51:34 -0000 1.6 --- TuningProfile.java 20 Aug 2002 03:04:26 -0000 1.7 *************** *** 1,3 **** - /* * TuningProfile.java $Revision$ $Date$ --- 1,2 ---- *************** *** 245,267 **** { session.sendProfile(uri, data, channel); - } - - /** - * Weird support routine that should eventually be - * configuration based. We reset the session, actually - * start over and exchange greetings, when we negotiate - * certain security layers. TLS is such a layer. The - * method name could be more apropos. - * - * @param profile - * - */ - public static boolean isTuningProfile(String profile) - { - if (profile.equals(TLS_URI)) { - return true; - } - - return false; } --- 244,247 ---- |
From: Huston F. <hu...@us...> - 2002-05-28 04:50:09
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv31080/src/org/beepcore/beep/core Modified Files: Session.java Log Message: more state cleanup Index: Session.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** Session.java 27 May 2002 17:21:38 -0000 1.26 --- Session.java 28 May 2002 04:50:06 -0000 1.27 *************** *** 615,619 **** try { this.changeState(SESSION_STATE_ABORTED); ! shutdown(); } catch (BEEPException e) { --- 615,624 ---- try { this.changeState(SESSION_STATE_ABORTED); ! this.disableIO(); ! channels.clear(); ! ! zero = null; ! ! fireSessionTerminated(); } catch (BEEPException e) { *************** *** 1255,1269 **** return false; - } - - private void shutdown() throws BEEPException - { - this.disableIO(); - channels.clear(); - - zero = null; - - this.changeState(SESSION_STATE_CLOSED); - fireSessionTerminated(); } --- 1260,1263 ---- |
From: Huston F. <hu...@us...> - 2002-05-28 02:23:40
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv22259/src/org/beepcore/beep/core Modified Files: OutputDataStream.java Log Message: Changed visibility of constructors with mimeheaders Index: OutputDataStream.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/OutputDataStream.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** OutputDataStream.java 8 Nov 2001 05:51:34 -0000 1.2 --- OutputDataStream.java 28 May 2002 02:23:37 -0000 1.3 *************** *** 2,6 **** * OutputDataStream.java $Revision$ $Date$ * ! * Copyright (c) 2001 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the --- 2,6 ---- * OutputDataStream.java $Revision$ $Date$ * ! * Copyright (c) 2001,2002 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the *************** *** 49,53 **** * the stream. */ ! protected OutputDataStream(MimeHeaders headers) { this.mimeHeaders = headers; --- 49,53 ---- * the stream. */ ! public OutputDataStream(MimeHeaders headers) { this.mimeHeaders = headers; *************** *** 61,65 **** * the stream. */ ! protected OutputDataStream(MimeHeaders headers, BufferSegment buf) { this.mimeHeaders = headers; --- 61,65 ---- * the stream. */ ! public OutputDataStream(MimeHeaders headers, BufferSegment buf) { this.mimeHeaders = headers; |
From: Huston F. <hu...@us...> - 2002-05-27 17:21:42
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv16307 Modified Files: Session.java Log Message: fixed state change for closing the session Index: Session.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** Session.java 11 May 2002 01:44:57 -0000 1.25 --- Session.java 27 May 2002 17:21:38 -0000 1.26 *************** *** 1091,1111 **** // @todo fireEvent(SESSION_STATE_CLOSING); - /* - try { - if (!changeState(SESSION_STATE_CLOSING)) { - - // @todo got consecutive shutdowns... now what... log it? - // Utility.assert("Illegal state for shutdown", -1); - } - } catch (BEEPException e) { - throw new BEEPError(BEEPError.CODE_REQUESTED_ACTION_ABORTED, - e.getMessage()); - } - */ Log.logEntry(Log.SEV_DEBUG, "Closing Session with " + channels.size() + " channels"); - /* try { changeState(SESSION_STATE_CLOSING); } catch (BEEPException x) { --- 1091,1099 ---- // @todo fireEvent(SESSION_STATE_CLOSING); Log.logEntry(Log.SEV_DEBUG, "Closing Session with " + channels.size() + " channels"); try { + changeState(SESSION_STATE_CLOSE_PENDING); changeState(SESSION_STATE_CLOSING); } catch (BEEPException x) { *************** *** 1113,1117 **** return; } ! */ Iterator i = channels.values().iterator(); --- 1101,1105 ---- return; } ! Iterator i = channels.values().iterator(); |
From: Huston F. <hu...@us...> - 2002-05-12 00:34:10
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv2388/src/org/beepcore/beep/core Modified Files: Channel.java Log Message: fix for compiling with jdk 1.2.2 Index: Channel.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Channel.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** Channel.java 11 May 2002 01:44:57 -0000 1.23 --- Channel.java 12 May 2002 00:34:07 -0000 1.24 *************** *** 408,415 **** // previously sent message if (frame.getMessageType() == Message.MESSAGE_TYPE_MSG) { - MessageMSG m = null; boolean notify = false; synchronized (recvMSGQueue) { if (recvMSGQueue.size() != 0) { m = (MessageMSG) recvMSGQueue.getLast(); --- 408,415 ---- // previously sent message if (frame.getMessageType() == Message.MESSAGE_TYPE_MSG) { boolean notify = false; synchronized (recvMSGQueue) { + MessageMSG m = null; if (recvMSGQueue.size() != 0) { m = (MessageMSG) recvMSGQueue.getLast(); |
From: Huston F. <hu...@us...> - 2002-05-11 01:45:00
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv17334 Modified Files: Channel.java Session.java Log Message: cleanup Index: Channel.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Channel.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** Channel.java 8 May 2002 02:56:32 -0000 1.22 --- Channel.java 11 May 2002 01:44:57 -0000 1.23 *************** *** 47,51 **** static final int STATE_CLOSING = 3; static final int STATE_CLOSED = 4; - static final int STATE_ERROR = 5; private static final BufferSegment zeroLengthSegment = new BufferSegment(new byte[0]); --- 47,50 ---- *************** *** 351,357 **** if (state != STATE_OK) { switch (state) { - case STATE_ERROR : - throw new BEEPException("Channel in currently experiencing " + - "technical difficulties."); case STATE_UNINITIALISED : throw new BEEPException("Channel is uninitialised."); --- 350,353 ---- *************** *** 400,404 **** * STATE_OK - a channel is acknowledged by the other session * STATE_CLOSED - the channel has been closed - * STATE_ERROR - an error occured during creation or transmission */ int getState() --- 396,399 ---- *************** *** 808,814 **** if (state != STATE_OK) { switch (state) { - case STATE_ERROR : - throw new BEEPException("Channel in currently experiencing " + - "technical difficulties."); case STATE_UNINITIALISED : throw new BEEPException("Channel is uninitialised."); --- 803,806 ---- Index: Session.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** Session.java 8 May 2002 02:56:32 -0000 1.24 --- Session.java 11 May 2002 01:44:57 -0000 1.25 *************** *** 207,211 **** // check the channel state and return the appropriate exception ! if (zero.getState() == Channel.STATE_ERROR) { throw new BEEPException("Greeting exchange failed"); } --- 207,211 ---- // check the channel state and return the appropriate exception ! if (state != SESSION_STATE_ACTIVE) { throw new BEEPException("Greeting exchange failed"); } *************** *** 1667,1671 **** this.error = err; ! channel.setState(Channel.STATE_ERROR); channels.remove(channel.getNumberAsString()); --- 1667,1671 ---- this.error = err; ! channel.setState(Channel.STATE_CLOSED); channels.remove(channel.getNumberAsString()); *************** *** 1760,1764 **** // set the state ! channel.setState(Channel.STATE_ERROR); channels.remove(channel.getNumberAsString()); --- 1760,1764 ---- // set the state ! channel.setState(Channel.STATE_OK); channels.remove(channel.getNumberAsString()); |
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 ---- |
From: Huston F. <hu...@us...> - 2002-05-07 05:00:35
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv13655/src/org/beepcore/beep/core Modified Files: Session.java Log Message: session state cleanup - first pass Index: Session.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** Session.java 29 Nov 2001 04:00:00 -0000 1.22 --- Session.java 7 May 2002 05:00:33 -0000 1.23 *************** *** 67,79 **** // Constants ! public static final int SESSION_STATE_UNINITIALIZED = 0; ! public static final int SESSION_STATE_INITIALIZED = 1; ! public static final int SESSION_STATE_GREETING_SENT = 2; ! public static final int SESSION_STATE_GREETING_RECEIVED = 4; ! public static final int SESSION_STATE_ACTIVE = 7; ! public static final int SESSION_STATE_TUNING = 7; ! public static final int SESSION_STATE_CLOSING = 15; ! public static final int SESSION_STATE_TERMINATING = 16; ! public static final int SESSION_STATE_CLOSED = 8; private static final String CORE = "core"; --- 67,90 ---- // Constants ! public static final int SESSION_STATE_INITIALIZED = 0; ! public static final int SESSION_STATE_GREETING_SENT = 1; ! public static final int SESSION_STATE_ACTIVE = 2; ! public static final int SESSION_STATE_TUNING_PENDING = 3; ! public static final int SESSION_STATE_TUNING = 4; ! public static final int SESSION_STATE_CLOSE_PENDING = 5; ! public static final int SESSION_STATE_CLOSING = 6; ! public static final int SESSION_STATE_CLOSED = 7; ! public static final int SESSION_STATE_ABORTED = 8; ! ! private static final SessionOperations[] ops = ! {new INITIALIZED_SessionOperations(), ! new GREETING_SENT_SessionOperations(), ! new ACTIVE_SessionOperations(), ! new TUNING_PENDING_SessionOperations(), ! new TUNING_SessionOperations(), ! new CLOSE_PENDING_SessionOperations(), ! new CLOSING_SessionOperations(), ! new CLOSED_SessionOperations(), ! new ABORTED_SessionOperations()}; private static final String CORE = "core"; *************** *** 134,138 **** throws BEEPException { ! state = SESSION_STATE_UNINITIALIZED; allowChannelWindowUpdates = true; localCredential = localCred; --- 145,149 ---- throws BEEPException { ! state = SESSION_STATE_INITIALIZED; allowChannelWindowUpdates = true; localCredential = localCred; *************** *** 151,158 **** throw new BEEPException("Invalid parser configuration"); } - - // set starting channel number according to - // listener or initiator (odd or even) - changeState(SESSION_STATE_INITIALIZED); } --- 162,165 ---- *************** *** 259,267 **** /** ! * Peer-level call to simply close a session down, no questions ! * asked. ! * @todo we need to do a "niceShutdown" or something like that which ! * will accomodate Darren's needs by considering the results (exceptions) ! * from the CCL close channel callbacks instead of simply ignoring them. * * @throws BEEPException --- 266,271 ---- /** ! * Closes the <code>Session</code> gracefully. The profiles for ! * the open channels on the session may veto the close request. * * @throws BEEPException *************** *** 272,276 **** "Closing Session with " + channels.size() + " channels"); ! // changeState(SESSION_STATE_CLOSING); Iterator i = channels.values().iterator(); --- 276,281 ---- "Closing Session with " + channels.size() + " channels"); ! changeState(SESSION_STATE_CLOSE_PENDING); ! Iterator i = channels.values().iterator(); *************** *** 295,298 **** --- 300,305 ---- scl.closeChannel(ch); } catch (CloseChannelException cce) { + changeState(SESSION_STATE_ACTIVE); + // @todo rollback notification throw new BEEPException("Close Session rejected by local " + "channel " + ch.getProfile()); *************** *** 300,306 **** } ! // check with the peer to see if it is ok to close the channel ! zero.close(); ! shutdown(); } --- 307,332 ---- } ! changeState(SESSION_STATE_CLOSING); ! ! try { ! // check with the peer to see if it is ok to close the channel ! zero.close(); ! } catch (BEEPError e) { ! changeState(SESSION_STATE_ACTIVE); ! throw e; ! } catch (BEEPException e) { ! terminate(e.getMessage()); ! Log.logEntry(Log.SEV_ERROR, e); ! throw e; ! } ! ! this.disableIO(); ! // @todo close the socket ! ! channels.clear(); ! zero = null; ! ! this.changeState(SESSION_STATE_CLOSED); ! fireSessionTerminated(); } *************** *** 591,595 **** try { ! this.changeState(SESSION_STATE_TERMINATING); shutdown(); } catch (BEEPException e) { --- 617,621 ---- try { ! this.changeState(SESSION_STATE_ABORTED); shutdown(); } catch (BEEPException e) { *************** *** 599,640 **** } ! /** ! * Changes the state of the Session. ! * ! * ! * @param newState ! * ! * @return Returns <code>true</code> if the state changed was successful. ! * Otherwise, returns <code>false</code>. ! * ! */ ! protected synchronized boolean changeState(int newState) ! throws BEEPException ! { ! if ((state == SESSION_STATE_UNINITIALIZED) ! &&!((newState == SESSION_STATE_INITIALIZED) ! || (newState == SESSION_STATE_CLOSED))) { ! throw new BEEPException("Illegal session state transition"); ! } ! ! if ((state == SESSION_STATE_INITIALIZED) ! &&!((newState == SESSION_STATE_GREETING_SENT) ! || (newState == SESSION_STATE_GREETING_RECEIVED) ! || (newState == SESSION_STATE_CLOSED))) { ! throw new BEEPException("Illegal session state transition"); ! } ! ! if ((state == SESSION_STATE_ACTIVE) ! && (newState != SESSION_STATE_CLOSED) ! && (newState != SESSION_STATE_TERMINATING) ! && (newState != SESSION_STATE_CLOSING)) { ! throw new BEEPException("Illegal session state transition"); } ! state |= newState; ! ! Log.logEntry(Log.SEV_DEBUG, CORE, "State changed to " + state); ! ! return true; } --- 625,637 ---- } ! synchronized void changeState(int newState) throws BEEPException { ! try { ! ops[state].changeState(this, newState); ! } catch (BEEPException e) { ! e.printStackTrace(); ! throw e; } ! Log.logEntry(Log.SEV_DEBUG, CORE, "State changed to " + newState); } *************** *** 732,767 **** * */ ! protected void postFrame(Frame f) throws BEEPException ! { ! try { ! if (state == SESSION_STATE_ACTIVE) { ! f.getChannel().postFrame(f); ! ! // 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. ! } else if (state < SESSION_STATE_ACTIVE) { ! synchronized (this) { ! f.getChannel().postFrame(f); ! } ! } else { ! ! // If we're in an error state ! Log.logEntry(Log.SEV_DEBUG, ! "Dropping a frame because the Session state is " + ! "no longer active."); ! } ! } catch (BEEPException e) { ! this.terminate(e.getMessage()); ! ! return; ! } catch (Throwable e) { ! Log.logEntry(Log.SEV_ERROR, e); ! this.terminate("Uncaught exception, terminating session"); ! ! return; ! } } --- 729,734 ---- * */ ! protected void postFrame(Frame f) throws BEEPException { ! ops[state].postFrame(this, f); } *************** *** 1560,1564 **** } ! changeState(Session.SESSION_STATE_GREETING_RECEIVED); synchronized (this) { --- 1527,1531 ---- } ! changeState(Session.SESSION_STATE_ACTIVE); synchronized (this) { *************** *** 1801,1804 **** --- 1768,2004 ---- { terminate("Received an unexpected NUL"); + } + } + + interface SessionOperations { + void changeState(Session s, int newState) throws BEEPException; + void postFrame(Session s, Frame f) throws BEEPException; + } + + static class INITIALIZED_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + if (!((newState == SESSION_STATE_GREETING_SENT) || + (newState == SESSION_STATE_ABORTED))) + { + throw new BEEPException("Illegal session state transition"); + } + + s.state = newState; + } + + public void postFrame(Session 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) { + f.getChannel().postFrame(f); + } + } catch (BEEPException e) { + s.terminate(e.getMessage()); + + return; + } catch (Throwable e) { + Log.logEntry(Log.SEV_ERROR, e); + s.terminate("Uncaught exception, terminating session"); + + return; + } + } + } + + static class GREETING_SENT_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + if (!((newState == SESSION_STATE_ACTIVE) || + (newState == SESSION_STATE_ABORTED))) + { + throw new BEEPException("Illegal session state transition"); + } + + s.state = newState; + } + + public void postFrame(Session 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) { + f.getChannel().postFrame(f); + } + } catch (BEEPException e) { + s.terminate(e.getMessage()); + + return; + } catch (Throwable e) { + Log.logEntry(Log.SEV_ERROR, e); + s.terminate("Uncaught exception, terminating session"); + + return; + } + } + } + + static class ACTIVE_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + if (!((newState == SESSION_STATE_TUNING_PENDING) || + (newState == SESSION_STATE_CLOSE_PENDING) || + (newState == SESSION_STATE_ABORTED))) + { + throw new BEEPException("Illegal session state transition"); + } + + s.state = newState; + } + + public void postFrame(Session s, Frame f) throws BEEPException { + try { + f.getChannel().postFrame(f); + } catch (BEEPException e) { + s.terminate(e.getMessage()); + + return; + } catch (Throwable e) { + Log.logEntry(Log.SEV_ERROR, e); + s.terminate("Uncaught exception, terminating session"); + + return; + } + } + } + + static class TUNING_PENDING_SessionOperations + implements SessionOperations + { + public void changeState(Session s, int newState) throws BEEPException { + if (!((newState == SESSION_STATE_ACTIVE) || + (newState == SESSION_STATE_TUNING) || + (newState == SESSION_STATE_ABORTED))) + { + throw new BEEPException("Illegal session state transition"); + } + + s.state = newState; + } + + public void postFrame(Session s, Frame f) throws BEEPException { + try { + f.getChannel().postFrame(f); + + } catch (BEEPException e) { + s.terminate(e.getMessage()); + + return; + } catch (Throwable e) { + Log.logEntry(Log.SEV_ERROR, e); + s.terminate("Uncaught exception, terminating session"); + + return; + } + } + } + + static class TUNING_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + if (!((newState == SESSION_STATE_CLOSED) || + (newState == SESSION_STATE_ABORTED))) + { + throw new BEEPException("Illegal session state transition"); + } + + s.state = newState; + } + + public void postFrame(Session s, Frame f) throws BEEPException { + try { + f.getChannel().postFrame(f); + + } catch (BEEPException e) { + s.terminate(e.getMessage()); + + return; + } catch (Throwable e) { + Log.logEntry(Log.SEV_ERROR, e); + s.terminate("Uncaught exception, terminating session"); + + return; + } + } + } + + static class CLOSE_PENDING_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + if (!((newState == SESSION_STATE_ACTIVE) || + (newState == SESSION_STATE_CLOSING) || + (newState == SESSION_STATE_ABORTED))) + { + throw new BEEPException("Illegal session state transition"); + } + + s.state = newState; + } + + public void postFrame(Session s, Frame f) throws BEEPException { + // If we're in an error state + Log.logEntry(Log.SEV_DEBUG, + "Dropping a frame because the Session state is " + + "no longer active."); + } + } + + static class CLOSING_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + if (!((newState == SESSION_STATE_CLOSED) || + (newState == SESSION_STATE_ABORTED))) + { + throw new BEEPException("Illegal session state transition"); + } + + s.state = newState; + } + + public void postFrame(Session s, Frame f) throws BEEPException { + try { + f.getChannel().postFrame(f); + } catch (BEEPException e) { + s.terminate(e.getMessage()); + + return; + } catch (Throwable e) { + Log.logEntry(Log.SEV_ERROR, e); + s.terminate("Uncaught exception, terminating session"); + + return; + } + } + } + + static class CLOSED_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + throw new BEEPException("Illegal session state transition"); + } + + public void postFrame(Session s, Frame f) throws BEEPException { + // If we're in an error state + Log.logEntry(Log.SEV_DEBUG, + "Dropping a frame because the Session state is " + + "no longer active."); + } + } + + static class ABORTED_SessionOperations implements SessionOperations { + public void changeState(Session s, int newState) throws BEEPException { + throw new BEEPException("Illegal session state transition"); + } + + public void postFrame(Session s, Frame f) throws BEEPException { + // If we're in an error state + Log.logEntry(Log.SEV_DEBUG, + "Dropping a frame because the Session state is " + + "no longer active."); } } |
From: Huston F. <hu...@us...> - 2002-05-07 04:59:25
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/transport/tcp In directory usw-pr-cvs1:/tmp/cvs-serv13341/src/org/beepcore/beep/transport/tcp Modified Files: TCPSession.java Log Message: Decoupling transport from session state Index: TCPSession.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/transport/tcp/TCPSession.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** TCPSession.java 2 May 2002 02:07:58 -0000 1.23 --- TCPSession.java 7 May 2002 04:59:23 -0000 1.24 *************** *** 423,433 **** while (running) { - if (getState() == SESSION_STATE_CLOSING || - getState() == SESSION_STATE_TERMINATING || - getState() == SESSION_STATE_CLOSED) - { - break; - } - if (Log.isLogged(Log.SEV_DEBUG_VERBOSE)) { Log.logEntry(Log.SEV_DEBUG_VERBOSE, TCP_MAPPING, --- 423,426 ---- *************** *** 448,452 **** } catch (java.net.SocketException e) { ! if (getState() == SESSION_STATE_ACTIVE) { throw e; } --- 441,445 ---- } catch (java.net.SocketException e) { ! if (running) { throw e; } *************** *** 507,511 **** } catch (java.net.SocketException e) { ! if (getState() == SESSION_STATE_ACTIVE) { throw e; } --- 500,504 ---- } catch (java.net.SocketException e) { ! if (running) { throw e; } *************** *** 513,517 **** // socket closed intentionally (session closing) // so just return - running = false; return; } --- 506,509 ---- *************** *** 669,673 **** } catch (java.net.SocketException e) { ! if (getState() == SESSION_STATE_ACTIVE) { throw e; } --- 661,665 ---- } catch (java.net.SocketException e) { ! if (running) { throw e; } *************** *** 675,679 **** // socket closed intentionally (session closing) // so just return - running = false; return; } --- 667,670 ---- |
From: Huston F. <hu...@us...> - 2002-05-07 04:57:55
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv13031/src/org/beepcore/beep/core Modified Files: BEEPException.java Log Message: minor fixes Index: BEEPException.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/BEEPException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** BEEPException.java 16 Dec 2001 01:02:13 -0000 1.3 --- BEEPException.java 7 May 2002 04:57:51 -0000 1.4 *************** *** 55,67 **** } - /* - * requests to fill in the stack trace we will have to ignore. - * We can't throw an exception here, because this method is - * called by the constructor of Throwable - */ - public Throwable fillInStackTrace() { - return this; - } - /** * Returns the cause of this <code>BEEPException</code>. --- 55,58 ---- |
From: Huston F. <hu...@us...> - 2002-05-04 22:42:44
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl In directory usw-pr-cvs1:/tmp/cvs-serv598/src/org/beepcore/beep/profile/sasl Modified Files: Blob.java Log Message: removed static DocumentBuilder Index: Blob.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/profile/sasl/Blob.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Blob.java 29 Nov 2001 04:00:00 -0000 1.5 --- Blob.java 4 May 2002 22:42:41 -0000 1.6 *************** *** 3,6 **** --- 3,7 ---- * * Copyright (c) 2001 Invisible Worlds, Inc. All rights reserved. + * Copyright (c) 2002 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the *************** *** 71,75 **** private static BASE64Decoder decoder; private static BASE64Encoder encoder; - private static DocumentBuilder builder; // generic XML parser private static boolean initialized = false; --- 72,75 ---- *************** *** 79,82 **** --- 79,83 ---- private String stringified; private byte[] decodedData; + private DocumentBuilder builder; // generic XML parser /** *************** *** 97,100 **** --- 98,108 ---- } + try { + builder = + DocumentBuilderFactory.newInstance().newDocumentBuilder(); + } catch (ParserConfigurationException e) { + throw new SASLException(ERR_XML_PARSE_FAILURE); + } + // Validate status if (!validateStatus(status)) { *************** *** 142,145 **** --- 150,160 ---- } + try { + builder = + DocumentBuilderFactory.newInstance().newDocumentBuilder(); + } catch (ParserConfigurationException e) { + throw new SASLException(ERR_XML_PARSE_FAILURE); + } + // Validate status if (!validateStatus(status)) { *************** *** 196,199 **** --- 211,221 ---- } + try { + builder = + DocumentBuilderFactory.newInstance().newDocumentBuilder(); + } catch (ParserConfigurationException e) { + throw new SASLException(ERR_XML_PARSE_FAILURE); + } + // Validate status if (!validateStatus(status)) { *************** *** 242,245 **** --- 264,274 ---- init(); } + + try { + builder = + DocumentBuilderFactory.newInstance().newDocumentBuilder(); + } catch (ParserConfigurationException e) { + throw new SASLException(ERR_XML_PARSE_FAILURE); + } stringified = blob; *************** *** 294,305 **** } - if (builder == null) { - try { - builder = - DocumentBuilderFactory.newInstance().newDocumentBuilder(); - } catch (ParserConfigurationException e) { - throw new SASLException(ERR_XML_PARSE_FAILURE); - } - } if(statusMappings == null) { statusMappings = new String[STATUS_LIMIT]; --- 323,326 ---- *************** *** 363,367 **** * @throws SASLException */ ! private static Element processMessage(String blob) throws SASLException { --- 384,388 ---- * @throws SASLException */ ! private Element processMessage(String blob) throws SASLException { *************** *** 404,408 **** * */ ! private static String extractStatusFromBlob(String blob) throws SASLException { --- 425,429 ---- * */ ! private String extractStatusFromBlob(String blob) throws SASLException { *************** *** 430,434 **** * */ ! private static String extractDataFromBlob(String blob) throws SASLException { if (blob == null) { --- 451,455 ---- * */ ! private String extractDataFromBlob(String blob) throws SASLException { if (blob == null) { |
From: Huston F. <hu...@us...> - 2002-05-02 02:50:53
|
Update of /cvsroot/beepcore-java/beepcore-java In directory usw-pr-cvs1:/tmp/cvs-serv15347 Modified Files: build.xml Log Message: added configurable flags for javac Index: build.xml =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** build.xml 30 Mar 2002 16:19:42 -0000 1.15 --- build.xml 2 May 2002 02:50:50 -0000 1.16 *************** *** 5,8 **** --- 5,12 ---- <property name="release.name" value="${name}-${version}" /> + <property name="debug" value="on"/> + <property name="optimize" value="on"/> + <property name="deprecation" value="on"/> + <property name="beepcore.home" value="."/> <property name="build.dir" value="build" /> *************** *** 53,57 **** <target name="core" depends="init"> <mkdir dir="${core.build.dir}"/> ! <javac srcdir="${core.src.dir}/" destdir="${core.build.dir}" > <include name="**/core/*.java"/> <include name="**/lib/*.java"/> --- 57,65 ---- <target name="core" depends="init"> <mkdir dir="${core.build.dir}"/> ! <javac srcdir="${core.src.dir}/" ! destdir="${core.build.dir}" ! debug="${debug}" ! optimize="${optimize}" ! deprecation="${deprecation}"> <include name="**/core/*.java"/> <include name="**/lib/*.java"/> *************** *** 126,130 **** <target name="example-compile" depends="core-jar,sasl"> <mkdir dir="${example.build.dir}"/> ! <javac srcdir="${example.src.dir}/" destdir="${example.build.dir}" > <exclude name="**/util/Log4JLog.java"/> <classpath> --- 134,142 ---- <target name="example-compile" depends="core-jar,sasl"> <mkdir dir="${example.build.dir}"/> ! <javac srcdir="${example.src.dir}/" ! destdir="${example.build.dir}" ! debug="${debug}" ! optimize="${optimize}" ! deprecation="${deprecation}"> <exclude name="**/util/Log4JLog.java"/> <classpath> *************** *** 156,160 **** <target name="test" depends="example"> <mkdir dir="${test.build.dir}"/> ! <javac srcdir="${test.src.dir}/" destdir="${test.build.dir}" deprecation="on" > <include name="**/*.java"/> <classpath> --- 168,176 ---- <target name="test" depends="example"> <mkdir dir="${test.build.dir}"/> ! <javac srcdir="${test.src.dir}/" ! destdir="${test.build.dir}" ! debug="${debug}" ! optimize="${optimize}" ! deprecation="${deprecation}"> <include name="**/*.java"/> <classpath> *************** *** 169,173 **** <target name="sasl-compile" depends="core"> <mkdir dir="${sasl.build.dir}"/> ! <javac srcdir="${sasl.src.dir}/" destdir="${sasl.build.dir}" deprecation="on" > <include name="**/sasl/**/*.java"/> <classpath> --- 185,193 ---- <target name="sasl-compile" depends="core"> <mkdir dir="${sasl.build.dir}"/> ! <javac srcdir="${sasl.src.dir}/" ! destdir="${sasl.build.dir}" ! debug="${debug}" ! optimize="${optimize}" ! deprecation="${deprecation}"> <include name="**/sasl/**/*.java"/> <classpath> *************** *** 204,208 **** <target name="tls-jsse-compile" depends="core-jar"> <mkdir dir="${tls-jsse.build.dir}"/> ! <javac srcdir="${tls.src.dir}/" destdir="${tls-jsse.build.dir}" > <include name="**/jsse/*.java"/> <classpath> --- 224,232 ---- <target name="tls-jsse-compile" depends="core-jar"> <mkdir dir="${tls-jsse.build.dir}"/> ! <javac srcdir="${tls.src.dir}/" ! destdir="${tls-jsse.build.dir}" ! debug="${debug}" ! optimize="${optimize}" ! deprecation="${deprecation}"> <include name="**/jsse/*.java"/> <classpath> *************** *** 250,254 **** <target name="tls-ptls-compile" depends="core-jar"> <mkdir dir="${tls-ptls.build.dir}"/> ! <javac srcdir="${tls.src.dir}/" destdir="${tls-ptls.build.dir}" > <include name="**/ptls/*.java"/> <classpath> --- 274,282 ---- <target name="tls-ptls-compile" depends="core-jar"> <mkdir dir="${tls-ptls.build.dir}"/> ! <javac srcdir="${tls.src.dir}/" ! destdir="${tls-ptls.build.dir}" ! debug="${debug}" ! optimize="${optimize}" ! deprecation="${deprecation}"> <include name="**/ptls/*.java"/> <classpath> *************** *** 321,325 **** <target name="log4jlog" depends="init,log4jCheck" if="log4j-present"> <mkdir dir="${example.build.dir}"/> ! <javac srcdir="${example.src.dir}/" destdir="${example.build.dir}" > <include name="**/util/Log4JLog.java"/> <classpath> --- 349,357 ---- <target name="log4jlog" depends="init,log4jCheck" if="log4j-present"> <mkdir dir="${example.build.dir}"/> ! <javac srcdir="${example.src.dir}/" ! destdir="${example.build.dir}" ! debug="${debug}" ! optimize="${optimize}" ! deprecation="${deprecation}"> <include name="**/util/Log4JLog.java"/> <classpath> |
From: Huston F. <hu...@us...> - 2002-05-02 02:42:13
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv13362/src/org/beepcore/beep/core Modified Files: MessageMSG.java Log Message: better fix Index: MessageMSG.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/MessageMSG.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** MessageMSG.java 30 Apr 2002 04:06:22 -0000 1.7 --- MessageMSG.java 2 May 2002 02:42:11 -0000 1.8 *************** *** 146,152 **** public MessageStatus sendNUL() throws BEEPException { - OutputDataStream ds = new ByteOutputDataStream(new byte[0]); MessageStatus m = new MessageStatus(this.channel, MESSAGE_TYPE_NUL, ! this.msgno, ds); this.channel.sendMessage(m); return m; --- 146,151 ---- public MessageStatus sendNUL() throws BEEPException { MessageStatus m = new MessageStatus(this.channel, MESSAGE_TYPE_NUL, ! this.msgno, NULDataStream); this.channel.sendMessage(m); return m; *************** *** 172,174 **** --- 171,181 ---- return m; } + + private static OutputDataStream NULDataStream; + + static { + NULDataStream = new OutputDataStream(); + NULDataStream.setComplete(); + } + } |
From: Huston F. <hu...@us...> - 2002-05-02 02:08:01
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/transport/tcp In directory usw-pr-cvs1:/tmp/cvs-serv6782/src/org/beepcore/beep/transport/tcp Modified Files: TCPSession.java Log Message: Fix for frames with small payloads Index: TCPSession.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/transport/tcp/TCPSession.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** TCPSession.java 30 Apr 2002 17:09:35 -0000 1.22 --- TCPSession.java 2 May 2002 02:07:58 -0000 1.23 *************** *** 558,586 **** int count = amountRead - headerLength; ! System.arraycopy(headerBuffer, headerLength, payload, 0, count); ! while (count < payload.length) { ! int n = is.read(payload, count, payload.length - count); ! if (n == -1) { ! throw new SessionAbortedException(); ! } ! count += n; ! } ! if (Log.isLogged(Log.SEV_DEBUG_VERBOSE)) { ! Log.logEntry(Log.SEV_DEBUG_VERBOSE, TCP_MAPPING, ! new String(payload)); ! } ! for (int i = 0; i < Frame.TRAILER.length(); ++i) { ! int b = is.read(); ! if (b == -1) { ! throw new SessionAbortedException(); } ! if (((byte) b) != ((byte) Frame.TRAILER.charAt(i))) { ! throw new BEEPException("Malformed BEEP frame, " ! + "invalid trailer"); } } --- 558,611 ---- int count = amountRead - headerLength; ! if (count > payload.length) { ! System.arraycopy(headerBuffer, headerLength, payload, 0, ! payload.length); ! count -= payload.length; ! ! for (int i = 0; i < Frame.TRAILER.length(); ++i) { ! int b; ! if (count > 0) { ! b = headerBuffer[headerLength + payload.length + i]; ! --count; ! } else { ! b = is.read(); ! if (b == -1) { ! throw new SessionAbortedException(); ! } ! } ! if (((byte) b) != ((byte) Frame.TRAILER.charAt(i))) { ! throw new BEEPException("Malformed BEEP frame, " ! + "invalid trailer"); ! } ! } ! } else { ! System.arraycopy(headerBuffer, headerLength, payload, 0, count); ! while (count < payload.length) { ! int n = is.read(payload, count, payload.length - count); ! if (n == -1) { ! throw new SessionAbortedException(); ! } ! count += n; ! } ! if (Log.isLogged(Log.SEV_DEBUG_VERBOSE)) { ! Log.logEntry(Log.SEV_DEBUG_VERBOSE, TCP_MAPPING, ! new String(payload)); } ! for (int i = 0; i < Frame.TRAILER.length(); ++i) { ! int b = is.read(); ! ! if (b == -1) { ! throw new SessionAbortedException(); ! } ! ! if (((byte) b) != ((byte) Frame.TRAILER.charAt(i))) { ! throw new BEEPException("Malformed BEEP frame, " ! + "invalid trailer"); ! } } } |
From: Huston F. <hu...@us...> - 2002-04-30 17:09:43
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/transport/tcp In directory usw-pr-cvs1:/tmp/cvs-serv22840 Modified Files: TCPSession.java Log Message: fix for debug output Index: TCPSession.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/transport/tcp/TCPSession.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** TCPSession.java 27 Nov 2001 17:37:22 -0000 1.21 --- TCPSession.java 30 Apr 2002 17:09:35 -0000 1.22 *************** *** 295,299 **** Log.logEntry(Log.SEV_DEBUG_VERBOSE, TCP_MAPPING, "Wrote the following\n" + ! new String(outputBuf)); } } --- 295,299 ---- Log.logEntry(Log.SEV_DEBUG_VERBOSE, TCP_MAPPING, "Wrote the following\n" + ! new String(outputBuf, 0, n)); } } |
From: Huston F. <hu...@us...> - 2002-04-30 04:06:28
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv11530/core Modified Files: MessageMSG.java MessageStatus.java Log Message: ANS/NUL fix for Gabe Index: MessageMSG.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/MessageMSG.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** MessageMSG.java 10 Nov 2001 21:33:29 -0000 1.6 --- MessageMSG.java 30 Apr 2002 04:06:22 -0000 1.7 *************** *** 56,61 **** ++ansno; ! m = new MessageStatus(this.channel, this.msgno, this.ansno, ! stream); } --- 56,61 ---- ++ansno; ! m = new MessageStatus(this.channel, MESSAGE_TYPE_ANS, this.msgno, ! this.ansno, stream); } *************** *** 146,151 **** public MessageStatus sendNUL() throws BEEPException { MessageStatus m = new MessageStatus(this.channel, MESSAGE_TYPE_NUL, ! this.msgno, null); this.channel.sendMessage(m); return m; --- 146,152 ---- public MessageStatus sendNUL() throws BEEPException { + OutputDataStream ds = new ByteOutputDataStream(new byte[0]); MessageStatus m = new MessageStatus(this.channel, MESSAGE_TYPE_NUL, ! this.msgno, ds); this.channel.sendMessage(m); return m; Index: MessageStatus.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/MessageStatus.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** MessageStatus.java 8 Nov 2001 05:51:34 -0000 1.3 --- MessageStatus.java 30 Apr 2002 04:06:22 -0000 1.4 *************** *** 55,59 **** OutputDataStream data) { ! this(channel, messageType, msgno, data, null); } --- 55,59 ---- OutputDataStream data) { ! this(channel, messageType, msgno, -1, data, null); } *************** *** 64,67 **** --- 64,73 ---- } + MessageStatus(Channel channel, int messageType, int msgno, int ansno, + OutputDataStream data) + { + this(channel, messageType, msgno, ansno, data, null); + } + MessageStatus(Channel channel, int messageType, int msgno, int ansno, OutputDataStream data, ReplyListener replyListener) |