Class SubscriberChangeEvent

    • Constructor Detail

      • SubscriberChangeEvent

        public SubscriberChangeEvent​(Subscriber subscriber,
                                     int flags,
                                     IResource resource)
        Create a change event with the given flags for the given subscriber and resource.
        Parameters:
        subscriber - the subscriber to which the state change applies
        flags - the flags that describe the change
        resource - the resource whose state has change
    • Method Detail

      • getFlags

        public int getFlags()
        Description copied from interface: ISubscriberChangeEvent
        Return the flags that describe the type of change. The returned value should be ANDed with the change type flags to determine whether the change event is of a particular type. For example,
           if (event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) {
              // the sync info for the resource has changed
           }
         
        Specified by:
        getFlags in interface ISubscriberChangeEvent
        Returns:
        the flags that describe the type of change
      • getResource

        public IResource getResource()
        Description copied from interface: ISubscriberChangeEvent
        Return the resource whose state with respect to the subscriber has changed.
        Specified by:
        getResource in interface ISubscriberChangeEvent
        Returns:
        the resource whose state with respect to the subscriber has changed
      • asSyncChangedDeltas

        public static SubscriberChangeEvent[] asSyncChangedDeltas​(Subscriber subscriber,
                                                                  IResource[] resources)
        Returns an array of deltas for the resources with ISubscriberChangeEvent.SYNC_CHANGED as the flag.
        Parameters:
        subscriber - the subscriber
        resources - the resources whose sync info has changed
        Returns:
        an array of change events