Package org.jboss.soa.esb.samples.quickstart.business_ruleservice_cep.status

Examples of org.jboss.soa.esb.samples.quickstart.business_ruleservice_cep.status.StatusSender


  public static void main(String... args) throws Exception
  {
    boolean understood = false;
    if (args.length > 0)
    {
      StatusSender sender = StatusSender.getInstance();
      sender.startConnection();
      if ("startSession".equals(args[0]))
      {
        understood = true;
        sender.startSession();
      }
      else if ("sendHeartbeat".equals(args[0]))
      {
       
        for (int a=1; a < args.length; a++)
        {
          for (Spoke spoke : spokes.values())
          {
            if (spoke.getLocation().equalsIgnoreCase(args[a]))
            {
              understood = true;
              spoke.heartbeat();
            }
          }
        }
      }
      else if ("populateInventory".equals(args[0]))
      {
        understood = true;
        for (Spoke spoke : spokes.values())
        {
          for (Part part : spoke.getParts())
          {
            part.adjust(random(10));
          }
        }
      }
      else if ("incrementPart".equals(args[0]))
      {
        understood = adjustPart(args, true);
      }
      else if ("decrementPart".equals(args[0]))
      {
        understood = adjustPart(args, false);
      }
      else if ("stopSession".equals(args[0]))
      {
        understood = true;
        sender.stopSession();
      }
      sender.stopConnection();
    }
    if (!understood)
    {
      throw new Exception("could not understand command [" + args + "]");
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.samples.quickstart.business_ruleservice_cep.status.StatusSender

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.