org.opendaylight.ocpjava.protocol.impl.core.DummyDecoder.java Source code

Java tutorial

Introduction

Here is the source code for org.opendaylight.ocpjava.protocol.impl.core.DummyDecoder.java

Source

/*
 * Copyright (c) 2013 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.ocpjava.protocol.impl.core;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author michal.polkorab
 *
 */
public class DummyDecoder extends ByteToMessageDecoder {

    private static final Logger LOG = LoggerFactory.getLogger(DummyDecoder.class);

    @Override
    protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
        LOG.debug("decoding");
        ctx.fireChannelReadComplete();
    }

}