Package org.springframework.amqp

Examples of org.springframework.amqp.AmqpIllegalStateException


  private MessageConverter getRequiredMessageConverter()
      throws IllegalStateException {
    MessageConverter converter = this.getMessageConverter();
    if (converter == null) {
      throw new AmqpIllegalStateException(
          "No 'messageConverter' specified. Check configuration of RabbitTemplate.");
    }
    return converter;
  }
View Full Code Here


  }

  private String getRequiredQueue() throws IllegalStateException {
    String name = this.queue;
    if (name == null) {
      throw new AmqpIllegalStateException(
          "No 'queue' specified. Check configuration of RabbitTemplate.");
    }
    return name;
  }
View Full Code Here

            logger.debug("Restored replyTo to " + savedReplyTo);
          }
        }
      }
    } catch (UnsupportedEncodingException e) {
      throw new AmqpIllegalStateException("Invalid Character Set:"
          + this.encoding, e);
    }
  }
View Full Code Here

        if (channel != null) {
          ((ChannelAwareMessageListener) delegate).onMessage(message, channel);
          return;
        }
        else if (!(delegate instanceof MessageListener)) {
          throw new AmqpIllegalStateException("MessageListenerAdapter cannot handle a "
              + "ChannelAwareMessageListener delegate if it hasn't been invoked with a Channel itself");
        }
      }
      if (delegate instanceof MessageListener) {
        ((MessageListener) delegate).onMessage(message);
        return;
      }
    }

    // Regular case: find a handler method reflectively.
    Object convertedMessage = extractMessage(message);
    String methodName = getListenerMethodName(message, convertedMessage);
    if (methodName == null) {
      throw new AmqpIllegalStateException("No default listener method specified: "
          + "Either specify a non-null value for the 'defaultListenerMethod' property or "
          + "override the 'getListenerMethodName' method.");
    }

    // Invoke the handler method with appropriate arguments.
View Full Code Here

  }

  private MessageConverter getRequiredMessageConverter() throws IllegalStateException {
    MessageConverter converter = this.getMessageConverter();
    if (converter == null) {
      throw new AmqpIllegalStateException(
          "No 'messageConverter' specified. Check configuration of RabbitTemplate.");
    }
    return converter;
  }
View Full Code Here

  }

  private String getRequiredQueue() throws IllegalStateException {
    String name = this.queue;
    if (name == null) {
      throw new AmqpIllegalStateException("No 'queue' specified. Check configuration of RabbitTemplate.");
    }
    return name;
  }
View Full Code Here

          }
        }
      }
    }
    catch (UnsupportedEncodingException e) {
      throw new AmqpIllegalStateException("Invalid Character Set:" + this.encoding, e);
    }
  }
View Full Code Here

        this.taskExecutor.execute(processor);
      }
      for (AsyncMessageProcessingConsumer processor : processors) {
        FatalListenerStartupException startupException = processor.getStartupException();
        if (startupException != null) {
          throw new AmqpIllegalStateException("Fatal exception on listener startup", startupException);
        }
      }
    }
  }
View Full Code Here

          this.taskExecutor.execute(processor);
          try {
            FatalListenerStartupException startupException = processor.getStartupException();
            if (startupException != null) {
              this.consumers.remove(consumer);
              throw new AmqpIllegalStateException("Fatal exception on listener startup", startupException);
            }
          }
          catch (InterruptedException ie) {
            Thread.currentThread().interrupt();
          }
View Full Code Here

TOP

Related Classes of org.springframework.amqp.AmqpIllegalStateException

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.