Package net.timewalker.ffmq3.management.destination.definition

Examples of net.timewalker.ffmq3.management.destination.definition.TopicDefinition


    }
   
    private String processCreateTopic( Message msg ) throws JMSException
    {
        Settings topicSettings = createSettings(msg);
        TopicDefinition topicDef = new TopicDefinition(topicSettings);

        log.debug("Creating topic : "+topicDef);
        engine.createTopic(topicDef);
       
        // Success
View Full Code Here


            File[] topicDescriptors = DescriptorTools.getDescriptorFiles(definitionDir,"topic-",".properties");
            if (topicDescriptors != null)
            {
                for (int i = 0 ; i < topicDescriptors.length ; i++)
                {
                    TopicDefinition topicDef = loadTopicDefinition(topicDescriptors[i]);
                    topicDefinitions.put(topicDef.getName(), topicDef);
                }
            }
            log.debug("Loaded "+topicDefinitions.size()+" topic definitions");
        }
    }
View Full Code Here

        queueDefinitions.remove(queueDef.getName());
    }

    public TopicDefinition getTopicDefinition( String topicName ) throws JMSException
    {
        TopicDefinition topicDef = (TopicDefinition)topicDefinitions.get(topicName);
        if (topicDef == null
        {
            topicDef = loadTopicDefinition(topicName);
            if (topicDef == null)
                return null;
View Full Code Here

            throw new FFMQException("Cannot access topic definition descriptor : "+topicDescriptor.getAbsolutePath(),"FS_ERROR");
       
        Settings topicSettings = new Settings();
        topicSettings.readFrom(topicDescriptor);

        return new TopicDefinition(topicSettings);
    }
View Full Code Here

    /**
     * Create a topic definition from this template
     */
    public TopicDefinition createTopicDefinition( String topicName , boolean temporary )
    {
        TopicDefinition def = new TopicDefinition();
        def.setName(topicName);
        def.setTemporary(temporary);
        copyAttributesTo(def);
       
        return def;
    }
View Full Code Here

            }
        }
        String[] topicNames = destinationDefinitionProvider.getAllTopicNames();
        for (int i = 0 ; i < topicNames.length ; i++)
        {
            TopicDefinition topicDef = destinationDefinitionProvider.getTopicDefinition(topicNames[i]);
            if (topicDef.isTemporary())
            {
                log.info("Deleting old temporary topic : "+topicNames[i]);
                deleteTopic(topicNames[i]);
            }
        }
View Full Code Here

       
        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

            {
                undeployTopic(topic);
                log.debug("Undeployed local topic : "+topicName);
            }
               
            TopicDefinition topicDef = destinationDefinitionProvider.getTopicDefinition(topicName);
            if (topicDef != null)
                destinationDefinitionProvider.removeTopicDefinition(topicName);
        }
    }
View Full Code Here

        }
    }
   
    private LocalTopic loadOrAutoCreateTopic( String topicName ) throws JMSException
    {
        TopicDefinition topicDef = destinationDefinitionProvider.getTopicDefinition(topicName);
        if (topicDef != null)
        {
            LocalTopic topic = new LocalTopic(topicDef);
            deployTopic(topic);
            return topic;
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.definition.TopicDefinition

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.