blob: 200b9e0af24145ffce0c837811f0b84373b7337a [file] [log] [blame]
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -08001package net.floodlightcontroller.util;
2
Pavlin Radoslavovad008e02013-02-21 18:42:42 -08003import net.floodlightcontroller.util.serializers.CallerIdSerializer;
4
5import org.codehaus.jackson.annotate.JsonProperty;
6import org.codehaus.jackson.map.annotate.JsonSerialize;
7
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -08008/**
9 * The class representing a Caller ID for an ONOS component.
10 */
Pavlin Radoslavovad008e02013-02-21 18:42:42 -080011@JsonSerialize(using=CallerIdSerializer.class)
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -080012public class CallerId {
13 private String value;
14
15 /**
16 * Default constructor.
17 */
18 public CallerId() {}
19
20 /**
21 * Constructor from a string value.
22 *
23 * @param value the value to use.
24 */
25 public CallerId(String value) {
26 this.value = value;
27 }
28
29 /**
30 * Get the value of the Caller ID.
31 *
32 * @return the value of the Caller ID.
33 */
34 public String value() { return value; }
35
36 /**
37 * Set the value of the Caller ID.
38 *
39 * @param value the value to set.
40 */
41 public void setValue(String value) {
42 this.value = value;
43 }
44
45 /**
46 * Convert the Caller ID value to a string.
47 *
48 * @return the Caller ID value to a string.
49 */
50 @Override
51 public String toString() {
52 return value;
53 }
54}