Global cleanup of restconf client dependencies
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / ListenerRegistration.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.concepts;
9
10 import java.util.EventListener;
11
12 /**
13  * Class representing a {@link Registration} of an {@link EventListener}. This
14  * is interface provides the additional guarantee that the process of
15  * unregistration cannot fail for predictable reasons.
16  */
17 public interface ListenerRegistration<T extends EventListener> extends ObjectRegistration<T> {
18     /**
19      * Unregister the listener. No events should be delivered to the listener
20      * once this method returns successfully. While the interface contract
21      * allows an implementation to ignore the occurence of RuntimeExceptions,
22      * implementations are strongly encouraged to deal with such exceptions
23      * internally and to ensure invocations of this method do not fail in such
24      * circumstances.
25      */
26     @Override
27     void close();
28 }