Search in sources :

Example 1 with SimpleDeserializerRegistryHelper

use of org.opendaylight.openflowjava.protocol.impl.util.SimpleDeserializerRegistryHelper in project openflowplugin by opendaylight.

the class AdditionalMessageDeserializerInitializer method registerMessageDeserializers.

/**
 * Registers additional message deserializers.
 * @param registry registry to be filled with deserializers
 */
public static void registerMessageDeserializers(final DeserializerRegistry registry) {
    SimpleDeserializerRegistryHelper helper;
    // register OF v1.0 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF10_VERSION_ID, registry);
    helper.registerDeserializer(5, GetFeaturesInput.class, new OF10FeaturesRequestMessageFactory());
    helper.registerDeserializer(7, GetConfigInput.class, new GetConfigInputMessageFactory());
    helper.registerDeserializer(9, SetConfigInput.class, new SetConfigInputMessageFactory());
    helper.registerDeserializer(13, PacketOutInput.class, new OF10PacketOutInputMessageFactory());
    helper.registerDeserializer(14, FlowModInput.class, new OF10FlowModInputMessageFactory());
    helper.registerDeserializer(15, PortModInput.class, new OF10PortModInputMessageFactory());
    helper.registerDeserializer(16, MultipartRequestInput.class, new OF10StatsRequestInputFactory());
    helper.registerDeserializer(18, BarrierInput.class, new BarrierInputMessageFactory());
    helper.registerDeserializer(20, GetQueueConfigInput.class, new OF10GetQueueConfigInputMessageFactory());
    // register OF v1.3 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID, registry);
    helper.registerDeserializer(5, GetFeaturesInput.class, new GetFeaturesInputMessageFactory());
    helper.registerDeserializer(7, GetConfigInput.class, new GetConfigInputMessageFactory());
    helper.registerDeserializer(9, SetConfigInput.class, new SetConfigInputMessageFactory());
    helper.registerDeserializer(13, PacketOutInput.class, new PacketOutInputMessageFactory());
    helper.registerDeserializer(14, FlowModInput.class, new FlowModInputMessageFactory());
    helper.registerDeserializer(15, GroupModInput.class, new GroupModInputMessageFactory());
    helper.registerDeserializer(16, PortModInput.class, new PortModInputMessageFactory());
    helper.registerDeserializer(17, TableModInput.class, new TableModInputMessageFactory());
    helper.registerDeserializer(18, MultipartRequestInput.class, new MultipartRequestInputMessageFactory());
    helper.registerDeserializer(20, BarrierInput.class, new BarrierInputMessageFactory());
    helper.registerDeserializer(22, GetQueueConfigInput.class, new GetQueueConfigInputMessageFactory());
    helper.registerDeserializer(24, RoleRequestInput.class, new RoleRequestInputMessageFactory());
    helper.registerDeserializer(26, GetAsyncInput.class, new GetAsyncRequestMessageFactory());
    helper.registerDeserializer(28, SetAsyncInput.class, new SetAsyncInputMessageFactory());
    helper.registerDeserializer(29, MeterModInput.class, new MeterModInputMessageFactory());
    // register OF v1.4 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF14_VERSION_ID, registry);
    helper.registerDeserializer(7, GetConfigInput.class, new GetConfigInputMessageFactory());
    helper.registerDeserializer(9, SetConfigInput.class, new SetConfigInputMessageFactory());
    helper.registerDeserializer(20, BarrierInput.class, new BarrierInputMessageFactory());
    // register OF v1.5 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF15_VERSION_ID, registry);
    helper.registerDeserializer(7, GetConfigInput.class, new GetConfigInputMessageFactory());
    helper.registerDeserializer(9, SetConfigInput.class, new SetConfigInputMessageFactory());
    helper.registerDeserializer(20, BarrierInput.class, new BarrierInputMessageFactory());
}
Also used : SimpleDeserializerRegistryHelper(org.opendaylight.openflowjava.protocol.impl.util.SimpleDeserializerRegistryHelper) BarrierInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.BarrierInputMessageFactory) OF10GetQueueConfigInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10GetQueueConfigInputMessageFactory) GetQueueConfigInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetQueueConfigInputMessageFactory) OF10GetQueueConfigInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10GetQueueConfigInputMessageFactory) OF10FeaturesRequestMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FeaturesRequestMessageFactory) MultipartRequestInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartRequestInputMessageFactory) PortModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.PortModInputMessageFactory) OF10PortModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PortModInputMessageFactory) RoleRequestInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.RoleRequestInputMessageFactory) GetConfigInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetConfigInputMessageFactory) OF10StatsRequestInputFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10StatsRequestInputFactory) OF10PacketOutInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PacketOutInputMessageFactory) PacketOutInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.PacketOutInputMessageFactory) GetAsyncRequestMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetAsyncRequestMessageFactory) OF10PortModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PortModInputMessageFactory) OF10FlowModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FlowModInputMessageFactory) TableModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.TableModInputMessageFactory) OF10PacketOutInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PacketOutInputMessageFactory) GetFeaturesInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetFeaturesInputMessageFactory) OF10FlowModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FlowModInputMessageFactory) FlowModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FlowModInputMessageFactory) MeterModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MeterModInputMessageFactory) SetConfigInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.SetConfigInputMessageFactory) SetAsyncInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.SetAsyncInputMessageFactory) GroupModInputMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GroupModInputMessageFactory)

