org.globus.wsrf
Class NotificationConsumerManager

java.lang.Object
  extended byorg.globus.wsrf.NotificationConsumerManager
Direct Known Subclasses:
ClientNotificationConsumerManager, ServerNotificationConsumerManager

public abstract class NotificationConsumerManager
extends java.lang.Object


Field Summary
protected  java.util.Map consumers
           
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
protected  NotificationConsumerHome notificationConsumerHome
           
 
Constructor Summary
protected NotificationConsumerManager()
           
 
Method Summary
 org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer()
          Create a notification consumer resource with no registered callbacks (incoming notifications will be ignored unless you manually register callbacks).
 org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List[] topicPaths, NotifyCallback[] callbacks)
          Create a notification consumer resource with the given callbacks.
 org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List[] topicPaths, NotifyCallback[] callbacks, ResourceSecurityDescriptor desc)
          Create a notification consumer resource with the given parameters.
 org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List topicPath, NotifyCallback callback)
          Create a notification consumer resource with the given callback.
 org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List topicPath, NotifyCallback callback, ResourceSecurityDescriptor desc)
          Create a notification consumer resource with the given callback.
 org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(NotifyCallback callback)
          Create a notification consumer resource with the given callback.
 org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(NotifyCallback callback, ResourceSecurityDescriptor desc)
          Create a notification consumer resource with the given callback.
static NotificationConsumerManager getInstance()
          Returns an instance of NotificationConsumerManager.
static NotificationConsumerManager getInstance(java.util.Map properties)
          Returns an instance of NotificationConsumerManager.
private  ResourceKey getKey(org.apache.axis.message.addressing.EndpointReferenceType consumerEndpointReference)
           
 NotificationConsumerCallbackManager getNotificationConsumerCallbackManager(org.apache.axis.message.addressing.EndpointReferenceType consumerEndpointReference)
          Get the callback manager for a given notification consumer endpoint reference
protected  java.lang.String getNotificationConsumerServiceName()
          Get the name of the default notification consumer service
abstract  java.net.URL getURL()
          Returns the base URL of the container in which the notification consumer service is running in.
protected  void initializeConsumerHome()
           
abstract  boolean isListening()
          Is the notification consumer service started?
private static boolean isServerSide()
           
 void removeNotificationConsumer(org.apache.axis.message.addressing.EndpointReferenceType consumerEndpointReference)
          Destroy a notification consumer resource
protected  void removeNotificationConsumers()
          Removes all notification consumer resources associated with this NotificationConsumerManager.
abstract  void startListening()
          Start the notification consumer service
abstract  void stopListening()
          Stop the notification consumer service
 
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

notificationConsumerHome

protected NotificationConsumerHome notificationConsumerHome

consumers

protected java.util.Map consumers
Constructor Detail

NotificationConsumerManager

protected NotificationConsumerManager()
Method Detail

getInstance

public static NotificationConsumerManager getInstance()
Returns an instance of NotificationConsumerManager.


getInstance

public static NotificationConsumerManager getInstance(java.util.Map properties)
Returns an instance of NotificationConsumerManager.


isServerSide

private static boolean isServerSide()

initializeConsumerHome

protected void initializeConsumerHome()
                               throws ContainerException
Throws:
ContainerException

startListening

public abstract void startListening()
                             throws ContainerException
Start the notification consumer service

Throws:
ContainerException

stopListening

public abstract void stopListening()
                            throws ContainerException
Stop the notification consumer service

Throws:
ContainerException

isListening

public abstract boolean isListening()
Is the notification consumer service started?

Returns:
True if the notification consumer serivce is running, false if not

getURL

public abstract java.net.URL getURL()
Returns the base URL of the container in which the notification consumer service is running in.

Returns:
the base URL of the container running the notification consumer service.

createNotificationConsumer

public org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List[] topicPaths,
                                                                                           NotifyCallback[] callbacks)
                                                                                    throws ResourceException
Create a notification consumer resource with the given callbacks. Note that this method requires that the notification consumer is listening.

Parameters:
topicPaths - A array of concrete topic paths
callbacks - A array of callbacks corresponding to the topics in the topic path array. A individual callback will be called when the notification consumer services receives a notification message on the topic corresponding to the callback.
Returns:
The endpoint reference of the created notification consumer resource
Throws:
ResourceException

