Package com.commander4j.messages

Examples of com.commander4j.messages.OutgoingLabelData


      OutgoingDespatchPreAdvice opa = new OutgoingDespatchPreAdvice(getHostID(), getSessionID());
      OutgoingEquipmentTracking oet = new OutgoingEquipmentTracking(getHostID(), getSessionID());
      OutgoingPalletStatusChange psc = new OutgoingPalletStatusChange(getHostID(), getSessionID());
      OutgoingPalletSplit ops = new OutgoingPalletSplit(getHostID(), getSessionID());
      OutgoingPalletDelete opd = new OutgoingPalletDelete(getHostID(), getSessionID());
      OutgoingLabelData old = new OutgoingLabelData(getHostID(), getSessionID());
      LinkedList<Long> irqList = new LinkedList<Long>();
      int noOfMessages = 0;

      while (true)
      {

        JWait.milliSec(500);

        if (allDone)
        {
          if (dbconnected)
          {
            Common.hostList.getHost(hostID).disconnect(getSessionID());
          }
          return;
        }

        irqList.clear();
        irqList = ir.getInterfaceRequestIDs();
        noOfMessages = irqList.size();

        if (noOfMessages > 0)
        {
          for (int x = 0; x < noOfMessages; x++)
          {
            JWait.milliSec(100);
            ir.setInterfaceRequestID(irqList.get(x));
            ir.getInterfaceRequestProperties();

            if (ir.getMode().equals("Inbound File Re-Submit"))
            {
              if (inter.getInterfaceProperties(ir.getInterfaceType(), "Input") == true)
              {
                String sourceFile = Common.base_dir + java.io.File.separator + "xml" + java.io.File.separator + "interface" + java.io.File.separator + "error" + java.io.File.separator + ir.getInterfaceType() + java.io.File.separator
                    + ir.getFilename();

                destinationFile = inter.getRealPath() + java.io.File.separator + ir.getFilename();
                renamedDestinationFile = inter.getRealPath() + java.io.File.separator + ir.getFilename().replaceAll(".xml", ".lmx");

                mover.move_File(sourceFile, renamedDestinationFile);
                mover.move_File(renamedDestinationFile, destinationFile);
                ir.delete();

              }
            }

            if (ir.getMode().equals("Normal"))
            {

              errorMessage = "Unknown Outbound Interface Type :" + ir.getInterfaceType();
              messageProcessedOK = false;

              if (ir.getInterfaceType().equals("Production Declaration"))
              {
                messageProcessedOK = opdc.processMessage(ir.getTransactionRef());
                errorMessage = opdc.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Production Declaration", messageProcessedOK.toString());
              }

              if (ir.getInterfaceType().equals("Pallet Status Change"))
              {
                messageProcessedOK = psc.processMessage(ir.getTransactionRef());
                errorMessage = psc.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Pallet Status Change", messageProcessedOK.toString());
              }             

              if (ir.getInterfaceType().equals("Pallet Split"))
              {
                messageProcessedOK = ops.processMessage(ir.getTransactionRef());
                errorMessage = ops.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Pallet Split", messageProcessedOK.toString());
             
             
              if (ir.getInterfaceType().equals("Pallet Delete"))
              {
                messageProcessedOK = opd.processMessage(ir.getTransactionRef());
                errorMessage = opd.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Pallet Delete", messageProcessedOK.toString());
             
             
              if (ir.getInterfaceType().equals("Despatch Confirmation"))
              {
                messageProcessedOK = odc.processMessage(ir.getTransactionRef());
                errorMessage = odc.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Despatch Confirmation", messageProcessedOK.toString());
              }

              if (ir.getInterfaceType().equals("Despatch Pre Advice"))
              {
                messageProcessedOK = opa.processMessage(ir.getTransactionRef());
                errorMessage = opa.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Despatch Pre Advice", messageProcessedOK.toString());
              }

              if (ir.getInterfaceType().equals("Equipment Tracking"))
              {
                messageProcessedOK = oet.processMessage(ir.getTransactionRef());
                errorMessage = oet.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Equipment Tracking", messageProcessedOK.toString());
              }
             
              if (ir.getInterfaceType().equals("Label Data"))
              {
                messageProcessedOK = old.processMessage(ir.getUniqueID());
                errorMessage = oet.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Label Data", messageProcessedOK.toString());
              }

              if (messageProcessedOK == true)
View Full Code Here


    setLine("");
  }
 
  public void sendMessage()
  {
    OutgoingLabelData old = new OutgoingLabelData(getHostID(),getSessionID());
    old.submit(getUniqueID());
  }
View Full Code Here

    setLine("");
  }
 
  public void sendMessage()
  {
    OutgoingLabelData old = new OutgoingLabelData(getHostID(),getSessionID());
    old.submit(getUniqueID());
  }
View Full Code Here

TOP

Related Classes of com.commander4j.messages.OutgoingLabelData

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.