Example 2 with SimpleDeserializerRegistryHelper

use of org.opendaylight.openflowjava.protocol.impl.util.SimpleDeserializerRegistryHelper in project openflowplugin by opendaylight.

the class MessageDeserializerInitializer method registerMessageDeserializers.

/**
 * Registers message deserializers.
 * @param registry registry to be filled with deserializers
 */
public static void registerMessageDeserializers(final DeserializerRegistry registry) {
    SimpleDeserializerRegistryHelper helper;
    // register OF v1.0 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF10_VERSION_ID, registry);
    helper.registerDeserializer(0, HelloMessage.class, new OF10HelloMessageFactory());
    helper.registerDeserializer(1, ErrorMessage.class, new OF10ErrorMessageFactory());
    helper.registerDeserializer(2, EchoRequestMessage.class, new EchoRequestMessageFactory());
    helper.registerDeserializer(3, EchoOutput.class, new EchoReplyMessageFactory());
    helper.registerDeserializer(4, ExperimenterMessage.class, new VendorMessageFactory());
    helper.registerDeserializer(6, GetFeaturesOutput.class, new OF10FeaturesReplyMessageFactory());
    helper.registerDeserializer(8, GetConfigOutput.class, new GetConfigReplyMessageFactory());
    helper.registerDeserializer(10, PacketInMessage.class, new OF10PacketInMessageFactory());
    helper.registerDeserializer(11, FlowRemovedMessage.class, new OF10FlowRemovedMessageFactory());
    helper.registerDeserializer(12, PortStatusMessage.class, new OF10PortStatusMessageFactory());
    helper.registerDeserializer(17, MultipartReplyMessage.class, new OF10StatsReplyMessageFactory());
    helper.registerDeserializer(19, BarrierOutput.class, new BarrierReplyMessageFactory());
    helper.registerDeserializer(21, GetQueueConfigOutput.class, new OF10QueueGetConfigReplyMessageFactory());
    // register OF v1.3 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID, registry);
    helper.registerDeserializer(0, HelloMessage.class, new HelloMessageFactory());
    helper.registerDeserializer(1, ErrorMessage.class, new ErrorMessageFactory());
    helper.registerDeserializer(2, EchoRequestMessage.class, new EchoRequestMessageFactory());
    helper.registerDeserializer(3, EchoOutput.class, new EchoReplyMessageFactory());
    helper.registerDeserializer(4, ExperimenterMessage.class, new ExperimenterMessageFactory());
    helper.registerDeserializer(6, GetFeaturesOutput.class, new FeaturesReplyMessageFactory());
    helper.registerDeserializer(8, GetConfigOutput.class, new GetConfigReplyMessageFactory());
    helper.registerDeserializer(10, PacketInMessage.class, new PacketInMessageFactory());
    helper.registerDeserializer(11, FlowRemovedMessage.class, new FlowRemovedMessageFactory());
    helper.registerDeserializer(12, PortStatusMessage.class, new PortStatusMessageFactory());
    helper.registerDeserializer(19, MultipartReplyMessage.class, new MultipartReplyMessageFactory());
    helper.registerDeserializer(21, BarrierOutput.class, new BarrierReplyMessageFactory());
    helper.registerDeserializer(23, GetQueueConfigOutput.class, new QueueGetConfigReplyMessageFactory());
    helper.registerDeserializer(25, RoleRequestOutput.class, new RoleReplyMessageFactory());
    helper.registerDeserializer(27, GetAsyncOutput.class, new GetAsyncReplyMessageFactory());
    // register OF v1.4 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF14_VERSION_ID, registry);
    helper.registerDeserializer(0, HelloMessage.class, new HelloMessageFactory());
    helper.registerDeserializer(2, EchoRequestMessage.class, new EchoRequestMessageFactory());
    helper.registerDeserializer(3, EchoOutput.class, new EchoReplyMessageFactory());
    helper.registerDeserializer(8, GetConfigOutput.class, new GetConfigReplyMessageFactory());
    helper.registerDeserializer(21, BarrierOutput.class, new BarrierReplyMessageFactory());
    // register OF v1.5 message deserializers
    helper = new SimpleDeserializerRegistryHelper(EncodeConstants.OF15_VERSION_ID, registry);
    helper.registerDeserializer(0, HelloMessage.class, new HelloMessageFactory());
    helper.registerDeserializer(2, EchoRequestMessage.class, new EchoRequestMessageFactory());
    helper.registerDeserializer(3, EchoOutput.class, new EchoReplyMessageFactory());
    helper.registerDeserializer(8, GetConfigOutput.class, new GetConfigReplyMessageFactory());
    helper.registerDeserializer(21, BarrierOutput.class, new BarrierReplyMessageFactory());
}
Also used : GetAsyncReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetAsyncReplyMessageFactory) HelloMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.HelloMessageFactory) OF10HelloMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10HelloMessageFactory) OF10QueueGetConfigReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10QueueGetConfigReplyMessageFactory) QueueGetConfigReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.QueueGetConfigReplyMessageFactory) OF10HelloMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10HelloMessageFactory) OF10FlowRemovedMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FlowRemovedMessageFactory) OF10FeaturesReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FeaturesReplyMessageFactory) MultipartReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory) OF10ErrorMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10ErrorMessageFactory) ErrorMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.ErrorMessageFactory) OF10PortStatusMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PortStatusMessageFactory) EchoReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.EchoReplyMessageFactory) OF10QueueGetConfigReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10QueueGetConfigReplyMessageFactory) OF10FlowRemovedMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FlowRemovedMessageFactory) FlowRemovedMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FlowRemovedMessageFactory) OF10ErrorMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10ErrorMessageFactory) EchoRequestMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.EchoRequestMessageFactory) VendorMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.VendorMessageFactory) OF10FeaturesReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10FeaturesReplyMessageFactory) FeaturesReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FeaturesReplyMessageFactory) OF10PacketInMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PacketInMessageFactory) OF10PortStatusMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PortStatusMessageFactory) PortStatusMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.PortStatusMessageFactory) SimpleDeserializerRegistryHelper(org.opendaylight.openflowjava.protocol.impl.util.SimpleDeserializerRegistryHelper) PacketInMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.PacketInMessageFactory) OF10PacketInMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10PacketInMessageFactory) RoleReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.RoleReplyMessageFactory) BarrierReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.BarrierReplyMessageFactory) OF10StatsReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10StatsReplyMessageFactory) ExperimenterMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.ExperimenterMessageFactory) OF10QueueGetConfigReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.OF10QueueGetConfigReplyMessageFactory) QueueGetConfigReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.QueueGetConfigReplyMessageFactory) GetConfigReplyMessageFactory(org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetConfigReplyMessageFactory)

