* In case of handling multiple multiple structures of same type (actions,
* instructions, match entries, ... ) which are differentiated by
* vendor / experimenter subtype, vendor has to switch / choose between
- * these subtypes. <br />
+ * these subtypes.<br>
*
* This has to be done in this way because of experimenter headers, which
* provide only vendor / experimenter ID. Subtype position may be different
*/
void registerQueuePropertyDeserializer(ExperimenterIdDeserializerKey key,
OFDeserializer<QueueProperty> deserializer);
-}
\ No newline at end of file
+}
/**
* Unregisters deserializer
* @param key used for deserializer lookup
- * @param deserializer deserializer instance
* @return true if deserializer was removed,
* false if no deserializer was found under specified key
*/
* In case of handling multiple structures of same type (actions,
* instructions, match entries, ... ) which are differentiated by
* vendor / experimenter subtype, vendor has to switch / choose between
- * these subtypes. <br />
+ * these subtypes.<br>
*
* This has to be done in this way because of unknown augmentations
* - that's why vendor has to handle it in his own implementations.
*/
void registerMeterBandSerializer(ExperimenterIdSerializerKey<MeterBandExperimenterCase> key,
OFSerializer<MeterBandExperimenterCase> serializer);
-}
\ No newline at end of file
+}
import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
-
-
-
/**
- * Stores and handles serializers <br/>
- * K - {@link MessageTypeKey} parameter type,<br/>
+ * Stores and handles serializers<br>
+ * K - {@link MessageTypeKey} parameter type,<br>
* S - returned serializer type
* @author michal.polkorab
- *
*/
public interface SerializerRegistry {
/**
* Serializer registry provisioning
*/
- public void init();
+ void init();
/**
* @param msgTypeKey lookup key
/**
* Unregisters serializer
* @param key used for serializer lookup
- * @param serializer serializer implementation
* @return true if serializer was removed,
* false if no serializer was found under specified key
*/
/**
* @param msgVersion protocol wire version
- * @param objectType class of serialized object (Instruction.class)
* @param instructionType type of instruction
* @param experimenterId experimenter / vendor ID
*/
return super.toString() + " instructionType type: " + instructionType.getName()
+ " vendorID: " + experimenterId;
}
-}
\ No newline at end of file
+}
/**
* @param msgVersion protocol wire version
- * @param objectType class of serialized object
* @param oxmClass oxm_class (see specification)
* @param oxmField oxm_field (see specification)
*/
return super.toString() + " oxm_class: " + oxmClass.getName() + " oxm_field: "
+ oxmField.getName() + " experimenterID: " + experimenterId;
}
-}
\ No newline at end of file
+}
import com.google.common.util.concurrent.SettableFuture;
/**
- * Exposed class for server handling <br/>
- * C - {@link MatchEntrySerializerKey} parameter representing oxm_class (see specification) <br/>
+ * Exposed class for server handling<br>
+ * C - {@link MatchEntrySerializerKey} parameter representing oxm_class (see specification)<br>
* F - {@link MatchEntrySerializerKey} parameter representing oxm_field (see specification)
* @author mirehak
* @author michal.polkorab
import org.slf4j.LoggerFactory;
/**
- * Stores and handles serializers <br/>
- * K - {@link MessageTypeKey} type <br/>
+ * Stores and handles serializers<br>
+ * K - {@link MessageTypeKey} type<br>
* S - returned serializer type
* @author michal.polkorab
* @author timotej.kubas
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.util;
-
/**
* @author michal.polkorab
- * @param <T> type the key maker is based on
*/
public abstract class AbstractCodeKeyMaker implements CodeKeyMaker {
*/
public final class ActionConstants {
- /** Openflow v1.0 & v1.3 OFPAT_OUTPUT code */
+ /** Openflow v1.0 and v1.3 OFPAT_OUTPUT code */
public static final byte OUTPUT_CODE = 0;
/** Openflow v1.0 OFPAT_SET_VLAN_VID code */
public static final byte SET_VLAN_VID_CODE = 1;
/** Most common action length */
public static final byte GENERAL_ACTION_LENGTH = 8;
/** Action larger than GENERAL_ACTION_LENGTH - currently
- * only 16 bytes long actions for both OF v1.0 & v1.3*/
+ * only 16 bytes long actions for both OF v1.0 and v1.3*/
public static final byte LARGER_ACTION_LENGTH = 16;
/** Action header size */
public static final byte ACTION_IDS_LENGTH = 4;
/**
* @param code code / value to distinguish between deserializers
* @param deserializer deserializer instance
- * @param deserializedObjectClass class of object that will be deserialized
- * by given deserializer
*/
public void registerDeserializer(int code, OFGeneralDeserializer deserializer) {
registry.registerDeserializer(new ActionDeserializerKey(version, code,
/**
* @param version Openflow wire version
- * @param objectType
* @param serializerRegistry
*/
public ActionSerializerRegistryHelper(short version, SerializerRegistry serializerRegistry) {
serializerRegistry.registerSerializer(new ActionSerializerKey<>(version,
actionType, null), serializer);
}
-}
\ No newline at end of file
+}
/**
* @param code code / value to distinguish between deserializers
* @param deserializer deserializer instance
- * @param deserializedObjectClass class of object that will be deserialized
- * by given deserializer
*/
public void registerDeserializer(int code, OFGeneralDeserializer deserializer) {
registry.registerDeserializer(new InstructionDeserializerKey(version, code,
/**
* Serializes list items and their headers
* @author michal.polkorab
- * @param <E>
*/
public abstract class ListSerializer {
/**
* Registers Class int the type to class mapping
* @param type code value for message type / class
- * @param clazz corresponding code -> class
+ * @param clazz class corresponding to the code
*/
public void registerTypeToClass(short type, Class<?> clazz) {
messageClassMap.put(new TypeToClassKey(version, type), clazz);
/**
* Get counter by CounterEventType
* @param counterEventKey key to identify counter (can not be null)
- * @return - Counter object or null if counter has not been enabled
- * @exception - IllegalArgumentException if counterEventKey is null
+ * @return Counter object or null if counter has not been enabled
+ * @throws IllegalArgumentException if counterEventKey is null
*/
public Counter getCounter(CounterEventTypes counterEventKey) {
if (counterEventKey == null) {
}
}
}
-}
\ No newline at end of file
+}
+/*
+ * Copyright (c) 2015 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
package org.opendaylight.openflowjava.protocol.impl.clients;
import io.netty.bootstrap.ServerBootstrap;
/**
* Constructor of the class
*
- * @param host address of host
* @param port host listening port
*/
public ListeningSimpleClient(int port) {
public int getPort() {
return this.port;
}
-}
\ No newline at end of file
+}
}
/**
- * Creates stack with handshake needed messages.
- * <ol> XID of messages:
+ * Creates stack with handshake needed messages. XID of messages:
+ * <ol>
* <li> hello sent - 00000001
* <li> hello waiting - 00000002
* <li> featuresrequest waiting - 00000003
}
/**
- * Creates stack with handshake needed messages.
- * <ol> XID of messages:
+ * Creates stack with handshake needed messages. XID of messages:
+ * <ol>
* <li> hello sent - 00000001
* <li> hello waiting - 00000002
* <li> featuresrequest waiting - 00000003
}
/**
- * Converts macAddress to byte array
+ * Converts macAddress to byte array.
+ * See also {@link org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress}.
+ *
* @param macAddress
* @return byte representation of mac address
- * @see {@link org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress}
*/
public static byte[] macAddressToBytes(final String macAddress) {
final byte[] result = new byte[EncodeConstants.MAC_ADDRESS_LENGTH];
}
/**
- * Converts a MAC address represented in bytes to String
+ * Converts a MAC address represented in bytes to String.
+ * See also {@link org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress}.
+ *
* @param address
* @return String representation of a MAC address
- * @see {@link MacAddress}
*/
public static String macAddressToString(final byte[] address) {
Preconditions.checkArgument(address.length == EncodeConstants.MAC_ADDRESS_LENGTH);