Search in sources :

Example 1 with MultipartReplyMessageDeserializer

use of org.opendaylight.openflowplugin.impl.protocol.deserialization.multipart.MultipartReplyMessageDeserializer in project openflowplugin by opendaylight.

the class MessageDeserializerInjector method injectDeserializers.

/**
 * Injects message deserializers into provided.
 * {@link org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerExtensionProvider}
 *
 * @param provider OpenflowJava deserializer extension provider
 */
static void injectDeserializers(final DeserializerExtensionProvider provider) {
    // Inject new message deserializers here using injector created by createInjector method
    final Function<Integer, Function<Class<? extends OfHeader>, Consumer<OFDeserializer<? extends OfHeader>>>> injector = createInjector(provider, EncodeConstants.OF13_VERSION_ID);
    injector.apply(10).apply(org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketInMessage.class).accept(new PacketInMessageDeserializer());
    injector.apply(19).apply(MultipartReply.class).accept(new MultipartReplyMessageDeserializer());
    injector.apply(27).apply(AsyncConfigMessage.class).accept(new AsyncConfigMessageDeserializer());
}
Also used : OFDeserializer(org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer) PacketInMessageDeserializer(org.opendaylight.openflowplugin.impl.protocol.deserialization.messages.PacketInMessageDeserializer) MultipartReply(org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.MultipartReply) PacketInMessage(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage) Function(java.util.function.Function) MultipartReplyMessageDeserializer(org.opendaylight.openflowplugin.impl.protocol.deserialization.multipart.MultipartReplyMessageDeserializer) OfHeader(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader) AsyncConfigMessage(org.opendaylight.yang.gen.v1.urn.opendaylight.async.config.service.rev170619.AsyncConfigMessage) AsyncConfigMessageDeserializer(org.opendaylight.openflowplugin.impl.protocol.deserialization.messages.AsyncConfigMessageDeserializer)

Aggregations

Function (java.util.function.Function)1 OFDeserializer (org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer)1 AsyncConfigMessageDeserializer (org.opendaylight.openflowplugin.impl.protocol.deserialization.messages.AsyncConfigMessageDeserializer)1 PacketInMessageDeserializer (org.opendaylight.openflowplugin.impl.protocol.deserialization.messages.PacketInMessageDeserializer)1 MultipartReplyMessageDeserializer (org.opendaylight.openflowplugin.impl.protocol.deserialization.multipart.MultipartReplyMessageDeserializer)1 AsyncConfigMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.async.config.service.rev170619.AsyncConfigMessage)1 MultipartReply (org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.MultipartReply)1 OfHeader (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader)1 PacketInMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage)1