org.bushe.swing.event.annotation
Class BaseProxySubscriber
java.lang.Object
org.bushe.swing.event.annotation.AbstractProxySubscriber
org.bushe.swing.event.annotation.BaseProxySubscriber
- All Implemented Interfaces:
- EventSubscriber, ProxySubscriber
public class BaseProxySubscriber
- extends AbstractProxySubscriber
- implements EventSubscriber
A class is subscribed to an EventService on behalf of another object.
Method Summary |
boolean |
equals(java.lang.Object obj)
|
void |
onEvent(java.lang.Object event)
Handles the event publication by pushing it to the real subscriber's subcription Method. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
BaseProxySubscriber
public BaseProxySubscriber(java.lang.Object proxiedSubscriber,
java.lang.reflect.Method subscriptionMethod,
ReferenceStrength referenceStrength,
EventService es,
java.lang.Class subscription)
- Creates a proxy. This does not subscribe it.
- Parameters:
proxiedSubscriber
- the subscriber that the proxy will call when an event is publixhedsubscriptionMethod
- the method the proxy will call, must have an Object as it's first and only parameterreferenceStrength
- if the subscription is weak, the reference from the proxy to the real subscriber should
be tooes
- the EventService we will be subscribed to, since we may need to unsubscribe when weak refs no longer
existsubscription
- the class to subscribe to, used for unsubscription only
onEvent
public void onEvent(java.lang.Object event)
- Handles the event publication by pushing it to the real subscriber's subcription Method.
- Specified by:
onEvent
in interface EventSubscriber
- Parameters:
event
- The Object that is being published.
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class AbstractProxySubscriber
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractProxySubscriber