org.globus.wsrf.impl
Class SimpleSubscriptionTopicListener

java.lang.Object
  extended byorg.globus.wsrf.impl.SimpleSubscriptionTopicListener
All Implemented Interfaces:
java.io.Serializable, TopicListener

public class SimpleSubscriptionTopicListener
extends java.lang.Object
implements TopicListener, java.io.Serializable

Topic listener implementation that will trigger notifications when a topic changes. To be used in conjunction with the SimpleSubscription class.

See Also:
SimpleSubscription, Serialized Form

Nested Class Summary
private static class SimpleSubscriptionTopicListener.SharedWSBaseNotificationServiceAddressingLocator
          This is extended to force the resue of EngineConfiguration and AxisClient engine.
 
Field Summary
private  NotificationConsumer consumerPort
           
private  java.lang.String homeLocation
           
private static org.globus.util.I18n i18n
           
private  ResourceKey key
           
private  WSBaseNotificationServiceAddressingLocator locator
           
private static org.apache.commons.logging.Log logger
           
 
Constructor Summary
SimpleSubscriptionTopicListener(ResourceKey key, java.lang.String homeLocation)
          Construct a listener instance.
 
Method Summary
 Subscription getSubscription()
           
 java.lang.String getSubscriptionHomeLocation()
           
 ResourceKey getSubscriptionResourceKey()
           
protected  void notify(Subscription subscription, java.util.List topicPath, java.lang.Object newValue)
          Send a notification
private  void setPort(boolean reuse, org.apache.axis.message.addressing.EndpointReferenceType consumerEPR)
           
private  void setPort(ClientSecurityDescriptor descriptor, org.apache.axis.message.addressing.EndpointReferenceType consumerEPR)
           
 void topicAdded(Topic topic)
          Called when a topic is added
 void topicChanged(Topic topic)
          Called when the value of the topic changes
 void topicRemoved(Topic topic)
          Called when a topic is removed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.commons.logging.Log logger

i18n

private static org.globus.util.I18n i18n

key

private ResourceKey key

homeLocation

private java.lang.String homeLocation

consumerPort

private transient NotificationConsumer consumerPort

locator

private transient WSBaseNotificationServiceAddressingLocator locator
Constructor Detail

SimpleSubscriptionTopicListener

public SimpleSubscriptionTopicListener(ResourceKey key,
                                       java.lang.String homeLocation)
Construct a listener instance.

Parameters:
key - The key for the subscription resource associated with this listener.
homeLocation - The JNDI location of the subscription resource home
Method Detail

topicChanged

public void topicChanged(Topic topic)
Description copied from interface: TopicListener
Called when the value of the topic changes

Specified by:
topicChanged in interface TopicListener
Parameters:
topic - The topic that changed

topicAdded

public void topicAdded(Topic topic)
Description copied from interface: TopicListener
Called when a topic is added

Specified by:
topicAdded in interface TopicListener
Parameters:
topic - The topic being added

topicRemoved

public void topicRemoved(Topic topic)
Description copied from interface: TopicListener
Called when a topic is removed

Specified by:
topicRemoved in interface TopicListener
Parameters:
topic - The topic being removed

getSubscription

public Subscription getSubscription()
                             throws ResourceException
Throws:
ResourceException

getSubscriptionHomeLocation

public java.lang.String getSubscriptionHomeLocation()
Returns:
String the JNDI location of the Home of the subscription

getSubscriptionResourceKey

public ResourceKey getSubscriptionResourceKey()
Returns:
String the resource key of the subscription

notify

protected void notify(Subscription subscription,
                      java.util.List topicPath,
                      java.lang.Object newValue)
               throws java.lang.Exception
Send a notification

Parameters:
subscription - The subscription for which to send the notification
topicPath - The topic path of the topic that caused the notification
newValue - The new value of the topic
Throws:
java.lang.Exception

setPort

private void setPort(ClientSecurityDescriptor descriptor,
                     org.apache.axis.message.addressing.EndpointReferenceType consumerEPR)
              throws java.lang.Exception
Throws:
java.lang.Exception

setPort

private void setPort(boolean reuse,
                     org.apache.axis.message.addressing.EndpointReferenceType consumerEPR)
              throws java.lang.Exception
Throws:
java.lang.Exception