org.globus.wsrf.impl.notification
Class SubscribeHelper

java.lang.Object
  extended byorg.globus.wsrf.impl.notification.SubscribeHelper

public class SubscribeHelper
extends java.lang.Object

Helper class to allow callers outside of SubscribeProvider to generate new subscriptions.


Field Summary
private  NotifyCallback callback
           
private  ContainerSecurityConfig containerSecurityConfig
           
private  ResourceContext context
           
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
private  java.lang.String producerHomeLocation
           
private  ResourceKey producerKey
           
private  Resource producerResource
           
private  Subscribe request
           
private  SecurityManager securityManager
           
private  java.lang.String subscriptionManager
           
 
Constructor Summary
SubscribeHelper(ResourceContext context, Resource producerResource, ResourceKey producerKey, java.lang.String producerHomeLocation, Subscribe request)
          Constructor for notifications sent via WS calls
SubscribeHelper(Resource producerResource, ResourceKey producerKey, java.lang.String producerHomeLocation, Subscribe request, NotifyCallback callback)
          Constructor for locally sent notifications
 
Method Summary
private  ResourceSecurityDescriptor createResourceSecurityDescriptor()
          Create a new resource security descriptor and fill in the subject and authorization bits
protected  java.lang.String getSubscriptionManagerServiceName()
           
protected  ClientSecurityDescriptor setupNotificationSecurityDescriptor(org.apache.axis.message.addressing.EndpointReferenceType consumerEPR)
          Set up the client security descriptor used for sending notifications.
protected  ResourceSecurityDescriptor setupResourceSecurityDescriptor()
          Set up the resource descriptor to be used on the resource.
 org.apache.axis.message.addressing.EndpointReferenceType subscribe()
          Create a new subscription.
 
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

context

private ResourceContext context

producerResource

private Resource producerResource

producerKey

private ResourceKey producerKey

producerHomeLocation

private java.lang.String producerHomeLocation

subscriptionManager

private java.lang.String subscriptionManager

request

private Subscribe request

securityManager

private SecurityManager securityManager

containerSecurityConfig

private ContainerSecurityConfig containerSecurityConfig

callback

private NotifyCallback callback
Constructor Detail

SubscribeHelper

public SubscribeHelper(ResourceContext context,
                       Resource producerResource,
                       ResourceKey producerKey,
                       java.lang.String producerHomeLocation,
                       Subscribe request)
Constructor for notifications sent via WS calls

Parameters:
context - The resource context of caller. Used to detect security settings on the subscription resource as well as notifications
producerResource - The producer resource
producerKey - The key for the producer resource
producerHomeLocation - The location (JNDI) of the producer resource home
request - The subscribe request

SubscribeHelper

public SubscribeHelper(Resource producerResource,
                       ResourceKey producerKey,
                       java.lang.String producerHomeLocation,
                       Subscribe request,
                       NotifyCallback callback)
Constructor for locally sent notifications

Parameters:
producerResource - The producer resource
producerKey - The key for the producer resource
producerHomeLocation - The location (JNDI) of the producer resource home
request - The subscribe request
callback - called directly if it's a local call
Method Detail

subscribe

public org.apache.axis.message.addressing.EndpointReferenceType subscribe()
                                                                   throws SubscribeCreationFailedFaultType,
                                                                          TopicNotSupportedFaultType,
                                                                          TopicPathDialectUnknownFaultType,
                                                                          InvalidTopicExpressionFaultType
Create a new subscription. This method creates a new subscription based on the information passed in the constructor. If this method is called with a resource context created by a secure invocation the subscribe call will set up the security of the subscription resource to require the same authentication methods as the invocation and gridmap authorization with the caller of the invoked method as the only allowed user. Furthermore, it will also set up outgoing notifications to use the same security mechanism that was used in the invocation associated with the resource context.

Returns:
The WS-Addressing endpoint reference to the new subscription resource
Throws:
SubscribeCreationFailedFaultType
TopicNotSupportedFaultType
TopicPathDialectUnknownFaultType
InvalidTopicExpressionFaultType

setupResourceSecurityDescriptor

protected ResourceSecurityDescriptor setupResourceSecurityDescriptor()
                                                              throws SecurityException,
                                                                     ConfigException,
                                                                     SecurityDescriptorException
Set up the resource descriptor to be used on the resource.

Throws:
SecurityException
ConfigException
SecurityDescriptorException

createResourceSecurityDescriptor

private ResourceSecurityDescriptor createResourceSecurityDescriptor()
                                                             throws SecurityException
Create a new resource security descriptor and fill in the subject and authorization bits

Throws:
SecurityException

setupNotificationSecurityDescriptor

protected ClientSecurityDescriptor setupNotificationSecurityDescriptor(org.apache.axis.message.addressing.EndpointReferenceType consumerEPR)
                                                                throws SecurityException
Set up the client security descriptor used for sending notifications.

Parameters:
consumerEPR -
Throws:
SecurityException

getSubscriptionManagerServiceName

protected java.lang.String getSubscriptionManagerServiceName()