createNotificationConsumer

public org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List[] topicPaths,
                                                                                           NotifyCallback[] callbacks,
                                                                                           ResourceSecurityDescriptor desc)
                                                                                    throws ResourceException
Create a notification consumer resource with the given parameters. Note that this method requires that the notification consumer is listening.

Parameters:
topicPaths - A array of concrete topic paths
callbacks - A array of callbacks corresponding to the topics in the topic path array. A individual callback will be called when the notification consumer services receives a notification message on the topic corresponding to the callback.
desc - The resource security descriptor to set on the created notification consumer resource.
Returns:
The endpoint reference of the created notification consumer resource
Throws:
ResourceException

createNotificationConsumer

public org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(NotifyCallback callback)
                                                                                    throws ResourceException
Create a notification consumer resource with the given callback. Note that this method requires that the notification consumer is listening.

Parameters:
callback - The callback to be called for incoming notifications
Returns:
The endpoint reference of the created notification consumer resource
Throws:
ResourceException

createNotificationConsumer

public org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(NotifyCallback callback,
                                                                                           ResourceSecurityDescriptor desc)
                                                                                    throws ResourceException
Create a notification consumer resource with the given callback. Note that this method requires that the notification consumer is listening.

Parameters:
callback - The callback to call upon receipt of a notification on the aboce topic
desc - The resource security descriptor to set on the created notification consumer resource.
Returns:
The endpoint reference of the created notification consumer resource
Throws:
ResourceException

createNotificationConsumer

public org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List topicPath,
                                                                                           NotifyCallback callback)
                                                                                    throws ResourceException
Create a notification consumer resource with the given callback. Note that this method requires that the notification consumer is listening.

Parameters:
topicPath - The concrete topic for which the callback will be called
callback - The callback to call upon receipt of a notification on the aboce topic
Returns:
The endpoint reference of the created notification consumer resource
Throws:
ResourceException

createNotificationConsumer

public org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer(java.util.List topicPath,
                                                                                           NotifyCallback callback,
                                                                                           ResourceSecurityDescriptor desc)
                                                                                    throws ResourceException
Create a notification consumer resource with the given callback. Note that this method requires that the notification consumer is listening.

Parameters:
topicPath - The concrete topic for which the callback will be called
callback - The callback to call upon receipt of a notification on the aboce topic
desc - The resource security descriptor to set on the created notification consumer resource.
Returns:
The endpoint reference of the created notification consumer resource
Throws:
ResourceException

createNotificationConsumer

public org.apache.axis.message.addressing.EndpointReferenceType createNotificationConsumer()
                                                                                    throws ResourceException
Create a notification consumer resource with no registered callbacks (incoming notifications will be ignored unless you manually register callbacks). Note that this method requires that the notification consumer is listening.

Returns:
The endpoint reference of the created notification consumer resource
Throws:
ResourceException

getKey

private ResourceKey getKey(org.apache.axis.message.addressing.EndpointReferenceType consumerEndpointReference)
                    throws InvalidResourceKeyException
Throws:
InvalidResourceKeyException

getNotificationConsumerCallbackManager

public NotificationConsumerCallbackManager getNotificationConsumerCallbackManager(org.apache.axis.message.addressing.EndpointReferenceType consumerEndpointReference)
                                                                           throws ResourceException
Get the callback manager for a given notification consumer endpoint reference

Parameters:
consumerEndpointReference - The EPR for which to retrieve the callback manager
Returns:
The callback manager
Throws:
ResourceException

removeNotificationConsumer

public void removeNotificationConsumer(org.apache.axis.message.addressing.EndpointReferenceType consumerEndpointReference)
                                throws ResourceException
Destroy a notification consumer resource

Parameters:
consumerEndpointReference - The endpoint reference of the resource to remove
Throws:
ResourceException

getNotificationConsumerServiceName

protected java.lang.String getNotificationConsumerServiceName()
Get the name of the default notification consumer service

Returns:
The name of the default notification consumer service

removeNotificationConsumers

protected void removeNotificationConsumers()
Removes all notification consumer resources associated with this NotificationConsumerManager.