Deprecate concents.{Codec,Deserializer,Serializer}
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / Codec.java
index 47a266b73f17fa1b129eb8e08ed7802bd04a22c5..55514f1d556dee88bcfbd8594378a90005eea64d 100644 (file)
@@ -7,10 +7,19 @@
  */
 package org.opendaylight.yangtools.concepts;
 
-public interface Codec<P,I> extends Serializer<P, I>, Deserializer<I, P> {
+/**
+ * The concept of a combined {@link Serializer} and {@link Deserializer}, which produces an object from some input.
+ * Implementations should consider subclassing {@link AbstractCodec}.
+ *
+ * @param <P> Product type
+ * @param <I> Input type
+ * @param <X> Error exception type
+ */
+@Deprecated(since = "7.0.9", forRemoval = true)
+public interface Codec<P, I, X extends Exception> extends Serializer<P, I, X>, Deserializer<I, P, X> {
     @Override
-    I deserialize(P input);
+    I deserialize(P input) throws X;
 
     @Override
-    P serialize(I input);
+    P serialize(I input) throws X;
 }