org.bushe.swing.event.annotation
Class AbstractProxySubscriber
java.lang.Object
org.bushe.swing.event.annotation.AbstractProxySubscriber
- All Implemented Interfaces:
- Prioritized, ProxySubscriber
- Direct Known Subclasses:
- BaseProxySubscriber, ProxyTopicSubscriber
public abstract class AbstractProxySubscriber
- extends java.lang.Object
- implements ProxySubscriber, Prioritized
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 |
protected boolean |
veto
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
veto
protected boolean veto
AbstractProxySubscriber
protected AbstractProxySubscriber(java.lang.Object proxiedSubscriber,
java.lang.reflect.Method subscriptionMethod,
ReferenceStrength referenceStrength,
EventService es,
boolean veto)
AbstractProxySubscriber
protected AbstractProxySubscriber(java.lang.Object proxiedSubscriber,
java.lang.reflect.Method subscriptionMethod,
ReferenceStrength referenceStrength,
int priority,
EventService es,
boolean veto)
getProxiedSubscriber
public java.lang.Object getProxiedSubscriber()
- Specified by:
getProxiedSubscriber in interface ProxySubscriber
- Returns:
- the object this proxy is subscribed on behalf of
getSubscriptionMethod
public java.lang.reflect.Method getSubscriptionMethod()
- Returns:
- the subscriptionMethod passed in the constructor
getEventService
public EventService getEventService()
- Returns:
- the EventService passed in the constructor
getReferenceStrength
public ReferenceStrength getReferenceStrength()
- Specified by:
getReferenceStrength in interface ProxySubscriber
- Returns:
- the ReferenceStrength passed in the constructor
getPriority
public int getPriority()
- Specified by:
getPriority in interface Prioritized
- 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.
- Specified by:
proxyUnsubscribed in interface ProxySubscriber
hashCode
public final int hashCode()
- Overrides:
hashCode in class java.lang.Object
retryReflectiveCallUsingAccessibleObject
protected boolean retryReflectiveCallUsingAccessibleObject(java.lang.Object[] args,
java.lang.reflect.Method subscriptionMethod,
java.lang.Object obj,
java.lang.IllegalAccessException e,
java.lang.String message)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2010 Bushe Enterprises, Inc.. All Rights Reserved.