Add Action serializers
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / protocol / serialization / actions / DropActionSerializer.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
9 package org.opendaylight.openflowplugin.impl.protocol.serialization.actions;
10
11 import io.netty.buffer.ByteBuf;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action;
13
14 public class DropActionSerializer extends AbstractActionSerializer {
15
16     @Override
17     public void serialize(Action action, ByteBuf outBuffer) {
18         // NOOP
19     }
20
21     @Override
22     public void serializeHeader(Action action, ByteBuf outBuffer) {
23         // NOOP
24     }
25
26     @Override
27     protected int getLength() {
28         return 0;
29     }
30
31     @Override
32     protected int getType() {
33         return 0;
34     }
35 }