All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opendaylight.yangtools.util.concurrent.NotificationManager Maven / Gradle / Ivy

There is a newer version: 14.0.4
Show newest version
/*
 * Copyright (c) 2014 Brocade Communications 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.yangtools.util.concurrent;

import java.util.concurrent.RejectedExecutionException;

/**
 * Interface for a class that manages queuing and dispatching notifications for multiple listeners.
 *
 * @author Thomas Pantelis
 *
 * @param  the listener type
 * @param  the notification type
 */
public interface NotificationManager {

    /**
     * Submits a notification to be queued and dispatched to the given listener.
     *
     * 

Note: This method may block if the listener queue is currently full. * * @param listener the listener to notify * @param notification the notification to dispatch * @throws RejectedExecutionException if the notification can't be queued for dispatching */ void submitNotification(L listener, N notification); /** * Submits notifications to be queued and dispatched to the given listener. * *

Note: This method may block if the listener queue is currently full. * * @param listener the listener to notify * @param notifications the notifications to dispatch * @throws RejectedExecutionException if a notification can't be queued for dispatching */ void submitNotifications(L listener, Iterable notifications); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy