2 * Copyright (C) 2014 Cisco Systems, Inc.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 * Authors : Thomas Bachman
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.jsonrpc;
12 import java.util.List;
14 import java.util.concurrent.ConcurrentHashMap;
17 public class RpcMessageMap {
18 private final Map<String, RpcMessage> messageMap = new ConcurrentHashMap<>();
20 public RpcMessage get(String messageName) {
21 return messageMap.get(messageName);
24 public void add(RpcMessage message) {
25 messageMap.put(message.getName(), message);
28 public void addList(List<RpcMessage> messages) {
29 for ( RpcMessage msg : messages ) {