Package org.apache.ws.notification.topics

Examples of org.apache.ws.notification.topics.Topic


      {
         TopicSpace topicSpc = (TopicSpace) m_topicSpaces.get( namespaceURI );
         Iterator   iterator = topicSpc.topicIterator(  );
         while ( iterator.hasNext(  ) )
         {
            Topic topic = (Topic) iterator.next(  );
            topicSpace.addTopic( topic );
         }
      }

      m_topicSpaces.put( namespaceURI, topicSpace );
View Full Code Here


         throw new InvalidTopicExpressionException( "Topic path '" + topicPath
                                                    + "' contains one or more illegal characters ('/', '*', '|' or '.')." );
      }

      String name  = topicPath.getLocalPart(  );
      Topic  topic = topicSpace.getTopic( name );
      if ( topic != null )
      {
         matchedTopics.add( topic );
      }

View Full Code Here

    resourceProperty.add(prop_resourceid);

        org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet = getTopicSpaceSet();
        TopicSpace topicSpace = new TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);

        Topic manageabilityEndpointCreation = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME, false);
        Topic manageabilityEndpointDestruction = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME, false);

        XmlBeansAdvertisementTopicImpl manageableResourceCreation = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME);
        XmlBeansAdvertisementTopicImpl manageableResourceDestruction = new XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME);

        //todo associate these with all the homes....
        InitialContext ctx = new InitialContext();
        List homes = findHomes(ctx, new ArrayList(),"");
        for (int i = 0; i < homes.size(); i++)
        {
            String home = (String) homes.get(i);
            //do not register its own home
            if( ! home.equals(ResourceAdvertiserHome.HOME_LOCATION))
            {
                AbstractResourceHome absHome = (AbstractResourceHome) ctx.lookup(home);
                absHome.addResourceCreationListener(manageableResourceCreation);
                absHome.addResourceDestructionListener(manageableResourceDestruction);
            }
        }

        manageabilityEndpointCreation.addTopic(manageableResourceCreation);
        manageabilityEndpointDestruction.addTopic(manageableResourceDestruction);
        topicSpace.addTopic(manageabilityEndpointCreation);
        topicSpace.addTopic(manageabilityEndpointDestruction);
        topicSpaceSet.addTopicSpace(topicSpace);

    }
View Full Code Here

     * @throws Exception
     */
    public static TopicSpace addRelationshipTopics( TopicSpaceSet topicSet ) throws Exception
    {
        TopicSpace topicSpace = new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS );
        Topic topic = topicSpace.addTopic( RelationshipsCapability.TOPIC_NAME );
        topic.addTopic( RelationshipsCapability.SUBTOPIC_NAME_RELATIONSHIP_CREATED );
        topic.addTopic( RelationshipsCapability.SUBTOPIC_NAME_RELATIONSHIP_DELETED );
        return topicSet.addTopicSpace( topicSpace );
    }
View Full Code Here

         // Topics
         org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet  = getTopicSpaceSet(  );
         TopicSpace                                      muwsTopicSpace =
            new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS );

         Topic                                           manageabilityEndpointCreation    =
            new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME,
                                                false );
         Topic                                           manageabilityEndpointDestruction =
            new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME,
                                                false );

         XmlBeansAdvertisementTopicImpl                  manageableResourceCreation    =
            new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME );
         XmlBeansAdvertisementTopicImpl                  manageableResourceDestruction =
            new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME );

         //register listeners for those topics with all known to resourceadmin  homes....
         addListenersToHomes( manageableResourceCreation, manageableResourceDestruction );

         manageabilityEndpointCreation.addTopic( manageableResourceCreation );
         manageabilityEndpointDestruction.addTopic( manageableResourceDestruction );
         muwsTopicSpace.addTopic( manageabilityEndpointCreation );
         muwsTopicSpace.addTopic( manageabilityEndpointDestruction );
         topicSpaceSet.addTopicSpace( muwsTopicSpace );

         ManagementEventTopic identityCapability =
View Full Code Here

        {
            throw new InvalidTopicExpressionException( "Topic path '" + topicPath +
                    "' contains one or more illegal characters ('/', '*', '|' or '.')." );
        }
        String name = topicPath.getLocalPart();
        Topic topic = topicSpace.getTopic( name );
        if ( topic != null )
        {
            matchedTopics.add( topic );
        }
        return matchedTopics;
View Full Code Here

        {
            TopicSpace topicSpc = (TopicSpace) m_topicSpaces.get(namespaceURI);
            Iterator iterator = topicSpc.topicIterator();
            while (iterator.hasNext())
            {
                Topic topic = (Topic) iterator.next();
                topicSpace.addTopic(topic);
            }
        }
        m_topicSpaces.put(namespaceURI, topicSpace);
        return topicSpace;
View Full Code Here

        if (topicSpace == null)
        {
            topicSpace = new TopicSpaceImpl(namespace);
            topicSpaceSet.addTopicSpace(topicSpace);
        }
        Topic topic;
        if (topicSpace.topicIterator().hasNext())
        {
            topic = (Topic) topicSpace.topicIterator().next();
        }
        else
View Full Code Here

        while ( propIter.hasNext() )
        {
            ResourceProperty prop = (ResourceProperty) propIter.next();
            if ( ! prop.getMetaData().isReadOnly() )
            {
                Topic topic = addResourcePropertyValueChangeTopic( prop, topicSpaceSet );
                topicList.add( topic );
            }
        }
        return (Topic[]) topicList.toArray( new Topic[0] );
    }
View Full Code Here

            TopicSpace topicSpace = topicSpaces[i];
            String targetNamespace = topicSpace.getTargetNamespace();
            Iterator iterator = topicSpace.topicIterator();
            while (iterator.hasNext())
            {
                Topic topic =  (Topic)iterator.next();
                String topicName = topic.getName();
                QName rootTopicQName = new QName(targetNamespace, topicName);
                addSimpleTopic(rootTopicQName, resourceProperty);
                Iterator subTopics = topic.topicIterator();
                while (subTopics.hasNext())
                {
                    Topic subTopic = (Topic) subTopics.next();
                    addConcreteTopics(rootTopicQName, subTopic, resourceProperty);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.ws.notification.topics.Topic

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.