2 * Copyright (c) 2015 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.openflowplugin.api.openflow.device.handlers;
10 import javax.annotation.Nonnull;
11 import javax.annotation.Nullable;
12 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
16 * Collects multipart msgs from device by provided XID and returns them
17 * to the caller as request/collection response one-to-one contract.
19 public interface MultiMsgCollector<T extends OfHeader> {
21 * Method adds a reply multipart message to the collection and if the message has marker
22 * "I'M A LAST" method set whole Collection to Future object and remove from cache.
24 * @param reqMore request more replies
25 * @param eventIdentifier event identifier
27 void addMultipartMsg(@Nonnull T reply, boolean reqMore, @Nullable EventIdentifier eventIdentifier);
30 * Null response could be a valid end multipart collecting event for barrier response scenario.
31 * We are not able to resolve an issue (it is or it isn't barrier scenario) so we have to finish
32 * collecting multipart messages successfully.
33 * @param eventIdentifier event identifier
35 void endCollecting(@Nullable EventIdentifier eventIdentifier);