Annotation Type ProfileMapCodec


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Documented
    public @interface ProfileMapCodec

    Annotation that can be used on a map-type CMP field getter or setter method in a Profile CMP Interface to indicate to Rhino the profile codecs that can be used to generate or consume structured map information for the CMP field in a profile table export instead of serialised state.

    This annotation is only used by Rhino when introspecting Profile CMP Interface methods that define a CMP field with a type assignable to Map. It is ignored when used anywhere else.

    This annotation is optional on map-type CMP fields defined with both key and value generic type arguments with the following types:

    • any of the standard Java primitive type wrapper classes, eg. java.lang.Integer, java.lang.Byte, etc.

    • java.lang.String

    • javax.slee.Address

    • javax.slee.profile.ProfileID

    • javax.slee.EventTypeID

    • javax.slee.SbbID

    • javax.slee.ServiceID

    • javax.slee.profile.ProfileSpecificationID

    • javax.slee.resource.ResourceAdaptorTypeID

    • javax.slee.resource.ResourceAdaptorID

    That is, if the CMP field is declared as, or some subtype of, a java.util.Map<K,V> where both K and V generic type arguments are each one of the types listed above, and the CMP field type is either equal to or a supertype of java.util.HashMap (the default concrete map implementation) or a concrete map implementation class itself, then this annotation is optional and Rhino will automatically infer an appropriate set of codecs to use for the CMP field in order to generate structured export output.

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      Class<? extends com.opencloud.slee.profile.codec.Codec> keyCodec
      The profile codec to use for map keys.
      Class<? extends com.opencloud.slee.profile.codec.Codec> valueCodec
      The profile codec to use for map values.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Class<? extends Map> map
      The map implementation class to use when Rhino needs to create a new map instance for the profile CMP field on import.
    • Element Detail

      • keyCodec

        Class<? extends com.opencloud.slee.profile.codec.Codec> keyCodec

        The profile codec to use for map keys.

        As is standard for profile codecs, this codec does not need to deal with encoding or decoding null values.

        Returns:
        the map key codec.
      • valueCodec

        Class<? extends com.opencloud.slee.profile.codec.Codec> valueCodec

        The profile codec to use for map values.

        As is standard for profile codecs, this codec does not need to deal with encoding or decoding null values.

        Returns:
        the map value codec.
      • map

        Class<? extends Map> map

        The map implementation class to use when Rhino needs to create a new map instance for the profile CMP field on import. The specified class must be a concrete class and must be type-assignable to the CMP field type.

        This value is ignored if the annotated CMP field method has a type that is already a concrete class.

        Returns:
        the map implementation class.
        Default:
        java.util.HashMap.class