All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.servicefabric.transport.protocol.protostuff.ProtostuffFrameHandlerFactory Maven / Gradle / Ivy

package io.servicefabric.transport.protocol.protostuff;

import io.servicefabric.transport.protocol.FrameHandlerFactory;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.MessageToByteEncoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender;

public final class ProtostuffFrameHandlerFactory implements FrameHandlerFactory {

	@Override
	public ByteToMessageDecoder getFrameDecoder() {
		return new ProtobufVarint32FrameDecoder();
	}

	@Override
	public MessageToByteEncoder getFrameEncoder() {
		return new ProtobufVarint32LengthFieldPrepender();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy