Search in sources :

Example 1 with GoToTableInstructionSerializer

use of org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.GoToTableInstructionSerializer in project openflowplugin by opendaylight.

the class InstructionSerializerInjector method injectSerializers.

/**
 * Injects serializers into provided
 * {@link org.opendaylight.openflowjava.protocol.api.extensibility.SerializerExtensionProvider}.
 *
 * @param provider OpenflowJava serializer extension provider
 */
static void injectSerializers(final SerializerExtensionProvider provider) {
    // Inject new instruction serializers here using injector created by createInjector method
    final Function<Class<? extends Instruction>, Consumer<OFSerializer<? extends Instruction>>> injector = createInjector(provider, EncodeConstants.OF13_VERSION_ID);
    injector.apply(ApplyActionsCase.class).accept(new ApplyActionsInstructionSerializer());
    injector.apply(ClearActionsCase.class).accept(new ClearActionsInstructionSerializer());
    injector.apply(GoToTableCase.class).accept(new GoToTableInstructionSerializer());
    injector.apply(MeterCase.class).accept(new MeterInstructionSerializer());
    injector.apply(WriteActionsCase.class).accept(new WriteActionsInstructionSerializer());
    injector.apply(WriteMetadataCase.class).accept(new WriteMetadataInstructionSerializer());
}
Also used : GoToTableInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.GoToTableInstructionSerializer) WriteMetadataCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteMetadataCase) MeterCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.MeterCase) ClearActionsInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.ClearActionsInstructionSerializer) WriteActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteActionsCase) WriteMetadataInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.WriteMetadataInstructionSerializer) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction) ClearActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCase) Consumer(java.util.function.Consumer) ApplyActionsInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.ApplyActionsInstructionSerializer) GoToTableCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.GoToTableCase) WriteActionsInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.WriteActionsInstructionSerializer) MeterInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.MeterInstructionSerializer) ApplyActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCase)

Aggregations

Consumer (java.util.function.Consumer)1 ApplyActionsInstructionSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.ApplyActionsInstructionSerializer)1 ClearActionsInstructionSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.ClearActionsInstructionSerializer)1 GoToTableInstructionSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.GoToTableInstructionSerializer)1 MeterInstructionSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.MeterInstructionSerializer)1 WriteActionsInstructionSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.WriteActionsInstructionSerializer)1 WriteMetadataInstructionSerializer (org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.WriteMetadataInstructionSerializer)1 Instruction (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction)1 ApplyActionsCase (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCase)1 ClearActionsCase (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCase)1 GoToTableCase (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.GoToTableCase)1 MeterCase (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.MeterCase)1 WriteActionsCase (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteActionsCase)1 WriteMetadataCase (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteMetadataCase)1