Class DefaultWhiteboard

  • All Implemented Interfaces:
    Whiteboard

    public class DefaultWhiteboard
    extends java.lang.Object
    implements Whiteboard
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> Registration register​(java.lang.Class<T> type, T service, java.util.Map<?,​?> properties)
      Publishes the given service to the whiteboard.
      <T> Tracker<T> track​(java.lang.Class<T> type)
      Starts tracking services of the given type.
      <T> Tracker<T> track​(java.lang.Class<T> type, java.util.Map<java.lang.String,​java.lang.String> filterProperties)
      Starts tracking services of the given type, with given attributes.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultWhiteboard

        public DefaultWhiteboard()
    • Method Detail

      • register

        public <T> Registration register​(java.lang.Class<T> type,
                                         T service,
                                         java.util.Map<?,​?> properties)
        Description copied from interface: Whiteboard
        Publishes the given service to the whiteboard. Use the returned registration object to unregister the service.
        Specified by:
        register in interface Whiteboard
        Parameters:
        type - type of the service
        service - service instance
        properties - service properties
        Returns:
        service registration
      • track

        public <T> Tracker<T> track​(java.lang.Class<T> type)
        Description copied from interface: Whiteboard
        Starts tracking services of the given type.
        Specified by:
        track in interface Whiteboard
        Parameters:
        type - type of the services to track
        Returns:
        service tracker
      • track

        public <T> Tracker<T> track​(java.lang.Class<T> type,
                                    java.util.Map<java.lang.String,​java.lang.String> filterProperties)
        Description copied from interface: Whiteboard
        Starts tracking services of the given type, with given attributes.
        Specified by:
        track in interface Whiteboard
        Parameters:
        type - type of the services to track
        filterProperties - only services with these properties will be tracked. Null keys are not permitted. Null values means that the property should be absent.
        Returns:
        service tracker