/*
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.protocol.concepts;

import javax.annotation.concurrent.ThreadSafe;

@ThreadSafe
public class HandlerRegistry<CLASS, PARSER, SERIALIZER> {
	private final MultiRegistry<Class<? extends CLASS>, SERIALIZER> serializers = new MultiRegistry<>();
	private final MultiRegistry<Integer, PARSER> parsers = new MultiRegistry<>();

	public AbstractRegistration registerParser(final int type, final PARSER parser) {
		return parsers.register(type, parser);
	}

	public PARSER getParser(final int type) {
		return parsers.get(type);
	}

	public AbstractRegistration registerSerializer(final Class<? extends CLASS> clazz, final SERIALIZER serializer) {
		return serializers.register(clazz, serializer);
	}

	public SERIALIZER getSerializer(final Class<? extends CLASS> clazz) {
		return serializers.get(clazz);
	}
}

@@ -440,32 +440,14 @@
 ry%3CC
-LASS, PARSER, SERIALIZER
+, P, S
 %3E %7B%0A
@@ -496,25 +496,12 @@
 ds C
-LASS%3E, SERIALIZER
+%3E, S
 %3E se
@@ -574,21 +574,16 @@
 teger, P
-ARSER
 %3E parser
@@ -677,21 +677,16 @@
  final P
-ARSER
  parser)
@@ -746,13 +746,8 @@
 ic P
-ARSER
  get
@@ -870,28 +870,24 @@
 %3C? extends C
-LASS
 %3E clazz, fin
@@ -890,25 +890,16 @@
  final S
-ERIALIZER
  seriali
@@ -972,17 +972,8 @@
 ic S
-ERIALIZER
  get
@@ -1010,12 +1010,8 @@
 ds C
-LASS
 %3E cl

Rename generic arguments to silence sonar