Source code: com/voytechs/jnetanalyzer/message/AbstractMessageListener.java
1 /*
2 * File: AbstractMessageListener.java
3 * Auth: Mark Bednarczyk
4 * Date: DATE
5 * Id: $Id: AbstractMessageListener.java,v 1.1.1.1 2003/09/22 16:32:06 voytechs Exp $
6 ********************************************
7 Copyright (C) 2003 Mark Bednarczyk
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 ********************************************
23 * $Log: AbstractMessageListener.java,v $
24 * Revision 1.1.1.1 2003/09/22 16:32:06 voytechs
25 * Initial import.
26 *
27 */
28 package com.voytechs.jnetanalyzer.message;
29
30 import java.lang.*;
31 import java.util.*;
32
33 /**
34 * Convenience class that defines blank method for MessageListener interface.
35 *
36 * Message Listener interface is intended to notify listeners of various Message based events.
37 * A Message is made up of sequence of segments all of which combine into a single entity called
38 * a message. <BR><BR>
39 *
40 * At IP layer a message is the entire IP Dgram after all of the IP fragmeents have been
41 * reassmebled and each IP fragment is a message segement.<BR><BR>
42 *
43 * At TCP layer is made up of 2 messages, 1 for each stream in each direction. The entire stream
44 * is considered a message. Each TCP segment is a message segment from the beginning until the
45 * last segment arrives and TCP stream is closed.
46 */
47 public abstract class AbstractMessageListener
48 implements MessageListener {
49
50 /**
51 * Notifies that a new message has been seen.
52 */
53 public void msgNewMessage(Message msg) {
54 }
55
56 /**
57 * Notifies that a new segment of a message has been seen.
58 */
59 public void msgNewMessageSegment(Message msg, MessageSegment seg) {
60 }
61
62 /**
63 * Notifies that a message specific event occured. This event is protocol specific
64 * and will only be understood by specific/protocol coresponding listener.
65 */
66 public void msgMessageEvent(Message msg, MessageEvent event) {
67 }
68
69
70 /**
71 * Notifies that a message segment event occured. This event is protocol specific
72 * and will only be understood by specific/protocol coresponding listener.
73 */
74 public void msgMessageSegmentEvent(Message msg, MessageSegment seg, MessageEvent event) {
75 }
76
77 } /* END OF: AbstractMessageListener */