org.bushe.swing.event.annotation
Class AbstractProxySubscriber

java.lang.Object
  extended by org.bushe.swing.event.annotation.AbstractProxySubscriber
All Implemented Interfaces:
ProxySubscriber
Direct Known Subclasses:
BaseProxySubscriber, ProxyTopicSubscriber

public abstract class AbstractProxySubscriber
extends java.lang.Object
implements ProxySubscriber

Common base class for EventService Proxies


Constructor Summary
protected AbstractProxySubscriber(java.lang.Object proxiedSubscriber, java.lang.reflect.Method subscriptionMethod, ReferenceStrength referenceStrength, EventService es)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 EventService getEventService()
           
 java.lang.Object getProxiedSubscriber()
           
 ReferenceStrength getReferenceStrength()
           
 java.lang.reflect.Method getSubscriptionMethod()
           
 int hashCode()
           
 void proxyUnsubscribed()
          Called by EventServices to inform the proxy that it is unsubscribed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractProxySubscriber

protected AbstractProxySubscriber(java.lang.Object proxiedSubscriber,
                                  java.lang.reflect.Method subscriptionMethod,
                                  ReferenceStrength referenceStrength,
                                  EventService es)
Method Detail

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 ReferenceStregth passed in the constructor

proxyUnsubscribed

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

Overridding 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

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