Java Code Examples for org.jboss.marshalling.MarshallingConfiguration#setVersion()

The following examples show how to use org.jboss.marshalling.MarshallingConfiguration#setVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RiverCompatibleMarshallingDecoderTest.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(3);
    return configuration;
}
 
Example 2
Source File: RiverCompatibleMarshallingEncoderTest.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(3);
    return configuration;
}
 
Example 3
Source File: SerialCompatibleMarshallingEncoderTest.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    return configuration;
}
 
Example 4
Source File: SerialCompatibleMarshallingDecoderTest.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    return configuration;
}
 
Example 5
Source File: MarshallingCodeCFactory.java    From netty-custom-protocol with MIT License 5 votes vote down vote up
/**
   * 创建Jboss Marshaller编码对象
   * @return Marshaller
   * @throws IOException 
   */
  public static Marshaller buildMarshalling() throws IOException {
  	//首先通过Marshalling工具类的精通方法获取Marshalling实例对象 参数serial标识创建的是java序列化工厂对象。
final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
//创建了MarshallingConfiguration对象,配置了版本号为5 
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
Marshaller marshaller = marshallerFactory.createMarshaller(configuration);
return marshaller;
  }
 
Example 6
Source File: MarshallingCodeCFactory.java    From netty-custom-protocol with MIT License 5 votes vote down vote up
/**
   * 创建Jboss Unmarshaller解码对象
   * @return Unmarshaller
   * @throws IOException 
   */
  public static Unmarshaller buildUnMarshalling() throws IOException {
final MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(5);
Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller(configuration);
return unmarshaller;
  }
 
Example 7
Source File: MarshallingCodeCFactory.java    From fileserver with Apache License 2.0 5 votes vote down vote up
/**
    * 创建Jboss Marshalling解码器MarshallingDecoder
    * 
    * @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*1024*10);
return decoder;
   }
 
Example 8
Source File: MarshallingCodeCFactory.java    From fileserver with Apache License 2.0 5 votes vote down vote up
/**
    * 创建Jboss Marshalling编码器MarshallingEncoder
    * 
    * @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;
   }
 
Example 9
Source File: RiverCompatibleMarshallingDecoderTest.java    From netty4.0.27Learn with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(3);
    return configuration;
}
 
Example 10
Source File: RiverCompatibleMarshallingEncoderTest.java    From netty4.0.27Learn with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(3);
    return configuration;
}
 
Example 11
Source File: SerialCompatibleMarshallingEncoderTest.java    From netty4.0.27Learn with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    return configuration;
}
 
Example 12
Source File: SerialCompatibleMarshallingDecoderTest.java    From netty4.0.27Learn with Apache License 2.0 5 votes vote down vote up
@Override
protected MarshallingConfiguration createMarshallingConfig() {
    // Create a configuration
    final MarshallingConfiguration configuration = new MarshallingConfiguration();
    configuration.setVersion(5);
    return configuration;
}