Package net.timewalker.ffmq3.common.destination

Examples of net.timewalker.ffmq3.common.destination.QueueRef


     * @see net.timewalker.ffmq3.security.SecurityConnector#getContext(java.lang.String, java.lang.String)
     */
  public SecurityContext getContext(String userName, String password) throws FFMQSecurityException
  {
    if (userName == null)
      throw new FFMQSecurityException("User name not specified","INVALID_SECURITY_DESCRIPTOR");
   
    // Check user and password
    User user = descriptor.getUser(userName);
        if (user == null || !user.getPassword().equals(password))
            throw new FFMQSecurityException("Invalid user/password","INVALID_SECURITY_DESCRIPTOR");
       
        return user;
  }
View Full Code Here


        if (TestUtils.USE_SAFE_MODE)
            System.setProperty("ffmq.dataStore.safeMode", "true");
       
        if (TestUtils.USE_EXTERNAL_SERVER)
        {
          queue1 = new QueueRef("TEST1");
            queue2 = new QueueRef("TEST2");
            topic1 = new TopicRef("TEST1");
            topic2 = new TopicRef("TEST2");
           
            // Purge queues first
            Connection connection = createQueueConnection();
View Full Code Here

    protected void singleQueueConnectionReceiverTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
      QueueConnection connection = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          connection = createQueueConnection();
         
          // Start receivers
View Full Code Here

    {
      QueueConnection listenerConnection = null;
      QueueConnection producerConnection = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          listenerConnection = createQueueConnection();
          producerConnection = createQueueConnection();
         
View Full Code Here

    {
      QueueConnection[] receiverConnections = null;
      QueueConnection[] sendersConnections = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          receiverConnections = new QueueConnection[params.receiverCount];
          for (int n = 0 ; n < receiverConnections.length ; n++)
              receiverConnections[n] = createQueueConnection();
View Full Code Here

    {
      QueueConnection[] receiverConnections = null;
      QueueConnection[] sendersConnections = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          receiverConnections = new QueueConnection[params.receiverCount];
          for (int n = 0 ; n < receiverConnections.length ; n++)
              receiverConnections[n] = createQueueConnection();
View Full Code Here

{
    private static void setDummyProperties( AbstractMessage msg ) throws JMSException
    {
        msg.setJMSMessageID("ID:"+UUIDProvider.getInstance().getUUID());
        msg.setJMSCorrelationID("CORREL-"+UUIDProvider.getInstance().getUUID());
        msg.setJMSReplyTo(new QueueRef("dummy"));
        msg.setBooleanProperty("boolean", true);
        msg.setStringProperty("string", "foobar");
        msg.setByteProperty("byte", (byte)1);
        msg.setShortProperty("short", (short)2);
        msg.setIntProperty("int", 3);
View Full Code Here

       
        // Queue
        if (objClassName.equals(QueueRef.class.getName()))
        {
          String queueName = getRequiredAttribute(reference, "queueName");
          return new QueueRef(queueName);
        }
       
        // Topic
        if (objClassName.equals(TopicRef.class.getName()))
        {
View Full Code Here

        Object answer = bindings.get(nm);
        if (answer == null)
        {
          // Dynamic queue or topic lookup
          if (nm.startsWith("queue/") && nm.length() > 6)
            return new QueueRef(nm.substring(nm.indexOf('/')+1));
          if (nm.startsWith("topic/") && nm.length() > 6)
            return new TopicRef(nm.substring(nm.indexOf('/')+1));
         
            throw new NameNotFoundException(name + " not found");
        }
View Full Code Here

          // Do our best to convert the ref. to one of our native types
          if (destination instanceof DestinationRef)
            dstMessage.setJMSDestination(destination);
          else
          if (destination instanceof Queue)
            dstMessage.setJMSDestination(new QueueRef(((Queue)destination).getQueueName()));
          else
          if (destination instanceof Topic)
            dstMessage.setJMSDestination(new TopicRef(((Topic)destination).getTopicName()));
        }
       
        dstMessage.setJMSExpiration(srcMessage.getJMSExpiration());
        dstMessage.setJMSMessageID(srcMessage.getJMSMessageID());
        dstMessage.setJMSPriority(srcMessage.getJMSPriority());
        dstMessage.setJMSRedelivered(srcMessage.getJMSRedelivered());
       
        dstMessage.setJMSReplyTo(srcMessage.getJMSReplyTo());
        Destination replyTo = srcMessage.getJMSReplyTo();
        if (replyTo != null)
        {
          // Do our best to convert the ref. to one of our native types
          if (replyTo instanceof DestinationRef)
            dstMessage.setJMSReplyTo(replyTo);
          else
          if (replyTo instanceof Queue)
            dstMessage.setJMSReplyTo(new QueueRef(((Queue)replyTo).getQueueName()));
          else
          if (replyTo instanceof Topic)
            dstMessage.setJMSReplyTo(new TopicRef(((Topic)replyTo).getTopicName()));
        }
       
View Full Code Here

TOP

Related Classes of net.timewalker.ffmq3.common.destination.QueueRef

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.