1 /*
2 * The contents of this file are subject to the BT "ZEUS" Open Source
3 * Licence (L77741), Version 1.0 (the "Licence"); you may not use this file
4 * except in compliance with the Licence. You may obtain a copy of the Licence
5 * from $ZEUS_INSTALL/licence.html or alternatively from
6 * http://www.labs.bt.com/projects/agents/zeus/licence.htm
7 *
8 * Except as stated in Clause 7 of the Licence, software distributed under the
9 * Licence is distributed WITHOUT WARRANTY OF ANY KIND, either express or
10 * implied. See the Licence for the specific language governing rights and
11 * limitations under the Licence.
12 *
13 * The Original Code is within the package zeus.*.
14 * The Initial Developer of the Original Code is British Telecommunications
15 * public limited company, whose registered office is at 81 Newgate Street,
16 * London, EC1A 7AJ, England. Portions created by British Telecommunications
17 * public limited company are Copyright 1996-9. All Rights Reserved.
18 *
19 * THIS NOTICE MUST BE INCLUDED ON ANY COPY OF THIS FILE
20 */
21
22
23
24 package zeus.concepts;
25
26 import java.util.*;
27 import zeus.util.*;
28
29 public class RoutingRecord {
30 public String comms_key = null;
31 public String use_ref = null;
32 public String producer = null;
33 public String producer_id = null;
34 public String consumer = null;
35 public String consumer_id = null;
36
37 protected RoutingRecord() {
38 }
39
40 public RoutingRecord(String producer, String producer_id,
41 String consumer, String consumer_id,
42 String use_ref, String comms_key) {
43 this.use_ref = use_ref;
44 this.comms_key = comms_key;
45 this.producer = producer;
46 this.producer_id = producer_id;
47 this.consumer = consumer;
48 this.consumer_id = consumer_id;
49 }
50
51 public String toString() {
52 String out = "(:producer " + producer + " " +
53 ":producer_id " + producer_id + " " +
54 ":consumer " + consumer + " " +
55 ":consumer_id " + consumer_id + " " +
56 ":use_ref " + use_ref + " " +
57 ":comms_key " + comms_key +
58 ")";
59 return out;
60 }
61
62 public boolean equals(Object ob) {
63 if ( !(ob instanceof RoutingRecord) ) return false;
64 RoutingRecord rec = (RoutingRecord)ob;
65 return rec.producer.equals(producer) &&
66 rec.producer_id.equals(producer_id) &&
67 rec.consumer.equals(consumer) &&
68 rec.consumer_id.equals(consumer_id) &&
69 rec.use_ref.equals(use_ref);
70 }
71 }