Aggregations

SimpleDeserializerRegistryHelper (org.opendaylight.openflowjava.protocol.impl.util.SimpleDeserializerRegistryHelper)2 BarrierInputMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.BarrierInputMessageFactory)1 BarrierReplyMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.BarrierReplyMessageFactory)1 EchoReplyMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.EchoReplyMessageFactory)1 EchoRequestMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.EchoRequestMessageFactory)1 ErrorMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.ErrorMessageFactory)1 ExperimenterMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.ExperimenterMessageFactory)1 FeaturesReplyMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FeaturesReplyMessageFactory)1 FlowModInputMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FlowModInputMessageFactory)1 FlowRemovedMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.FlowRemovedMessageFactory)1 GetAsyncReplyMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetAsyncReplyMessageFactory)1 GetAsyncRequestMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetAsyncRequestMessageFactory)1 GetConfigInputMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetConfigInputMessageFactory)1 GetConfigReplyMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetConfigReplyMessageFactory)1 GetFeaturesInputMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetFeaturesInputMessageFactory)1 GetQueueConfigInputMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GetQueueConfigInputMessageFactory)1 GroupModInputMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.GroupModInputMessageFactory)1 HelloMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.HelloMessageFactory)1 MeterModInputMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MeterModInputMessageFactory)1 MultipartReplyMessageFactory (org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory)1