Package org.apache.ws.notification.topics

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


        return subTopic;
    }

    private void throwRelationshipCreatedNotif(XmlObject o)
    {
        Topic createdTopic = getCreatedTopic();
        if(createdTopic != null)
        {
           //if its there then build a notif and publish

            try
            {
                Situation situation = new SituationImpl( new CategoryImpl( MuwsConstants.SITUATION_CREATE ) );
                XmlBeansManagementEvent xme = new XmlBeansManagementEvent( situation );
                RelationshipCreatedNotificationDocument relationshipCreatedDoc = RelationshipCreatedNotificationDocument.Factory.newInstance();
                org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipCreatedNotificationDocument.RelationshipCreatedNotification relationshipCreatedNotification = relationshipCreatedDoc.addNewRelationshipCreatedNotification();
                relationshipCreatedNotification.setRelationship(((RelationshipDocumentImpl)o).getRelationship());
                xme.setAny(new Object[]{relationshipCreatedDoc});
                //publish!
                createdTopic.publish(xme.getXmlObject());
            }
            catch (Exception e)
            {
                LOG.debug("Unable to throw RelationshipCreated notification. Cause:" + e.getLocalizedMessage(), e);
            }
View Full Code Here


        }
    }

    private void throwRelationshipDeletedNotif(XmlObject copiedRelationship)
    {
        Topic deletedTopic = getDeletedTopic();
        if(deletedTopic != null)
        {
            //if its there then build a notif and publish
            try
            {
                Situation situation = new SituationImpl( new CategoryImpl( MuwsConstants.SITUATION_DESTROY ) );
                XmlBeansManagementEvent xme = new XmlBeansManagementEvent( situation );
                RelationshipDeletedNotificationDocument relationshipDeletedDoc = RelationshipDeletedNotificationDocument.Factory.newInstance();
                org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDeletedNotificationDocument.RelationshipDeletedNotification relationshipDeletedNotification = relationshipDeletedDoc.addNewRelationshipDeletedNotification();
                relationshipDeletedNotification.setRelationship(((RelationshipDocumentImpl)copiedRelationship).getRelationship());
                xme.setAny(new Object[]{relationshipDeletedDoc});
                //publish!
                deletedTopic.publish(xme.getXmlObject());
            }
            catch (Exception e)
            {
                LOG.debug("Unable to throw RelationshipDeleted notification. Cause:" + e.getLocalizedMessage(), e);
            }
View Full Code Here

   private Topic[] getSupportedTopics( Topic[] topics )
   {
      List supportedTopics = new ArrayList(  );
      for ( int i = 0; i < topics.length; i++ )
      {
         Topic topic = topics[i];
         if ( containsTopic( QName.valueOf( topic.toString(  ) ) ) )
         {
            supportedTopics.add( topic );
         }
      }
View Full Code Here

   public Object getCurrentMessage( TopicExpression topicExpr )
   throws InvalidTopicExpressionException,
          TopicNotSupportedException,
          NoCurrentMessageOnTopicException
   {
      Topic  topic      = toTopic( topicExpr );
      Object currentMsg = m_currentMsgMap.get( topic );
      if ( currentMsg == null )
      {
         throw new NoCurrentMessageOnTopicException( topic );
      }
View Full Code Here

                        Object          msg )
   throws TopicNotSupportedException,
          InvalidTopicExpressionException,
          MessageTypeNotSupportedException
   {
      Topic topic = toTopic( topicExpr );
      m_currentMsgMap.put( topic, msg );
      Subscription[] subscriptions =
         SubscriptionManager.getInstance(  ).getSubscriptions( m_producerResource, topic );
      LOG.debug( "Topic " + topic + " matched " + subscriptions.length + " subscriptions." );
      XmlObject msgXBean;
View Full Code Here

                              TopicSiblingSet topicSiblingSet )
   {
      for ( int i = 0; i < topicTypes.length; i++ )
      {
         TopicType topicType = topicTypes[i];
         Topic     topic = topicSiblingSet.addTopic( topicType.getName(  ) );
         importTopics( topicType.getTopicArray(  ),
                       topic ); // recurse
      }
   }
View Full Code Here

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

      String name  = topicPath.getLocalPart(  );
      Topic  topic = topicNs.getTopic( name );
      if ( topic != null )
      {
         results = new Topic[]
                   {
                      topic
View Full Code Here

         if ( qName.endsWith( "topic" ) )
         {
            if ( depth == 0 )
            {
               Topic topic = m_topicNs.addTopic( attrs.getValue( "name" ) );
               stack.push( topic );
            }
            else
            {
               Topic in    = (Topic) stack.peek(  );
               Topic topic = in.addTopic( attrs.getValue( "name" ) );
               stack.push( topic );
            }

            //System.out.println(depth+" : "+attrs.getValue("name"));
            depth++;
View Full Code Here

            s.setTerminationTime(time);
        }
    }//GEN-LAST:event_renewButtonActionPerformed
   
    private void subscribeButton(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_subscribeButton
        Topic t=null;
        String xpath=null;
        Calendar expire=null;
        boolean subend = (cSubend.getSelectedObjects()!=null);
        if(cTfilter.getSelectedObjects()!=null){
            TreePath[] ts =tree.getSelectionModel().getSelectionPaths();
View Full Code Here

        jLabel1.setBounds(260, 20, 130, 30);

    }//GEN-END:initComponents

    private void publishEvent(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_publishEvent
        Topic t=null;
        if(cTopic.getSelectedObjects()!=null){
            TreePath[] ts =tree.getSelectionModel().getSelectionPaths();
            if(ts!=null)
                t = (org.apache.ws.notification.topics.Topic)((DefaultMutableTreeNode) ts[ts.length-1].getLastPathComponent()).getUserObject();
        }
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.