Package org.vosao.business.mq

Examples of org.vosao.business.mq.Subscriber


  @Override
  public void execute(Message message) {
    if (subscribers.containsKey(message.getTopic())) {
      for (Class subscriberClass : subscribers.get(message.getTopic())) {
        try {
          Subscriber subscriber = (Subscriber)
              subscriberClass.newInstance();
          subscriber.onMessage(message);
        }
        catch (IllegalAccessException e) {
          logger.error(e.getMessage());
        }
        catch (InstantiationException e) {
          logger.error(e.getMessage());
        }
      }
    }
    if (!StringUtils.isEmpty(message.getCommandClassName())) {
      try {
        Class clazz = loadClass(message.getCommandClassName());
        if (clazz != null) {
          Subscriber subscriber = (Subscriber)clazz.newInstance();
          subscriber.onMessage(message);
        }
        else {
          logger.error("Command class not found: "
              + message.getCommandClassName());
        }
View Full Code Here

TOP

Related Classes of org.vosao.business.mq.Subscriber

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.