Search in sources :

Example 46 with SerializerRegistryImpl

use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.

the class GetFeaturesInputMessageFactoryTest method startUp.

/**
 * Initializes serializer registry and stores correct factory in field.
 */
@Before
public void startUp() {
    registry = new SerializerRegistryImpl();
    registry.init();
    featuresFactory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, GetFeaturesInput.class));
}
Also used : SerializerRegistryImpl(org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl) MessageTypeKey(org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey) Before(org.junit.Before)

Example 47 with SerializerRegistryImpl

use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.

the class GroupModInputMessageFactoryTest method startUp.

/**
 * Initializes serializer registry and stores correct factory in field.
 */
@Before
public void startUp() {
    registry = new SerializerRegistryImpl();
    registry.init();
    groupModFactory = new GroupModInputMessageFactory(false);
}
Also used : SerializerRegistryImpl(org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl) Before(org.junit.Before)

Example 48 with SerializerRegistryImpl

use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.

the class MultipartRequestMeterFeaturesTest method startUp.

/**
 * Initializes serializer registry and stores correct factory in field.
 */
@Before
public void startUp() {
    registry = new SerializerRegistryImpl();
    registry.init();
    multipartFactory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, MultipartRequestInput.class));
}
Also used : SerializerRegistryImpl(org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl) MessageTypeKey(org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey) Before(org.junit.Before)

Example 49 with SerializerRegistryImpl

use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.

the class MultipartRequestTableFeaturesTest method startUp.

/**
 * Initializes serializer registry and stores correct factory in field.
 */
@Before
public void startUp() {
    Mockito.when(mockRegistry.getSerializer((MessageTypeKey<?>) Matchers.any())).thenReturn(serializer);
    registry = new SerializerRegistryImpl();
    registry.init();
    multipartFactory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, MultipartRequestInput.class));
}
Also used : SerializerRegistryImpl(org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl) MessageTypeKey(org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey) Before(org.junit.Before)

Example 50 with SerializerRegistryImpl

use of org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl in project openflowplugin by opendaylight.

the class OF10StatsRequestAggregateTest method startUp.

/**
 * Initializes serializer registry and stores correct factory in field.
 */
@Before
public void startUp() {
    registry = new SerializerRegistryImpl();
    registry.init();
    statsFactory = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, MultipartRequestInput.class));
}
Also used : SerializerRegistryImpl(org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl) MessageTypeKey(org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey) Before(org.junit.Before)

Aggregations

SerializerRegistryImpl (org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl)63 Before (org.junit.Before)61 MessageTypeKey (org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey)55 SerializerRegistry (org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry)23 ByteBuf (io.netty.buffer.ByteBuf)1 Test (org.junit.Test)1 SerializerRegistryInjector (org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistryInjector)1 GetAsyncOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncOutput)1 GetAsyncOutputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncOutputBuilder)1