2 * Copyright (c) 2013 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.yangtools.concepts;
10 import org.eclipse.jdt.annotation.NonNull;
13 * Class representing a registration of an object. Such a registration is a proper resource and should be cleaned up
14 * when no longer required, so references to the object can be removed. This mechanism lies above the usual Java
15 * reference mechanism, as the entity where the object is registered may reside outside of the Java Virtual Machine.
17 * @param <T> Type of registered object
19 public interface ObjectRegistration<T> extends Registration {
21 * Return the object instance.
23 * @return Registered object.
25 @NonNull T getInstance();