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 for
MultiMsgCollector
interface.- Author:
- Vaclav Demcak, Timotej Kubas
-
Constructor Summary
ConstructorDescriptionMultiMsgCollectorImpl
(DeviceReplyProcessor deviceReplyProcessor, RequestContext<List<T>> requestContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
MultiMsgCollectorImpl
public MultiMsgCollectorImpl(DeviceReplyProcessor deviceReplyProcessor, RequestContext<List<T>> requestContext)
-
-
Method Details
-
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
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
-