org.bushe.swing.event.annotation
Class ProxyTopicPatternSubscriber

java.lang.Object
  extended by org.bushe.swing.event.annotation.AbstractProxySubscriber
      extended by org.bushe.swing.event.annotation.ProxyTopicSubscriber
          extended by org.bushe.swing.event.annotation.ProxyTopicPatternSubscriber
All Implemented Interfaces:
EventTopicSubscriber, Prioritized, ProxySubscriber, VetoTopicEventListener

public class ProxyTopicPatternSubscriber
extends ProxyTopicSubscriber

A Proxy Subscriber for Annotations that use topic patterns


Field Summary
 
Fields inherited from class org.bushe.swing.event.annotation.AbstractProxySubscriber
veto
 
Constructor Summary
ProxyTopicPatternSubscriber(Object proxiedSubscriber, Method subscriptionMethod, ReferenceStrength referenceStrength, EventService es, String patternString, Pattern pattern, boolean veto)
          Creates a proxy.
ProxyTopicPatternSubscriber(Object proxiedSubscriber, Method subscriptionMethod, ReferenceStrength referenceStrength, int priority, EventService es, String patternString, Pattern pattern, boolean veto)
          Creates a proxy.
 
Method Summary
 boolean equals(Object o)
           
 String toString()
           
protected  void unsubscribe(String topic)
           
 
Methods inherited from class org.bushe.swing.event.annotation.ProxyTopicSubscriber
onEvent, shouldVeto
 
Methods inherited from class org.bushe.swing.event.annotation.AbstractProxySubscriber
getEventService, getPriority, getProxiedSubscriber, getReferenceStrength, getSubscriptionMethod, hashCode, proxyUnsubscribed, retryReflectiveCallUsingAccessibleObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProxyTopicPatternSubscriber

public ProxyTopicPatternSubscriber(Object proxiedSubscriber,
                                   Method subscriptionMethod,
                                   ReferenceStrength referenceStrength,
                                   EventService es,
                                   String patternString,
                                   Pattern pattern,
                                   boolean veto)
Creates a proxy. This does not subscribe it.

Parameters:
proxiedSubscriber - the subscriber that the proxy will call when an event is published
subscriptionMethod - the method the proxy will call, must have an Object as it's first and only parameter
referenceStrength - if the subscription is weak, the reference from the proxy to the real subscriber should be too
es - the EventService we will be subscribed to, since we may need to unsubscribe when weak refs no longer exist
patternString - the Regular Expression for topics to subscribe to, used for unsubscription only

ProxyTopicPatternSubscriber

public ProxyTopicPatternSubscriber(Object proxiedSubscriber,
                                   Method subscriptionMethod,
                                   ReferenceStrength referenceStrength,
                                   int priority,
                                   EventService es,
                                   String patternString,
                                   Pattern pattern,
                                   boolean veto)
Creates a proxy. This does not subscribe it.

Parameters:
proxiedSubscriber - the subscriber that the proxy will call when an event is published
subscriptionMethod - the method the proxy will call, must have an Object as it's first and only parameter
referenceStrength - if the subscription is weak, the reference from the proxy to the real subscriber should be too
es - the EventService we will be subscribed to, since we may need to unsubscribe when weak refs no longer exist
patternString - the Regular Expression for topics to subscribe to, used for unsubscription only
Method Detail

unsubscribe

protected void unsubscribe(String topic)
Overrides:
unsubscribe in class ProxyTopicSubscriber

equals

public boolean equals(Object o)
Overrides:
equals in class ProxyTopicSubscriber

toString

public String toString()
Overrides:
toString in class ProxyTopicSubscriber


Copyright © 2011 Bushe Enterprises, Inc.. All Rights Reserved.