Class MultiMsgCollectorImpl<T extends OfHeader>
- java.lang.Object
-
- org.opendaylight.openflowplugin.impl.device.listener.MultiMsgCollectorImpl<T>
-
- All Implemented Interfaces:
MultiMsgCollector<T>
public class MultiMsgCollectorImpl<T extends OfHeader> extends Object implements MultiMsgCollector<T>
Implementation forMultiMsgCollector
interface.- Author:
- Vaclav Demcak, Timotej Kubas
-
-
Constructor Summary
Constructors Constructor Description MultiMsgCollectorImpl(DeviceReplyProcessor deviceReplyProcessor, RequestContext<List<T>> requestContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMultipartMsg(@NonNull T reply, boolean reqMore, @Nullable EventIdentifier eventIdentifier)
Method adds a reply multipart message to the collection and if the message has marker "I'M A LAST" method set whole Collection to Future object and remove from cache.void
endCollecting(@Nullable EventIdentifier eventIdentifier)
Null response could be a valid end multipart collecting event for barrier response scenario.
-
-
-
Constructor Detail
-
MultiMsgCollectorImpl
public MultiMsgCollectorImpl(DeviceReplyProcessor deviceReplyProcessor, RequestContext<List<T>> requestContext)
-
-
Method Detail
-
addMultipartMsg
public void addMultipartMsg(@NonNull T reply, boolean reqMore, @Nullable EventIdentifier eventIdentifier)
Description copied from interface:MultiMsgCollector
Method adds a reply multipart message to the collection and if the message has marker "I'M A LAST" method set whole Collection to Future object and remove from cache.- Specified by:
addMultipartMsg
in interfaceMultiMsgCollector<T extends OfHeader>
- Parameters:
reply
- replyreqMore
- request more replieseventIdentifier
- event identifier
-
endCollecting
public void endCollecting(@Nullable EventIdentifier eventIdentifier)
Description copied from interface:MultiMsgCollector
Null response could be a valid end multipart collecting event for barrier response scenario. We are not able to resolve an issue (it is or it isn't barrier scenario) so we have to finish collecting multipart messages successfully.- Specified by:
endCollecting
in interfaceMultiMsgCollector<T extends OfHeader>
- Parameters:
eventIdentifier
- event identifier
-
-