Examples of MarshallingContext


Examples of net.buffalo.protocal.io.MarshallingContext

    user.setInterests(interests);
    user.setRoles(new String[]{"SA", "Architect"});
   
    StringWriter stringWriter = new StringWriter();
    StreamWriter streamWriter = new FastStreamWriter(stringWriter);
    MarshallingContext context = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
    converter.marshal(user, context, streamWriter);
    assertEquals("<map><type>net.buffalo.protocal.User</type><string>username</string><string>Michael</string>" +
        "<string>password</string><string>password</string><string>gendor</string><string>girl</string>" +
        "<string>interests</string><list><type>java.util.ArrayList</type><length>3</length>" +
        "<string>Football</string><string>Music</string><string>Cook</string></list><string>roles</string>" +
View Full Code Here

Examples of net.buffalo.protocal.io.MarshallingContext

   
    StringWriter stringWriter = new StringWriter();
    StreamWriter streamWriter = new FastStreamWriter(stringWriter);
   
    DefaultConverterLookup defaultConverterLookup = new DefaultConverterLookup();
    MarshallingContext context = new DefaultMarshallingContext(defaultConverterLookup, streamWriter);
    converter.marshal(sdate, context, streamWriter);
   
    String string = "<map><type>java.sql.Date</type><string>value</string><date>20061101T000000Z</date></map>";
    assertEquals(string,
        stringWriter.getBuffer().toString());
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

    @Override
    public <E extends SerializationGroup<K, V, G>> BackingCacheEntryStore<G, Cacheable<G>, E> createGroupIntegratedObjectStore(IdentifierFactory<G> identifierFactory, PassivationManager<G, E> passivationManager, StatefulTimeoutInfo timeout) {
        @SuppressWarnings("unchecked")
        Cache<G, MarshalledValue<E, MarshallingContext>> cache = this.groupCache.getValue();
        MarshallingContext context = new MarshallingContext(this.factory, passivationManager);
        MarshalledValueFactory<MarshallingContext> valueFactory = new SimpleMarshalledValueFactory(context);
        @SuppressWarnings("unchecked")
        Registry<String, ?> registry = this.registry.getValue();
        return new InfinispanBackingCacheEntryStore<G, Cacheable<G>, E, MarshallingContext>(cache, this.invoker, identifierFactory, this.affinityFactory, null, timeout, this, false, valueFactory, context, null, null, registry);
    }
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

            }
            builder.eviction().maxEntries(this.maxSize);
        }
        groupCache.getCacheManager().defineConfiguration(beanName, builder.build());
        Cache<K, MarshalledValue<E, MarshallingContext>> cache = container.<K, MarshalledValue<E, MarshallingContext>>getCache(beanName);
        MarshallingContext context = new MarshallingContext(this.factory, passivationManager);
        MarshalledValueFactory<MarshallingContext> valueFactory = new SimpleMarshalledValueFactory(context);
        LockKeyFactory<K> lockKeyFactory = new LockKeyFactory<K>() {
            @Override
            public Serializable createLockKey(K key) {
                return new AbstractMap.SimpleImmutableEntry<K, String>(key, beanName);
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

    @Override
    public <E extends SerializationGroup<K, V, G>> BackingCacheEntryStore<G, Cacheable<G>, E> createGroupIntegratedObjectStore(PassivationManager<G, E> passivationManager, StatefulTimeoutInfo timeout) {
        @SuppressWarnings("unchecked")
        Cache<MarshalledValue<G, MarshallingContext>, MarshalledValue<E, MarshallingContext>> cache = this.groupCache.getValue().getAdvancedCache().with(this.getClass().getClassLoader());
        MarshallingContext context = new MarshallingContext(this.factory, passivationManager.getMarshallingConfiguration());
        MarshalledValueFactory<MarshallingContext> keyFactory = new HashableMarshalledValueFactory(context);
        MarshalledValueFactory<MarshallingContext> valueFactory = new SimpleMarshalledValueFactory(context);
        @SuppressWarnings("unchecked")
        Registry<String, ?> registry = this.registry.getValue();
        return new InfinispanBackingCacheEntryStore<G, Cacheable<G>, E, MarshallingContext>(cache, this.invoker, null, timeout, this, false, keyFactory, valueFactory, context, null, null, registry);
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

        if (this.maxSize > 0) {
            builder.eviction().strategy(EvictionStrategy.LRU).maxEntries(this.maxSize);
        }
        groupCache.getCacheManager().defineConfiguration(beanName, builder.build());
        Cache<MarshalledValue<K, MarshallingContext>, MarshalledValue<E, MarshallingContext>> cache = container.<MarshalledValue<K, MarshallingContext>, MarshalledValue<E, MarshallingContext>>getCache(beanName).getAdvancedCache().with(this.getClass().getClassLoader());
        MarshallingContext context = new MarshallingContext(this.factory, passivationManager.getMarshallingConfiguration());
        MarshalledValueFactory<MarshallingContext> keyFactory = new HashableMarshalledValueFactory(context);
        MarshalledValueFactory<MarshallingContext> valueFactory = new SimpleMarshalledValueFactory(context);
        LockKeyFactory<K, MarshallingContext> lockKeyFactory = new LockKeyFactory<K, MarshallingContext>() {
            @Override
            public Serializable createLockKey(MarshalledValue<K, MarshallingContext> key) {
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

            protected ClassLoader getClassLoader() {
                return manager.getApplicationClassLoader();
            }
        };
        configuration.setClassResolver(resolver);
        return new SessionAttributeMarshallerImpl(new MarshallingContext(this.factory, configuration));
    }
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

    @Override
    public SessionAttributeMarshaller createMarshaller(LocalDistributableSessionManager manager) {
        MarshallingConfiguration configuration = new MarshallingConfiguration();
        ApplicationClassResolver resolver = new ApplicationClassResolver(manager);
        configuration.setClassResolver(resolver);
        return new SessionAttributeMarshallerImpl(new MarshallingContext(this.factory, configuration));
    }
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

    public SessionAttributeMarshaller createMarshaller(LocalDistributableSessionManager manager) {
        MarshallingConfiguration configuration = new MarshallingConfiguration();
        configuration.setClassResolver(manager.getApplicationClassResolver());
        configuration.setSerializedCreator(new SunReflectiveCreator());
        configuration.setExternalizerCreator(new ReflectiveCreator());
        return new SessionAttributeMarshallerImpl(new MarshallingContext(this.factory, configuration));
    }
View Full Code Here

Examples of org.jboss.as.clustering.MarshallingContext

    @Override
    public <E extends SerializationGroup<K, V, G>> BackingCacheEntryStore<G, Cacheable<G>, E> createGroupIntegratedObjectStore(PassivationManager<G, E> passivationManager, StatefulTimeoutInfo timeout) {
        @SuppressWarnings("unchecked")
        Cache<MarshalledValue<G, MarshallingContext>, MarshalledValue<E, MarshallingContext>> cache = this.groupCache.getValue().getAdvancedCache().with(this.getClass().getClassLoader());
        MarshallingContext context = new MarshallingContext(this.factory, passivationManager.getMarshallingConfiguration());
        MarshalledValueFactory<MarshallingContext> keyFactory = new HashableMarshalledValueFactory(context);
        MarshalledValueFactory<MarshallingContext> valueFactory = new SimpleMarshalledValueFactory(context);
        @SuppressWarnings("unchecked")
        Registry<String, ?> registry = this.registry.getValue();
        return new InfinispanBackingCacheEntryStore<G, Cacheable<G>, E, MarshallingContext>(cache, this.invoker, null, timeout, this, false, keyFactory, valueFactory, context, null, null, registry);
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.