Package org.axonframework.serializer

Examples of org.axonframework.serializer.SimpleSerializedType


     * Returns the payload type of the event message stored in this entry.
     *
     * @return the payload type of the event message stored in this entry
     */
    protected SerializedType getPayloadType() {
        return new SimpleSerializedType(payloadType, payloadRevision);
    }
View Full Code Here


                }
            }

            @Override
            public SerializedType typeForClass(Class type) {
                return new SimpleSerializedType(type.getName(), "");
            }

            @Override
            public ConverterFactory getConverterFactory() {
                return converterFactory;
View Full Code Here

        return new SerializedMetaData<byte[]>("Meta is meta".getBytes(), byte[].class);
    }

    private static SimpleSerializedObject<byte[]> getPayload() {
        return new SimpleSerializedObject<byte[]>(payloadBytes, byte[].class,
                new SimpleSerializedType("java.lang.String", "3"));
    }
View Full Code Here

        return new SimpleSerializedObject<byte[]>(payloadBytes, byte[].class,
                new SimpleSerializedType("java.lang.String", "3"));
    }
    private static SimpleSerializedObject<byte[]> getPayloadv4() {
        return new SimpleSerializedObject<byte[]>(payloadBytes, byte[].class,
                new SimpleSerializedType("java.lang.String", "4"));
    }
View Full Code Here

                                                       expectedTypes.get(1)));
        }

        @Override
        public List<SerializedType> upcast(SerializedType serializedType) {
            return Arrays.<SerializedType>asList(new SimpleSerializedType("unknownType1", "2"),
                                                 new SimpleSerializedType(StubStateChangedEvent.class.getName(), "2"));
        }
View Full Code Here

        return serializedType.getName();
    }

    @Override
    public SerializedType typeForClass(Class type) {
        return new SimpleSerializedType(type.getName(), revisionResolver.revisionOf(type));
    }
View Full Code Here

                                                       expectedTypes.get(1)));
        }

        @Override
        public List<SerializedType> upcast(SerializedType serializedType) {
            return Arrays.<SerializedType>asList(new SimpleSerializedType("unknownType1", "2"),
                                                 new SimpleSerializedType(StubStateChangedEvent.class.getName(), "2"));
        }
View Full Code Here

*/
public class AbstractSingleEntryUpcasterTest {

    @Test
    public void testUpcastSerializedType() {
        final SimpleSerializedType upcastType = new SimpleSerializedType("newString", "2");
        AbstractSingleEntryUpcaster<String> testSubject = new StubUpcaster("did it", upcastType);

        List<SerializedType> actual = testSubject.upcast(new SimpleSerializedType("string", "1"));
        assertEquals(1, actual.size());
        assertEquals(upcastType, actual.get(0));
    }
View Full Code Here

    @Test
    public void testUpcastSerializedType_Null() {
        AbstractSingleEntryUpcaster<String> testSubject = new StubUpcaster("value", null);

        List<SerializedType> actual = testSubject.upcast(new SimpleSerializedType("string", "1"));
        assertEquals(0, actual.size());
    }
View Full Code Here

        assertEquals(0, actual.size());
    }

    @Test
    public void testUpcastSerializedObject() {
        final SerializedType upcastType = new SimpleSerializedType("newString", "2");
        AbstractSingleEntryUpcaster<String> testSubject = new StubUpcaster("did it", upcastType);

        List<SerializedObject<?>> actual = testSubject.upcast(
                new SimpleSerializedObject<String>("string", String.class, "string", "1"),
                Collections.singletonList(upcastType), null);
View Full Code Here

TOP

Related Classes of org.axonframework.serializer.SimpleSerializedType

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.