1 /* ZNet - Java Compression Layer for a new Socket Factory
2 Copyright (C) 1999, Free Software Rulez
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18 The author of this program may be contacted at morgiaclaudio@yahoo.it. */
19
20 package java.net;
21
22 /**
23 * This exception is used to vehiculate the sequence number that originated the ack.
24 * The communication protocol is based on a send-ack scheme to acquire statistical
25 * data to model the channel.
26 * When a ack is received by the {@link java.net.Connector Connector} thread, this exception
27 * is thrown.
28 * @see java.net.Connector
29 * @author <a href="mailto:morgiaclaudio@yahoo.it">Claudio Morgia</a>
30 * @version 1.0
31 */
32 public class AckException extends Exception {
33 /**
34 * The sequence number to carry
35 */
36 protected long seqnum;
37
38 /**
39 * A simple constructor used to build the object storing the sequence number.
40 */
41 public AckException(long seqnum) {
42 this.seqnum=seqnum;
43 }
44
45 /**
46 * This method can be used to retrieve the carried sequence number
47 * @return the sequence number
48 */
49 public long getSeqNum() {
50 return seqnum;
51 }
52 }