Package org.jboss.marshalling

Examples of org.jboss.marshalling.MarshallingConfiguration


   private final ConcurrentWeakKeyHashMap<Thread, PerThreadInstanceHolder> marshallerTL =
         new ConcurrentWeakKeyHashMap<Thread, PerThreadInstanceHolder>();

   public AbstractJBossMarshaller() {
      // Class resolver now set when marshaller/unmarshaller will be created
      baseCfg = new MarshallingConfiguration();
      baseCfg.setExceptionListener(new DebuggingExceptionListener());
      baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory());
      baseCfg.setInstanceCount(DEF_INSTANCE_COUNT);
      baseCfg.setClassCount(DEF_CLASS_COUNT);
      baseCfg.setVersion(3);
View Full Code Here


   protected MarshallerFactory factory;

   public GenericJBossMarshaller() {
      factory = Marshalling.getMarshallerFactory("river");

      configuration = new MarshallingConfiguration();
      configuration.setCreator(new SunReflectiveCreator());
      configuration.setExceptionListener(new DebuggingExceptionListener());
      // ContextClassResolver provides same functionality as MarshalledValueInputStream
      configuration.setClassResolver(new ContextClassResolver());
      configuration.setVersion(2);
View Full Code Here

      }
   };

   public AbstractJBossMarshaller() {
      // Class resolver now set when marshaller/unmarshaller will be created
      baseCfg = new MarshallingConfiguration();
      baseCfg.setExternalizerCreator(new SunReflectiveCreator());
      baseCfg.setExceptionListener(new DebuggingExceptionListener());
      baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory());
      baseCfg.setInstanceCount(DEF_INSTANCE_COUNT);
      baseCfg.setClassCount(DEF_CLASS_COUNT);
View Full Code Here

            throw new IllegalStateException("Failed to start server", e);
        }
        final Unmarshaller unmarshaller;
        final ByteInput byteInput;
        try {
            final MarshallingConfiguration configuration = new MarshallingConfiguration();
            configuration.setVersion(2);
            configuration.setClassTable(ModularClassTable.getInstance());
            unmarshaller = factory.createUnmarshaller(configuration);
            byteInput = Marshalling.createByteInput(initialInput);
            unmarshaller.start(byteInput);
            final ServerTask task = unmarshaller.readObject(ServerTask.class);
            unmarshaller.finish();
View Full Code Here

      }
   };

   public AbstractJBossMarshaller() {
      // Class resolver now set when marshaller/unmarshaller will be created
      baseCfg = new MarshallingConfiguration();
      baseCfg.setExternalizerCreator(new SunReflectiveCreator());
      baseCfg.setExceptionListener(new DebuggingExceptionListener());
      baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory());
      baseCfg.setInstanceCount(DEF_INSTANCE_COUNT);
      baseCfg.setClassCount(DEF_CLASS_COUNT);
View Full Code Here

    */
   private final ConcurrentMap<Class<?>, Boolean> isMarshallableMap = new ConcurrentWeakKeyHashMap<Class<?>, Boolean>();

   public AbstractJBossMarshaller() {
      // Class resolver now set when marshaller/unmarshaller will be created
      baseCfg = new MarshallingConfiguration();
      baseCfg.setExternalizerCreator(new SunReflectiveCreator());
      baseCfg.setExceptionListener(new DebuggingExceptionListener());
      baseCfg.setClassExternalizerFactory(new SerializeWithExtFactory());
      baseCfg.setInstanceCount(DEF_INSTANCE_COUNT);
      baseCfg.setClassCount(DEF_CLASS_COUNT);
View Full Code Here

    private static class JBossMarshaller implements Marshaller {

        private final org.jboss.marshalling.Marshaller delegate;

        JBossMarshaller(final String marshallerType) throws IOException {
            final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration();
            marshallingConfiguration.setClassTable(new ProtocolV1ClassTable());
            marshallingConfiguration.setVersion(2);
            org.jboss.marshalling.MarshallerFactory factory = Marshalling.getProvidedMarshallerFactory(marshallerType);
            this.delegate = factory.createMarshaller(marshallingConfiguration);
        }
View Full Code Here

            this.marshallerType = marshallerType;
        }

        @Override
        public void start(final DataInput input, final ClassLoaderProvider classLoaderProvider) throws IOException {
            final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration();
            marshallingConfiguration.setVersion(2);
            marshallingConfiguration.setClassTable(new ProtocolV1ClassTable());
            marshallingConfiguration.setClassResolver(new LazyClassLoaderClassResolver(classLoaderProvider));
            org.jboss.marshalling.MarshallerFactory factory = Marshalling.getProvidedMarshallerFactory(marshallerType);
            this.delegate = factory.createUnmarshaller(marshallingConfiguration);
            final InputStream is = new InputStream() {
                @Override
                public int read() throws IOException {
View Full Code Here

        final Unmarshaller unmarshaller;
        final ByteInput byteInput;
        final AsyncFuture<ServiceContainer> containerFuture;
        try {
            Module.registerURLStreamHandlerFactoryModule(Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("org.jboss.vfs")));
            final MarshallingConfiguration configuration = new MarshallingConfiguration();
            configuration.setVersion(2);
            configuration.setClassResolver(new SimpleClassResolver(DomainServerMain.class.getClassLoader()));
            unmarshaller = factory.createUnmarshaller(configuration);
            byteInput = Marshalling.createByteInput(initialInput);
            unmarshaller.start(byteInput);
            final ServerTask task = unmarshaller.readObject(ServerTask.class);
            unmarshaller.finish();
View Full Code Here

      classTable = createMagicNumberClassTable();
      objectTable = createCustomObjectTable();
      externalizerFactoryAndObjectTable = createCustomExternalizerFactory(rpcManager, objectTable);

      configuration = new MarshallingConfiguration();
      configuration.setCreator(new SunReflectiveCreator());
      configuration.setClassTable(classTable);
      configuration.setClassExternalizerFactory(externalizerFactoryAndObjectTable);
      configuration.setObjectTable(objectTable);
View Full Code Here

TOP

Related Classes of org.jboss.marshalling.MarshallingConfiguration

Copyright © 2018 www.massapicom. 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.