2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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 package org.opendaylight.controller.cluster.access.concepts;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.controller.cluster.access.ABIVersion;
12 import org.opendaylight.yangtools.concepts.WritableIdentifier;
15 * Abstract counterpart to a {@link Request}. This class should not be instantiated directly, but rather through
16 * {@link RequestFailure} and {@link RequestSuccess}, which provide appropriate specialization. It is visible purely for
17 * the purpose of allowing to check if an object is either of those specializations with a single instanceof check.
19 * @param <T> Target identifier type
20 * @param <C> Message type
22 public abstract class Response<T extends WritableIdentifier, C extends Response<T, C>> extends Message<T, C> {
23 protected interface SerialForm<T extends WritableIdentifier, C extends Response<T, C>>
24 extends Message.SerialForm<T, C> {
29 private static final long serialVersionUID = 1L;
31 Response(final @NonNull T target, final long sequence) {
32 super(target, sequence);
35 Response(final @NonNull C response, final @NonNull ABIVersion version) {
36 super(response, version);