Class AbstractProxySubscriber


  • public abstract class AbstractProxySubscriber
    extends Object
    Common base class for EventService Proxies.

    Implementing Prioritized even when Priority is not used is always OK. The default value of 0 retains the FIFO order.

    • Field Detail

      • veto

        protected boolean veto
    • Constructor Detail

      • AbstractProxySubscriber

        protected AbstractProxySubscriber​(Object proxiedSubscriber,
                                          Method subscriptionMethod,
                                          ReferenceStrength referenceStrength,
                                          org.scijava.event.bushe.EventService es,
                                          boolean veto)
      • AbstractProxySubscriber

        protected AbstractProxySubscriber​(Object proxiedSubscriber,
                                          Method subscriptionMethod,
                                          ReferenceStrength referenceStrength,
                                          int priority,
                                          org.scijava.event.bushe.EventService es,
                                          boolean veto)
    • Method Detail

      • getProxiedSubscriber

        public Object getProxiedSubscriber()
        Returns:
        the object this proxy is subscribed on behalf of
      • getSubscriptionMethod

        public Method getSubscriptionMethod()
        Returns:
        the subscriptionMethod passed in the constructor
      • getEventService

        public org.scijava.event.bushe.EventService getEventService()
        Returns:
        the EventService passed in the constructor
      • getReferenceStrength

        public ReferenceStrength getReferenceStrength()
        Returns:
        the ReferenceStrength passed in the constructor
      • getPriority

        public int getPriority()
        Returns:
        the priority, no effect if priority is 0 (the default value)
      • proxyUnsubscribed

        public void proxyUnsubscribed()
        Called by EventServices to inform the proxy that it is unsubscribed. The ProxySubscriber should perform any necessary cleanup.

        Overriding classes must call super.proxyUnsubscribed() or risk things not being cleanup up properly.

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object