slowr | c86750e | 2017-08-22 17:26:47 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2015-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.xran.identifiers; |
| 18 | |
| 19 | import org.onosproject.xran.codecs.pdu.HOComplete; |
| 20 | import org.onosproject.xran.codecs.pdu.UEAdmissionStatus; |
| 21 | import org.onosproject.xran.codecs.pdu.UEContextUpdate; |
| 22 | |
| 23 | public class contextUpdateHandler { |
| 24 | private UEContextUpdate contextUpdate; |
| 25 | private UEAdmissionStatus admissionStatus; |
| 26 | private HOComplete hoComplete; |
| 27 | |
| 28 | public UEContextUpdate getContextUpdate() { |
| 29 | return contextUpdate; |
| 30 | } |
| 31 | |
| 32 | public boolean setContextUpdate(UEContextUpdate contextUpdate) { |
| 33 | this.contextUpdate = contextUpdate; |
| 34 | |
| 35 | return admissionStatus != null || hoComplete != null; |
| 36 | |
| 37 | } |
| 38 | |
| 39 | public UEAdmissionStatus getAdmissionStatus() { |
| 40 | return admissionStatus; |
| 41 | } |
| 42 | |
| 43 | public boolean setAdmissionStatus(UEAdmissionStatus admissionStatus) { |
| 44 | this.admissionStatus = admissionStatus; |
| 45 | |
| 46 | return contextUpdate != null; |
| 47 | } |
| 48 | |
| 49 | public HOComplete getHoComplete() { |
| 50 | return hoComplete; |
| 51 | } |
| 52 | |
| 53 | public boolean setHoComplete(HOComplete hoComplete) { |
| 54 | this.hoComplete = hoComplete; |
| 55 | |
| 56 | return contextUpdate != null; |
| 57 | } |
| 58 | |
| 59 | @Override |
| 60 | public String toString() { |
| 61 | return "contextUpdateHandler{" + |
| 62 | "contextUpdate=" + (contextUpdate != null) + |
| 63 | ", admissionStatus=" + (admissionStatus != null) + |
| 64 | ", hoComplete=" + (hoComplete != null) + |
| 65 | '}'; |
| 66 | } |
| 67 | } |