Enum CollectionType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CollectionType>

    public enum CollectionType
    extends java.lang.Enum<CollectionType>
    Collection types for the Reference annotation.
    Since:
    1.4
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      PROPERTIES
      The properties collection type is used to indicate the collection holds unmodifiable Maps containing the service properties of the bound services.
      REFERENCE
      The reference collection type is used to indicate the collection holds Service References for the bound services.
      SERVICE
      The service collection type is used to indicate the collection holds the bound service objects.
      SERVICEOBJECTS
      The serviceobjects collection type is used to indicate the collection holds Component Service Objects for the bound services.
      TUPLE
      The tuple collection type is used to indicate the collection holds unmodifiable Map.Entries whose key is an unmodifiable Map containing the service properties of the bound service, as specified in PROPERTIES, and whose value is the bound service object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      static CollectionType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CollectionType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • SERVICE

        public static final CollectionType SERVICE
        The service collection type is used to indicate the collection holds the bound service objects.

        This is the default collection type.

      • REFERENCE

        public static final CollectionType REFERENCE
        The reference collection type is used to indicate the collection holds Service References for the bound services.
      • SERVICEOBJECTS

        public static final CollectionType SERVICEOBJECTS
        The serviceobjects collection type is used to indicate the collection holds Component Service Objects for the bound services.
      • PROPERTIES

        public static final CollectionType PROPERTIES
        The properties collection type is used to indicate the collection holds unmodifiable Maps containing the service properties of the bound services.

        The Maps must implement Comparable with the compareTo method comparing service property maps using the same ordering as ServiceReference.compareTo based upon service ranking and service id.

      • TUPLE

        public static final CollectionType TUPLE
        The tuple collection type is used to indicate the collection holds unmodifiable Map.Entries whose key is an unmodifiable Map containing the service properties of the bound service, as specified in PROPERTIES, and whose value is the bound service object.

        The Map.Entries must implement Comparable with the compareTo method comparing service property maps using the same ordering as ServiceReference.compareTo based upon service ranking and service id.

    • Method Detail

      • values

        public static CollectionType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CollectionType c : CollectionType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CollectionType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<CollectionType>