Class DefaultClassMapper

    • Constructor Detail

      • DefaultClassMapper

        public DefaultClassMapper()
    • Method Detail

      • setDefaultType

        public void setDefaultType​(Class<?> defaultType)
        The type returned by toClass(MessageProperties) if no type information is found in the message properties.
        Parameters:
        defaultType - the defaultType to set.
      • setDefaultMapClass

        public void setDefaultMapClass​(Class<?> defaultMapClass)
        Set the type of Map to use. For outbound messages, set the "__TypeId__" header to HashTable. For inbound messages, if the "__TypeId__" header is Hashtable convert to this class.
        Parameters:
        defaultMapClass - the map class.
        Since:
        2.0
        See Also:
        DEFAULT_CLASSID_FIELD_NAME
      • setIdClassMapping

        public void setIdClassMapping​(Map<String,​Class<?>> idClassMapping)
        Set a map of type Ids (in the "__TypeId__" header) to classes. For outbound messages, if the class is not in this map, the "__TypeId__" header is set to the fully qualified class name.
        Parameters:
        idClassMapping - the map of IDs to classes.
      • setTrustedPackages

        public void setTrustedPackages​(@Nullable
                                       String... trustedPackages)
        Specify a set of packages to trust during deserialization. The asterisk (*) means trust all.
        Parameters:
        trustedPackages - the trusted Java packages for deserialization
        Since:
        1.6.11
      • afterPropertiesSet

        public void afterPropertiesSet()

        Creates the reverse mapping from class to type id.

        Specified by:
        afterPropertiesSet in interface InitializingBean