List of usage examples for io.netty.handler.codec.marshalling MarshallingEncoder MarshallingEncoder
public MarshallingEncoder(MarshallerProvider provider)
From source file:books.netty.codec.marshalling.MarshallingCodeCFactory.java
License:Apache License
/** * Jboss Marshalling?MarshallingEncoder//from w w w. j a v a 2 s . co m * * @return */ public static MarshallingEncoder buildMarshallingEncoder() { final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial"); final MarshallingConfiguration configuration = new MarshallingConfiguration(); configuration.setVersion(5); MarshallerProvider provider = new DefaultMarshallerProvider(marshallerFactory, configuration); MarshallingEncoder encoder = new MarshallingEncoder(provider); return encoder; }
From source file:netty.codec.marshalling.MarshallingCodeCFactory.java
License:Apache License
/** * Jboss Marshalling?MarshallingEncoder/* w ww. j av a2 s . c om*/ * * @return */ public static MarshallingEncoder buildMarshallingEncoder() { final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial"); final MarshallingConfiguration configuration = new MarshallingConfiguration(); configuration.setVersion(5); MarshallerProvider provider = new DefaultMarshallerProvider(marshallerFactory, configuration); return new MarshallingEncoder(provider); }