Package net.timewalker.ffmq3.management.destination.template

Examples of net.timewalker.ffmq3.management.destination.template.TopicTemplate


        return consumer;
    }
   
    private LocalQueueBrowser lookupBrowser( AbstractQueueBrowserQuery query ) throws JMSException
    {
        LocalSession localSession = lookupSession(query);
        LocalQueueBrowser browser = (LocalQueueBrowser)localSession.lookupRegisteredBrowser(query.getBrowserId());
        if (browser == null)
            throw new FFMQException("Invalid browser id : "+query.getBrowserId(),"NETWORK_ERROR");
        return browser;
    }
View Full Code Here


   * @see net.timewalker.ffmq3.utils.Checkable#check()
   */
  public void check() throws JMSException
    {
      if (StringTools.isEmpty(name))
          throw new InvalidDescriptorException("Missing user name in security descriptor");
      if (password == null)
          throw new InvalidDescriptorException("Missing password definition for user "+name);
    }
View Full Code Here

            // Check temporary destinations scope (JMS Spec 4.4.3 p2)
            session.checkTemporaryDestinationScope(localTopic);
           
            // Deploy a local queue for this consumer
            TopicDefinition topicDef = this.localTopic.getDefinition();
            QueueDefinition tempDef = topicDef.createQueueDefinition(topicRef.getTopicName(), subscriberId, !isDurable());           
            if (engine.localQueueExists(tempDef.getName()))
                this.localQueue = engine.getLocalQueue(tempDef.getName());
            else
                this.localQueue = engine.createQueue(tempDef);
           
            // Register on both the queue and topic
            this.localQueue.registerConsumer(this);
View Full Code Here

           
            // Check temporary destinations scope (JMS Spec 4.4.3 p2)
            session.checkTemporaryDestinationScope(localTopic);
           
            // Deploy a local queue for this consumer
            TopicDefinition topicDef = this.localTopic.getDefinition();
            QueueDefinition tempDef = topicDef.createQueueDefinition(topicRef.getTopicName(), subscriberId, !isDurable());           
            if (engine.localQueueExists(tempDef.getName()))
                this.localQueue = engine.getLocalQueue(tempDef.getName());
            else
                this.localQueue = engine.createQueue(tempDef);
           
View Full Code Here

            File[] topicTemplateDescriptors = DescriptorTools.getDescriptorFiles(templatesDir,"topicTemplate-",".properties");
            if (topicTemplateDescriptors != null)
            {
                for (int i = 0 ; i < topicTemplateDescriptors.length ; i++)
                {
                    TopicTemplate topicTemplate = loadTopicTemplate(topicTemplateDescriptors[i]);
                    addTopicTemplate(topicTemplate);
                }
            }
            log.debug("Loaded "+topicTemplates.size()+" topic templates");
        }
View Full Code Here

        return new QueueTemplate(queueSettings);
    }

    public TopicTemplate getTopicTemplate( String topicName ) throws JMSException
    {
        TopicTemplate topicDef = (TopicTemplate)topicTemplates.get(topicName);
        if (topicDef == null
        {
            topicDef = loadTopicTemplate(topicName);
            if (topicDef == null)
                return null;
View Full Code Here

            throw new FFMQException("Cannot access topic template descriptor : "+topicTemplateDescriptor.getAbsolutePath(),"FS_ERROR");
       
        Settings topicSettings = new Settings();
        topicSettings.readFrom(topicTemplateDescriptor);
       
        return new TopicTemplate(topicSettings);
    }
View Full Code Here

    {
        String templateName = templateMappingProvider.getTemplateNameForTopic(topicName);
        if (StringTools.isEmpty(templateName))
            throw new FFMQException("No template matching topic : "+topicName,"MISSING_TEMPLATE_MAPPING");
       
        TopicTemplate topicTemplate = destinationTemplateProvider.getTopicTemplate(templateName);
        if (topicTemplate == null)
            throw new FFMQException("Topic template does not exist : "+templateName,"MISSING_TEMPLATE");

       TopicDefinition tempDef = topicTemplate.createTopicDefinition(topicName, true);
       return createTopic(tempDef);
    }
View Full Code Here

        if (setup.doAutoCreateTopics())
        {
            String templateName = templateMappingProvider.getTemplateNameForTopic(topicName);
            if (templateName != null)
            {
                TopicTemplate topicTemplate = destinationTemplateProvider.getTopicTemplate(templateName);
                if (topicTemplate != null)
                    return createTopic(topicTemplate.createTopicDefinition(topicName, false));
            }
        }
       
        throw new FFMQException("Topic does not exist : "+topicName,"TOPIC_DOES_NOT_EXIST");
    }
View Full Code Here

   */
  public void checkPermission(String resourceName, String action) throws JMSException
  {
    for (int i = 0; i < privileges.size(); i++)
    {
      Privilege privilege = (Privilege)privileges.get(i);
      if (privilege.matches(resourceName, action))
        return;
    }
    throw new FFMQException("Access denied to resource '"+resourceName+"' for action '"+action+"'","ACCESS_DENIED");
  }
View Full Code Here

TOP

Related Classes of net.timewalker.ffmq3.management.destination.template.TopicTemplate

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.