com.supermap.services

Annotation Type Interface



  • @Retention(value=RUNTIME)
    @Target(value=TYPE)
    public @interface Interface
    

    Service interface annotation.

    (# componentTypes ()), and the set service component type must be a Java interface that does not support normal classes. For example, set componentTypes = {com.supermap.services.components.Map.class} to indicate that the current service interface supports the map service component.

    Set whether the service component type is selected by setting optional, e.g., when it configures componentTypes={Component1.class, Component2.class}, if optional = true, it means it can use Component1 or Component2; if optional =false, it means both service components must be supported, that is, in the service component set, it as least provides one of the two components Component1 and Component2.

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element and Description
      java.lang.Class[] componentTypes
      Service component type.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element and Description
      boolean multiple
      Whether it supports multiple similar service components.
      boolean optional
      Whether it is selected, if yes, it can select any expected type, the default is false.
    • Element Detail

      • componentTypes

        public abstract java.lang.Class[] componentTypes
        

        Service component type. , Must be a Java interface, does not support ordinary class

        Set the service component type for the service interface, should be Java interface, not supporting general class. The default value is Class empty array.

        Returns:
        the service component type list.
      • optional

        public abstract boolean optional
        
        Whether it is selected, if yes, it can select any expected type, the default is false.

        whether the service component type is selected.

        ture is optional, false is not optional (each service component is required). Such as componentTypes = {Component1.class, Component2.class}, when optional = true, that can use Component1 and Component2 any of these types of service components; when optional = false , It means that both types of service components must be used.

        The default value is false.

        Returns:
        the service component type is selected. ture means optional, false means no option.
        Default:
        false
      • multiple

        public abstract boolean multiple
        

        Whether it supports multiple similar service components.

        true means it supports multiple similar service components, false means not supported. The default value is true.

        Returns:
        true means it supports multiple similar service components, false means not supported.
        Default:
        true