Added Yang code generation for Multipart messages
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / connection / RpcResponseKey.java
1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
2
3 package org.opendaylight.openflowjava.protocol.impl.connection;
4
5
6 /**
7  * @author mirehak
8  *
9  */
10 public class RpcResponseKey {
11     
12     private final long xid;
13     private final String outputClazz;
14     /**
15      * @param xid
16      * @param outputClazz
17      */
18     public RpcResponseKey(long xid, String outputClazz) {
19         super();
20         this.xid = xid;
21         this.outputClazz = outputClazz;
22     }
23     
24     /**
25      * @return the xid
26      */
27     public long getXid() {
28         return xid;
29     }
30
31     /**
32      * @return the outputClazz
33      */
34     public String getOutputClazz() {
35         return outputClazz;
36     }
37
38     @Override
39     public int hashCode() {
40         final int prime = 31;
41         int result = 1;
42         result = prime * result
43                 + ((outputClazz == null) ? 0 : outputClazz.hashCode());
44         result = prime * result + (int) (xid ^ (xid >>> 32));
45         return result;
46     }
47
48     @Override
49     public boolean equals(Object obj) {
50         if (this == obj)
51             return true;
52         if (obj == null)
53             return false;
54         if (getClass() != obj.getClass())
55             return false;
56         RpcResponseKey other = (RpcResponseKey) obj;
57         if (outputClazz == null) {
58             if (other.outputClazz != null)
59                 return false;
60         } else if (!outputClazz.equals(other.outputClazz))
61             return false;
62         if (xid != other.xid)
63             return false;
64         return true;
65     }
66
67     @Override
68     public String toString() {
69         return "RpcResultKey [xid=" + xid + ", outputClazz=" + outputClazz
70                 + "]";
71     }
72
73 }