Package org.wijiscommons.ssaf.queue

Examples of org.wijiscommons.ssaf.queue.QueueMessage


    public void run() {
      startProcessing();
    }
  public void startProcessing()
  {
    QueueMessage msg = messageQueue.readHeadMessage();
        if (msg != null) {
          try {
              Queue stashq = QueueService.getQueue(provider.getStashQueueName(folderName));
            stashq.enqueue(msg);
            for (int i = 0; i < workflowNames.size(); i++) {
View Full Code Here



  public void startProcessing()
  {
    // Try to retrieve the message, and then delete it.
        QueueMessage msg = messageQueue.readHeadMessage();
        if (msg != null) {
          XMLToStringConversionUtility.convertStringToXMLFile((String)msg.getObject(),
                                      provider.getPickupWorkflowIndividualFolderLocation(folderName, workflowName),
                                      msg.getMessageID()) ;                
            messageQueue.removeHeadMessage(msg);
        }
    }
View Full Code Here

      startProcessing();
    }

  public void startProcessing()
  {
        QueueMessage msg = messageQueue.readHeadMessage();
        if (msg != null)
        {
          //provider.getErrorDataLocation(folderName)+messageID+".xml"
          XMLToStringConversionUtility.convertStringToXMLFile((String)msg.getObject(),
              provider.getStashBackupLocation(folderName),
              msg.getMessageID()) ;
          messageQueue.removeHeadMessage(msg);
        }
  }
View Full Code Here


  public void startProcessing()
  {
    // Try to retrieve the message, and then delete it.
        QueueMessage msg = messageQueue.readHeadMessage();
        if (msg != null)
        {
          // TODO Call Work flow Execution here.
          try
          {
            SSAFWorkflowProcess workflowProcess = new WorkflowProcessImpl();
            String finalXML = workflowProcess.applyWorkflow((String)msg.getObject(),this.folderName, this.workflowName);
            Queue outboundq = QueueService.getQueue(provider.getOutBoundQueueName(folderName, workflowName));
            msg.setObject(finalXML);
              outboundq.enqueue(msg);
                messageQueue.removeHeadMessage(msg);
          }
          catch (QueueException qe)
          {
View Full Code Here

  public boolean receiveMessage(Message message) throws DropoffMailBoxException
  {
   
    boolean isMessageInsertedWithoutError = false;
    QueueMessage queueMessage = new QueueMessageImpl();
    Queue queue = null;
    DropoffMailBoxException de = null;
    String messageID = message.getMessageID();
    try {
     
      queue = QueueService.getQueue(provider.getInboundQueueName(message.getFolderSource()));
      queueMessage.setObject(message.getIncomingMessageXML());
      queueMessage.setMessageID(messageID);
      queueMessage.setBody("Inserting processed message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(false);
      isMessageInsertedWithoutError = true;
      getProcessesExecuted(message);

    }
    catch (SSAFAuthenticationException authentication)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(authentication);
    }
    catch (SSAFAuthorizationException authorization)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(authorization);
    }
    catch (SSAFValidationException validation)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(validation);
    }
    catch (Exception exception)
    {
      queueMessage.setBody("Error message with id "+message.getMessageID()+ " from folder "+message.getFolderSource() );
      queueMessage.setErrorMessage(true);
      isMessageInsertedWithoutError = false;
      de = new DropoffMailBoxException();
      de.setMessageID(messageID);
      de.initCause(exception);
    }
View Full Code Here

TOP

Related Classes of org.wijiscommons.ssaf.queue.QueueMessage

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.