Ray Milkey | e97ede9 | 2014-11-20 10:43:12 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Open Networking Laboratory |
| 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 | */ |
Brian O'Connor | 6de2e20 | 2015-05-21 14:30:41 -0700 | [diff] [blame] | 16 | package org.onosproject.net.resource.link; |
Ray Milkey | e97ede9 | 2014-11-20 10:43:12 -0800 | [diff] [blame] | 17 | |
| 18 | import java.util.Collection; |
| 19 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 20 | import org.onosproject.event.AbstractEvent; |
Ray Milkey | e97ede9 | 2014-11-20 10:43:12 -0800 | [diff] [blame] | 21 | |
| 22 | import com.google.common.collect.ImmutableList; |
| 23 | |
| 24 | /** |
| 25 | * Describes an event related to a Link Resource. |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 26 | * |
| 27 | * @deprecated in Emu Release |
Ray Milkey | e97ede9 | 2014-11-20 10:43:12 -0800 | [diff] [blame] | 28 | */ |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 29 | @Deprecated |
Ray Milkey | e97ede9 | 2014-11-20 10:43:12 -0800 | [diff] [blame] | 30 | public final class LinkResourceEvent |
| 31 | extends AbstractEvent<LinkResourceEvent.Type, Collection<LinkResourceAllocations>> { |
| 32 | |
| 33 | /** |
| 34 | * Type of resource this event is for. |
| 35 | */ |
| 36 | public enum Type { |
| 37 | /** Additional resources are now available. */ |
| 38 | ADDITIONAL_RESOURCES_AVAILABLE |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Constructs a link resource event. |
| 43 | * |
| 44 | * @param type type of resource event to create |
| 45 | * @param linkResourceAllocations allocations that are now available |
| 46 | */ |
| 47 | public LinkResourceEvent(Type type, |
| 48 | Collection<LinkResourceAllocations> linkResourceAllocations) { |
| 49 | super(type, ImmutableList.copyOf(linkResourceAllocations)); |
| 50 | } |
| 51 | } |