Remove EncodeConstants.SIZE_OF_{BYTE,SHORT,INT,LONG}_IN_BYTES
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / protocol / deserialization / instruction / AbstractInstructionDeserializer.java
1 /*
2  * Copyright (c) 2016 Pantheon Technologies s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.openflowplugin.impl.protocol.deserialization.instruction;
9
10 import io.netty.buffer.ByteBuf;
11 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
12 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction;
14
15 public abstract class AbstractInstructionDeserializer implements OFDeserializer<Instruction>,
16         HeaderDeserializer<Instruction> {
17     /**
18      * Skip first few bytes of instruction message because they are irrelevant.
19      *
20      * @param message Openflow buffered message
21      **/
22     protected static void processHeader(ByteBuf message) {
23         message.skipBytes(2 * Short.BYTES);
24     }
25 }