Package org.scijava.event.bushe
Class AbstractProxySubscriber
- java.lang.Object
-
- org.scijava.event.bushe.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 Summary
Fields Modifier and Type Field Description protected booleanveto
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProxySubscriber(Object proxiedSubscriber, Method subscriptionMethod, ReferenceStrength referenceStrength, int priority, org.scijava.event.bushe.EventService es, boolean veto)protectedAbstractProxySubscriber(Object proxiedSubscriber, Method subscriptionMethod, ReferenceStrength referenceStrength, org.scijava.event.bushe.EventService es, boolean veto)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)org.scijava.event.bushe.EventServicegetEventService()intgetPriority()ObjectgetProxiedSubscriber()ReferenceStrengthgetReferenceStrength()MethodgetSubscriptionMethod()inthashCode()voidproxyUnsubscribed()Called by EventServices to inform the proxy that it is unsubscribed.protected booleanretryReflectiveCallUsingAccessibleObject(Object[] args, Method subscriptionMethod, Object obj, IllegalAccessException e, String message)StringtoString()
-
-
-
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.
-
retryReflectiveCallUsingAccessibleObject
protected boolean retryReflectiveCallUsingAccessibleObject(Object[] args, Method subscriptionMethod, Object obj, IllegalAccessException e, String message)
-
-