Package net.timewalker.ffmq3.test.utils.md5

Examples of net.timewalker.ffmq3.test.utils.md5.MD5Test


        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


        return new CloseSessionResponse();
    }
   
    private CommitResponse processCommit( CommitQuery query ) throws JMSException
    {
        LocalSession localSession = lookupSession(query);
       
        // Flush remaining messages first
        List messages = query.getMessages();
        if (messages != null)
        {
            // Dispatch to session
            for(int n=0;n<messages.size();n++)
            {
                AbstractMessage msg = (AbstractMessage)messages.get(n);
                localSession.dispatch(msg);
            }
        }
       
        // Commit session
        List deliveredMessageIDs = query.getDeliveredMessageIDs();
        localSession.commit(deliveredMessageIDs != null && !deliveredMessageIDs.isEmpty(),
                        deliveredMessageIDs);
       
        return new CommitResponse();
    }
View Full Code Here

        return new CommitResponse();
    }
   
    private RollbackResponse processRollback( RollbackQuery query ) throws JMSException
    {
      LocalSession localSession = lookupSession(query);
      List deliveredMessageIDs = query.getDeliveredMessageIDs();
        localSession.rollback(deliveredMessageIDs != null && !deliveredMessageIDs.isEmpty(), deliveredMessageIDs);
       
        return new RollbackResponse();
    }
View Full Code Here

        return null; // Async call
    }
   
    private PutResponse processPut( PutQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
        AbstractMessage msg = query.getMessage();
       
        // Dispatch to session
        session.dispatch(msg);
    
        return new PutResponse();
    }
View Full Code Here

        return new PutResponse();
    }
   
    private MultiplePutResponse processMultiplePut( MultiplePutQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
       
        List messages = query.getMessages();
        if (messages != null)
        {
            // Dispatch to session
            for(int n=0;n<messages.size();n++)
            {
                AbstractMessage msg = (AbstractMessage)messages.get(n);
                session.dispatch(msg);
            }
        }
    
        return new MultiplePutResponse();
    }
View Full Code Here

        return new MultiplePutResponse();
    }
   
    private AcknowledgeResponse processAcknowledge( AcknowledgeQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
        session.acknowledge(query.getDeliveredMessageIDs());
       
        return new AcknowledgeResponse();
    }
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

   */
  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.test.utils.md5.MD5Test

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.