01: /* Copyright 2004 Inderjeet Singh. All rights reserved. You may not modify,
02: * use, reproduce or distribute this software except in compliance with the
03: * terms of the license at http://tcpmon.dev.java.net/
04: * $Id: CallBack.java,v 1.2 2004/11/09 20:32:14 inder Exp $ */
05:
06: package tcpmon;
07:
08: /**
09: *
10: * @author Inderjeet Singh
11: */
12: public interface CallBack {
13: public void connectionFinished(CallBackData data);
14:
15: public static class CallBackData {
16: public CallBackData(int localPort, String srcHost,
17: String dstHost) {
18: this .localPort = localPort;
19: this .srcHost = srcHost;
20: this .dstHost = dstHost;
21: time = System.currentTimeMillis();
22: }
23:
24: public void set(String forwardData, String reverseData) {
25: this .forwardData = forwardData;
26: this .reverseData = reverseData;
27: }
28:
29: public void setState(String state) {
30: this .state = state;
31: }
32:
33: public String getSourceHost() {
34: return srcHost;
35: }
36:
37: public String getDestinationHost() {
38: return dstHost;
39: }
40:
41: public String getState() {
42: return state;
43: }
44:
45: public long getTime() {
46: return time;
47: }
48:
49: public int getLocalPort() {
50: return localPort;
51: }
52:
53: public String getForwardData() {
54: return forwardData;
55: }
56:
57: public String getReverseData() {
58: return reverseData;
59: }
60:
61: private String srcHost;
62: private String dstHost;
63: private String state;
64: private long time;
65: private int localPort;
66: private String forwardData;
67: private String reverseData;
68: }
69: }
|