Package org.apache.ws.notification.base.v2004_06.impl

Examples of org.apache.ws.notification.base.v2004_06.impl.SubscriptionHome


      termTimeDoc.setTerminationTime( getTerminationTime(  ) );
      prop.add( termTimeDoc );

      // wsntw:SubscriptionManager props
      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_CONSUMER_REFERENCE );
      prop.setCallback( new ConsumerReferenceResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_TOPIC_EXPRESSION );
      prop.setCallback( new TopicExpressionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY );
View Full Code Here


      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY );
      prop.setCallback( new UseNotifyResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_PRECONDITION );
      prop.setCallback( new PreconditionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SELECTOR );
      prop.setCallback( new SelectorResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SUBSCRIPTION_POLICY );
View Full Code Here

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_PRECONDITION );
      prop.setCallback( new PreconditionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SELECTOR );
      prop.setCallback( new SelectorResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SUBSCRIPTION_POLICY );
      prop.setCallback( new SubscriptionPolicyResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_CREATION_TIME );
View Full Code Here

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SELECTOR );
      prop.setCallback( new SelectorResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SUBSCRIPTION_POLICY );
      prop.setCallback( new SubscriptionPolicyResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_CREATION_TIME );
      CreationTimeDocument creationTimeDoc = CreationTimeDocument.Factory.newInstance(  );
      creationTimeDoc.setCreationTime( getCreationTime(  ) );
      prop.add( creationTimeDoc );
View Full Code Here

      // wsntw:SubscriptionManager props
      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_CONSUMER_REFERENCE );
      prop.setCallback( new ConsumerReferenceResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_TOPIC_EXPRESSION );
      prop.setCallback( new TopicExpressionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY );
      prop.setCallback( new UseNotifyResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_PRECONDITION );
View Full Code Here

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_TOPIC_EXPRESSION );
      prop.setCallback( new TopicExpressionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY );
      prop.setCallback( new UseNotifyResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_PRECONDITION );
      prop.setCallback( new PreconditionResourcePropertyCallback( this ) );

      prop = propSet.get( SubscriptionManagerPortType.PROP_QNAME_SELECTOR );
View Full Code Here

      EndpointReferenceType subscriptionEPR = null;

      boolean               useNotify        = request.isSetUseNotify(  ) ? request.getUseNotify(  ) : true; // NOTE: we must set the default value ourselves, as XMLBeans does NOT do this for us
      EndpointReference     producerEPR      = getResource(  ).getEndpointReference(  );
      SubscriptionHome      subscriptionHome = null;
      try
      {
         subscriptionHome = (SubscriptionHome) new InitialContext(  ).lookup( SubscriptionHome.HOME_LOCATION );
      }
      catch ( NamingException ne )
      {
         LOG.error( "Subscribe failed due to internal error: " + ne );
         throw new BaseFaultException( NAMESPACE_SET, "Subscribe failed due to internal server error." );
      }

      Subscription subscription = null;
      try
      {
         subscription =
            subscriptionHome.create( SubscriptionResource.class,
                                     new XmlBeansEndpointReference( request.getConsumerReference(  ) ),
                                     producerEPR,
                                     initialTerminationTime,
                                     subPolicy,
                                     precondition,
View Full Code Here

        }
        EndpointReferenceType subscriptionEPR = null;

        boolean useNotify = request.isSetUseNotify() ? request.getUseNotify() : true// NOTE: we must set the default value ourselves, as XMLBeans does NOT do this for us
        EndpointReference producerEPR = getResource().getEndpointReference();
        SubscriptionHome subscriptionHome = null;
        try
        {
            subscriptionHome = (SubscriptionHome) new InitialContext().lookup(
                            SubscriptionHome.HOME_LOCATION );
        }
        catch ( NamingException ne )
        {
            LOG.error( "Subscribe failed due to internal error: " + ne );
            throw new BaseFaultException( NAMESPACE_SET, "Subscribe failed due to internal server error." );
        }
        Subscription subscription = null;
        try
        {
            subscription = subscriptionHome.create( SubscriptionResource.class,
                            new XmlBeansEndpointReference( request.getConsumerReference() ), producerEPR, initialTerminationTime,
                            subPolicy, precondition, selector, getResourceKey(),
                            ( (AbstractResourceContext) getResourceContext() ).getResourceHomeLocation(), topicExpr, useNotify, (WsnNamespaceVersionHolder) getNamespaceSet() );
        }
        catch ( Exception e )
View Full Code Here

      {
         throw new InvalidTopicExpressionException( "Given TopicExpression did not match any Topics supported by this NotificationProducer - the WS-BaseN spec mandates that it match at least one." );
      }

      // TODO: SubscriptionHome class is specific to WSN 2004/06 - should be replaced by a WSN-version-neutral SubscriptionHome interface
      SubscriptionHome subscriptionHome =
         (SubscriptionHome) SubscriptionManager.getInstance(  ).getSubscriptionManagerHome( m_producerResource );
      Subscription     subscription = null;
      try
      {
         subscription =
            subscriptionHome.create( m_producerResource.getEndpointReference(  ),
                                     consumerEPR,
                                     topicExpr );
         subscription.setTerminationTime( initialTerminationTime );
         subscription.setUseNotify( ( useNotify == null ) || useNotify.booleanValue(  ) );
         subscription.setSelector( selector );
View Full Code Here

         e.printStackTrace(  );
      }

      //topicExprType.setDialect("http://foobar");
      XmlBeansTopicExpression topicExpr = new XmlBeansTopicExpression( topicExprType.getTopicExpression(  ) );
      SubscriptionResource    sub = new SubscriptionResource( epr, epr, null, "my/producer/home", topicExpr );
      sub.setNotificationProducer( new NotifProducer(  ) );

      /* EndpointReference consumerReference, EndpointReference producerReference,
         Calendar initialTerminationTime, Object policy, QueryExpression precondition,
         QueryExpression selector, ResourceKey producerKey, String producerHomeLocation,
         TopicExpression topicExpression, boolean useNotify )
View Full Code Here

TOP

Related Classes of org.apache.ws.notification.base.v2004_06.impl.SubscriptionHome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.