Example usage for io.netty.handler.codec.marshalling DefaultUnmarshallerProvider DefaultUnmarshallerProvider

List of usage examples for io.netty.handler.codec.marshalling DefaultUnmarshallerProvider DefaultUnmarshallerProvider

Introduction

In this page you can find the example usage for io.netty.handler.codec.marshalling DefaultUnmarshallerProvider DefaultUnmarshallerProvider.

Prototype

public DefaultUnmarshallerProvider(MarshallerFactory factory, MarshallingConfiguration config) 

Source Link

Document

Create a new instance of DefaultMarshallerProvider

Usage

From source file:books.netty.codec.marshalling.MarshallingCodeCFactory.java

License:Apache License

/**
 * Jboss Marshalling?MarshallingDecoder//from www  .jav  a2  s  . c  o m
 *
 * @return
 */
public static MarshallingDecoder buildMarshallingDecoder() {
    final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    UnmarshallerProvider provider = new DefaultUnmarshallerProvider(marshallerFactory, configuration);
    MarshallingDecoder decoder = new MarshallingDecoder(provider, 1024);
    return decoder;
}

From source file:com.netty.coder.MarshallingCodeCFactory.java

License:Apache License

/**
 * Jboss Marshalling?MarshallingDecoder//w  ww .jav a 2  s  . com
 * 
 * @return
 */
public static NettyMarshallingDecoder buildMarshallingDecoder() {
    final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    UnmarshallerProvider provider = new DefaultUnmarshallerProvider(marshallerFactory, configuration);
    NettyMarshallingDecoder decoder = new NettyMarshallingDecoder(provider, 1024);
    return decoder;
}

From source file:netty.codec.marshalling.MarshallingCodeCFactory.java

License:Apache License

/**
 * Jboss Marshalling?MarshallingDecoder/*from   w  w w. j  a  v  a2  s .  com*/
 *
 * @return
 */
public static MarshallingDecoder buildMarshallingDecoder() {
    final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    UnmarshallerProvider provider = new DefaultUnmarshallerProvider(marshallerFactory, configuration);
    return new MarshallingDecoder(provider, 1024 << 2);
}

From source file:org.artJava.upload.codec.MarshallingCodeCFactory.java

License:Apache License

/**
 * Jboss Marshalling?MarshallingDecoder/*from w ww.j ava2s  . co  m*/
 * 
 * @return
 */
public static MarshallingDecoder buildMarshallingDecoder() {
    final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    UnmarshallerProvider provider = new DefaultUnmarshallerProvider(marshallerFactory, configuration);
    MarshallingDecoder decoder = new MarshallingDecoder(provider, 3 * 1024 * 1024);
    return decoder;
}