Examples of registerMarshaller()


Examples of org.infinispan.protostream.SerializationContext.registerMarshaller()

   }

   private SerializationContext initSerializationContext() throws IOException, Descriptors.DescriptorValidationException {
      SerializationContext ctx = ProtostreamMarshaller.getSerializationContext();
      ctx.registerProtofile("/bank.protobin");
      ctx.registerMarshaller(User.class, new UserMarshaller());
      ctx.registerEnumEncoder(User.Gender.class, new GenderEncoder());
      ctx.registerMarshaller(Address.class, new AddressMarshaller());
      ctx.registerMarshaller(Account.class, new AccountMarshaller());
      ctx.registerMarshaller(Transaction.class, new TransactionMarshaller());
      return ctx;
View Full Code Here

Examples of org.infinispan.protostream.SerializationContext.registerMarshaller()

   private SerializationContext initSerializationContext() throws IOException, Descriptors.DescriptorValidationException {
      SerializationContext ctx = ProtostreamMarshaller.getSerializationContext();
      ctx.registerProtofile("/bank.protobin");
      ctx.registerMarshaller(User.class, new UserMarshaller());
      ctx.registerEnumEncoder(User.Gender.class, new GenderEncoder());
      ctx.registerMarshaller(Address.class, new AddressMarshaller());
      ctx.registerMarshaller(Account.class, new AccountMarshaller());
      ctx.registerMarshaller(Transaction.class, new TransactionMarshaller());
      return ctx;
   }
}
View Full Code Here

Examples of org.infinispan.protostream.SerializationContext.registerMarshaller()

      SerializationContext ctx = ProtostreamMarshaller.getSerializationContext();
      ctx.registerProtofile("/bank.protobin");
      ctx.registerMarshaller(User.class, new UserMarshaller());
      ctx.registerEnumEncoder(User.Gender.class, new GenderEncoder());
      ctx.registerMarshaller(Address.class, new AddressMarshaller());
      ctx.registerMarshaller(Account.class, new AccountMarshaller());
      ctx.registerMarshaller(Transaction.class, new TransactionMarshaller());
      return ctx;
   }
}
View Full Code Here

Examples of org.infinispan.protostream.SerializationContext.registerMarshaller()

      ctx.registerProtofile("/bank.protobin");
      ctx.registerMarshaller(User.class, new UserMarshaller());
      ctx.registerEnumEncoder(User.Gender.class, new GenderEncoder());
      ctx.registerMarshaller(Address.class, new AddressMarshaller());
      ctx.registerMarshaller(Account.class, new AccountMarshaller());
      ctx.registerMarshaller(Transaction.class, new TransactionMarshaller());
      return ctx;
   }
}
View Full Code Here

Examples of org.infinispan.protostream.SerializationContext.registerMarshaller()

         // remote registration has to be delayed until we have running servers

         // register marshallers
         for (RegisteredClass rc : classes) {
            try {
               context.registerMarshaller(rc.clazz, rc.getMarshaller());
            } catch (Exception e) {
               throw new IllegalArgumentException("Could not instantiate marshaller for " + rc.clazz, e);
            }
         }
      }
View Full Code Here

Examples of org.infinispan.protostream.impl.SerializationContextImpl.registerMarshaller()

         throw new RuntimeException("Failed to initialize serialization context", e);
      } catch (Descriptors.DescriptorValidationException e) {
         throw new RuntimeException("Failed to initialize serialization context", e);
      }

      serializationContext.registerMarshaller(new WrappedMessageMarshaller());

      return serializationContext;
   }

   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
View Full Code Here

Examples of org.infinispan.protostream.impl.SerializationContextImpl.registerMarshaller()

         serializationContext.registerProtoFiles(WRAPPING_DEFINITIONS_RES);
      } catch (IOException | DescriptorParserException e) {
         throw new RuntimeException("Failed to initialize serialization context", e);
      }

      serializationContext.registerMarshaller(new WrappedMessageMarshaller());

      return serializationContext;
   }

   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
View Full Code Here

Examples of org.infinispan.protostream.impl.SerializationContextImpl.registerMarshaller()

         serializationContext.registerProtofiles(WRAPPING_DEFINITIONS_RES);
      } catch (IOException | DescriptorParserException e) {
         throw new RuntimeException("Failed to initialize serialization context", e);
      }

      serializationContext.registerMarshaller(new WrappedMessageMarshaller());

      return serializationContext;
   }

   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
View Full Code Here

Examples of org.infinispan.query.remote.ProtobufMetadataManager.registerMarshaller()

      MarshallerRegistration.registerMarshallers(ProtoStreamMarshaller.getSerializationContext(remoteCacheManager));

      //initialize server-side serialization context
      ProtobufMetadataManager protobufMetadataManager = cacheManager.getGlobalComponentRegistry().getComponent(ProtobufMetadataManager.class);
      protobufMetadataManager.registerProtofile("/bank.protobin");
      protobufMetadataManager.registerMarshaller(EmbeddedAccount.class, new EmbeddedAccountMarshaller());

      return cacheManager;
   }

   @AfterTest
View Full Code Here

Examples of org.infinispan.query.remote.ProtobufMetadataManager.registerMarshaller()

      MarshallerRegistration.registerMarshallers(ProtoStreamMarshaller.getSerializationContext(remoteCacheManager));

      //initialize server-side serialization context
      ProtobufMetadataManager protobufMetadataManager = cacheManager.getGlobalComponentRegistry().getComponent(ProtobufMetadataManager.class);
      protobufMetadataManager.registerProtofile("/sample_bank_account/bank.protobin");
      protobufMetadataManager.registerMarshaller(EmbeddedAccount.class, new EmbeddedAccountMarshaller());

      return cacheManager;
   }

   @AfterTest
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.