2 * Copyright (c) 2015 Pantheon Technologies s.r.o. 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.openflowjava.protocol.api.connection;
10 import com.google.common.annotations.Beta;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierInput;
15 * Handler of the outbound queue. The queue has a maximum depth assigned when the
16 * handler is registered.
19 public interface OutboundQueueHandler {
21 * Create a new {@link BarrierInput barrier} message. This callback is invoked
22 * when the queue is being flushed to the switch. The barrier ensures that any
23 * outstanding requests are detected as either completed or failed.
25 * @param xid XID for the barrier message
26 * @return New barrier message.
28 @Nonnull BarrierInput createBarrierRequest(@Nonnull Long xid);
31 * Invoked whenever the underlying queue is refreshed. Implementations should
32 * ensure they are talking to the latest queue
33 * @param queue New queue instance, null indicates a shutdown, e.g. the queue
34 * is no longer available.
36 void onConnectionQueueChanged(OutboundQueue queue);