Search in sources :

Example 1 with FlowMessageSerializer

use of org.opendaylight.openflowplugin.impl.protocol.serialization.messages.FlowMessageSerializer in project openflowplugin by opendaylight.

the class MessageSerializerInjector method injectSerializers.

/**
 * Injects message serializers into provided
 * {@link org.opendaylight.openflowjava.protocol.api.extensibility.SerializerExtensionProvider}.
 * @param provider OpenflowJava serializer extension provider
 * @param isGroupAddModEnabled config to enale/disable GroupAddMod Message
 */
static void injectSerializers(final SerializerExtensionProvider provider, final boolean isGroupAddModEnabled) {
    // Inject new message serializers here using injector created by createInjector method
    final Function<Class<?>, Consumer<OFSerializer<? extends OfHeader>>> injector = createInjector(provider, EncodeConstants.OF13_VERSION_ID);
    injector.apply(FlowMessage.class).accept(new FlowMessageSerializer());
    injector.apply(MeterMessage.class).accept(new MeterMessageSerializer());
    injector.apply(PortMessage.class).accept(new PortMessageSerializer());
    injector.apply(GroupMessage.class).accept(new GroupMessageSerializer(isGroupAddModEnabled));
    injector.apply(MultipartRequest.class).accept(new MultipartRequestMessageSerializer());
    injector.apply(AsyncConfigMessage.class).accept(new AsyncConfigMessageSerializer());
}
Also used : MeterMessageSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.messages.MeterMessageSerializer) MeterMessage(org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterMessage) PortMessageSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.messages.PortMessageSerializer) GroupMessage(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupMessage) FlowMessageSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.messages.FlowMessageSerializer) MultipartRequestMessageSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.MultipartRequestMessageSerializer) PortMessage(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortMessage) Consumer(java.util.function.Consumer) GroupMessageSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.messages.GroupMessageSerializer) AsyncConfigMessageSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.messages.AsyncConfigMessageSerializer) AsyncConfigMessage(org.opendaylight.yang.gen.v1.urn.opendaylight.async.config.service.rev170619.AsyncConfigMessage) FlowMessage(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowMessage) MultipartRequest(org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.MultipartRequest)

Aggregations

Consumer (java.util.function.Consumer)1 AsyncConfigMessageSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.messages.AsyncConfigMessageSerializer)1 FlowMessageSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.messages.FlowMessageSerializer)1 GroupMessageSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.messages.GroupMessageSerializer)1 MeterMessageSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.messages.MeterMessageSerializer)1 PortMessageSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.messages.PortMessageSerializer)1 MultipartRequestMessageSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.MultipartRequestMessageSerializer)1 AsyncConfigMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.async.config.service.rev170619.AsyncConfigMessage)1 PortMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortMessage)1 FlowMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowMessage)1 GroupMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupMessage)1 MeterMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterMessage)1 MultipartRequest (org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.MultipartRequest)1