added javadocs and comments
diff --git a/src/main/java/org.onosproject.xran/identifiers/EcgiCrntiPair.java b/src/main/java/org.onosproject.xran/identifiers/EcgiCrntiPair.java
index 6347788..f12f62a 100644
--- a/src/main/java/org.onosproject.xran/identifiers/EcgiCrntiPair.java
+++ b/src/main/java/org.onosproject.xran/identifiers/EcgiCrntiPair.java
@@ -21,10 +21,13 @@
import org.onosproject.xran.codecs.api.CRNTI;
import org.onosproject.xran.codecs.api.ECGI;
+/**
+ * Class to maintain pair of ECGI and CRNTI.
+ */
public class EcgiCrntiPair extends Pair<ECGI, CRNTI> {
/**
- * Creates a new pair
+ * Creates a new pair.
*
* @param key The key for this pair
* @param value The value to use for this pair
@@ -33,6 +36,13 @@
super(key, value);
}
+ /**
+ * Return a new EcgiCrntiPair.
+ *
+ * @param key ECGI
+ * @param value CRNTI
+ * @return EcgiCrntiPair
+ */
public static EcgiCrntiPair valueOf(ECGI key, CRNTI value) {
return new EcgiCrntiPair(key, value);
}
diff --git a/src/main/java/org.onosproject.xran/identifiers/LinkId.java b/src/main/java/org.onosproject.xran/identifiers/LinkId.java
index e2b489a..7bb94f7 100644
--- a/src/main/java/org.onosproject.xran/identifiers/LinkId.java
+++ b/src/main/java/org.onosproject.xran/identifiers/LinkId.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-present Open Networking Laboratory
+ * Copyright 2015-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,12 +24,15 @@
import org.onosproject.xran.entities.RnibCell;
import org.onosproject.xran.entities.RnibUe;
+/**
+ * Class for LinkId.
+ */
@JsonPropertyOrder({
"ECGI",
"UEID"
})
@JsonIgnoreProperties(ignoreUnknown = true)
-public class LinkId {
+public final class LinkId {
@JsonIgnore
private RnibCell cell;
@JsonIgnore
@@ -40,59 +43,108 @@
this.ue = ue;
}
+ /**
+ * Create new LinkId.
+ * @param cell Cell
+ * @param ue UE
+ * @return new LinkId
+ */
public static LinkId valueOf(RnibCell cell, RnibUe ue) {
return new LinkId(cell, ue);
}
- public static LinkId valueOf(ECGI ecgi, Long UeId) {
+ /**
+ * Create new LinkID with ECGI and UE ID given.
+ * @param ecgi ECGI of new cell
+ * @param ueId UE ID of new UE
+ * @return LinkId
+ */
+ public static LinkId valueOf(ECGI ecgi, Long ueId) {
RnibCell cell = new RnibCell();
RnibUe ue = new RnibUe();
cell.setEcgi(ecgi);
- ue.setId(UeId);
+ ue.setId(ueId);
return new LinkId(cell, ue);
}
+ /**
+ * Get ECGI.
+ * @return ECGI
+ */
@JsonProperty("ECGI")
public ECGI getEcgi() {
return cell.getEcgi();
}
+ /**
+ * Set ECGI.
+ * @param sourceId ECGI
+ */
@JsonProperty("ECGI")
public void setEcgi(ECGI sourceId) {
cell.setEcgi(sourceId);
}
+ /**
+ * Get UE ID.
+ * @return long UE ID
+ */
@JsonProperty("UEID")
public Long getUeId() {
return ue.getId();
}
+ /**
+ * Set UE ID.
+ * @param destinationId long UE ID
+ */
@JsonProperty("UEID")
public void setUeId(Long destinationId) {
ue.setId(destinationId);
}
+ /**
+ * Get Cell.
+ * @return Cell
+ */
@JsonIgnore
public RnibCell getCell() {
return cell;
}
+ /**
+ * Set Cell.
+ * @param cell Cell
+ */
@JsonIgnore
public void setCell(RnibCell cell) {
this.cell = cell;
}
+ /**
+ * Get UE.
+ * @return UE
+ */
@JsonIgnore
public RnibUe getUe() {
return ue;
}
+ /**
+ * Set UE.
+ * @param ue UE
+ */
@JsonIgnore
public void setUe(RnibUe ue) {
this.ue = ue;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#equals()
+ */
@Override
public boolean equals(Object o) {
return this == o ||
@@ -103,6 +155,11 @@
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#hashCode()
+ */
@Override
public int hashCode() {
int result = cell.getEcgi().hashCode();
diff --git a/src/main/java/org.onosproject.xran/identifiers/contextUpdateHandler.java b/src/main/java/org.onosproject.xran/identifiers/contextUpdateHandler.java
index 82fdaed..4372d8b 100644
--- a/src/main/java/org.onosproject.xran/identifiers/contextUpdateHandler.java
+++ b/src/main/java/org.onosproject.xran/identifiers/contextUpdateHandler.java
@@ -20,15 +20,27 @@
import org.onosproject.xran.codecs.pdu.UEAdmissionStatus;
import org.onosproject.xran.codecs.pdu.UEContextUpdate;
-public class contextUpdateHandler {
+/**
+ * Class to handle UE Context Update packet.
+ */
+public class ContextUpdateHandler {
private UEContextUpdate contextUpdate;
private UEAdmissionStatus admissionStatus;
private HOComplete hoComplete;
+ /**
+ * Get Context Update.
+ * @return UEContextUpdate
+ */
public UEContextUpdate getContextUpdate() {
return contextUpdate;
}
+ /**
+ * Set Context Update.
+ * @param contextUpdate UEContextUpdate
+ * @return boolean to check context update was for admissionStatus packet or HOComplete packet
+ */
public boolean setContextUpdate(UEContextUpdate contextUpdate) {
this.contextUpdate = contextUpdate;
@@ -36,20 +48,38 @@
}
+ /**
+ * Get UEAdmissionStatus.
+ * @return UEAdmissionStatus
+ */
public UEAdmissionStatus getAdmissionStatus() {
return admissionStatus;
}
+ /**
+ * Set UEAdmissionStatus.
+ * @param admissionStatus UEAdmissionStatus
+ * @return boolean contextUpdate exists or not
+ */
public boolean setAdmissionStatus(UEAdmissionStatus admissionStatus) {
this.admissionStatus = admissionStatus;
return contextUpdate != null;
}
+ /**
+ * Get HOComplete.
+ * @return HOComplete
+ */
public HOComplete getHoComplete() {
return hoComplete;
}
+ /**
+ * Set HOComplete.
+ * @param hoComplete HOComplete
+ * @return boolean contextUpdate exists or not
+ */
public boolean setHoComplete(HOComplete hoComplete) {
this.hoComplete = hoComplete;
@@ -58,7 +88,7 @@
@Override
public String toString() {
- return "contextUpdateHandler{" +
+ return "ContextUpdateHandler{" +
"contextUpdate=" + (contextUpdate != null) +
", admissionStatus=" + (admissionStatus != null) +
", hoComplete=" + (hoComplete != null) +
diff --git a/src/main/java/org.onosproject.xran/identifiers/package-info.java b/src/main/java/org.onosproject.xran/identifiers/package-info.java
index 421cee2..d375057 100644
--- a/src/main/java/org.onosproject.xran/identifiers/package-info.java
+++ b/src/main/java/org.onosproject.xran/identifiers/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-present Open Networking Laboratory
+ * Copyright 2015-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.