Package org.apache.sandesha2.client

Examples of org.apache.sandesha2.client.SequenceReport


    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
            //assertions for the out sequence.
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
        assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
        assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
       
        assertTrue(callback1.isErrorReported());
        assertEquals(callback1.getResult(),null);
       
        lastError = null;
View Full Code Here


    Error lastError = null;
    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
        assertTrue(sequenceReport.getCompletedMessages().contains(new Long(2)));
        assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
        assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
       
        lastError = null;
        break;
      } catch(Error e) {
        lastError = e;
View Full Code Here

      Error lastError = null;
      while(System.currentTimeMillis() < limit) {
        Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
       
        try {
          SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
         
          assertNotNull(sequenceReport.getSequenceID());
          assertFalse(sequenceReport.isSecureSequence());

          lastError = null;
          break;
        } catch(Error e) {
          lastError = e;
View Full Code Here

        Error lastError = null;
        while(System.currentTimeMillis() < limit) {
          Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
         
          try {
            SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
            assertNotNull(sequenceReport.getSequenceID());
           
            //now close the sequence
            SandeshaClient.closeSequence(serviceClient);
           
            //try and send another msg - this should fail
View Full Code Here

      while(System.currentTimeMillis() < limit) {
        Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
       
        try {
          //now check the sequence is terminated
          SequenceReport report = SandeshaClient.getOutgoingSequenceReport(srvcClient);
          assertNotNull(report);
          assertEquals(report.getSequenceStatus(), SequenceReport.SEQUENCE_STATUS_TERMINATED);

          lastError = null;
          break;
        } catch(Error e) {
          lastError = e;
View Full Code Here

      // 7) wait for the sequence completion (30 second wait)
      SandeshaClient.waitUntilSequenceCompleted(serviceClient, 30000);

      // 8) Check that the sequence has terminated
      SequenceReport report = SandeshaClient.getOutgoingSequenceReport(serviceClient);
      assertNotNull(report);
      assertEquals(SequenceReport.SEQUENCE_STATUS_TERMINATED, report.getSequenceStatus());

    }
    finally {
      configContext.getListenerManager().stop();
      serviceClient.cleanup();     
View Full Code Here

    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
        //now check the sequence is running
        SequenceReport report = SandeshaClient.getOutgoingSequenceReport(serviceClient);
        assertEquals(report.getSequenceStatus(), SequenceReport.SEQUENCE_STATUS_ESTABLISHED);

        lastError = null;
        break;
      } catch(Error e) {
        lastError = e;
      }
    }
    if(lastError != null) throw lastError;
   
    // Send the ACK request
    SandeshaClient.sendAckRequest(serviceClient);
   
    limit = System.currentTimeMillis() + waitTime;
    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
        // Get the storage manager from the ConfigurationContext
        StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configContext, configContext.getAxisConfiguration());
       
        // Get the sequence id for this sequence.
        String sequenceId = SandeshaClient.getSequenceID(serviceClient);
       
        // Get the SenderBeanManager
        SenderBeanMgr senderManager = storageManager.getSenderBeanMgr();
           
        Transaction transaction = storageManager.getTransaction();
       
        // Check that there are no sender beans inside the SenderBeanMgr.
        SenderBean senderBean = new SenderBean();
        senderBean.setSequenceID(sequenceId);
        senderBean.setSend(true);
        senderBean.setReSend(false);
       
        // Find any sender beans for the to address.
        List beans = senderManager.find(senderBean);
       
        //only the ackRequested bean will be present.
        assertTrue("SenderBeans found when the list should be empty", (beans.size()==1));
       
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
   
        transaction.commit();
        assertNotNull(sequenceReport.getSequenceID());
        assertFalse(sequenceReport.isSecureSequence());

        lastError = null;
        break;
      } catch(Error e) {
        lastError = e;
View Full Code Here

    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
            //assertions for the out sequence.
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
        assertTrue(sequenceReport.getCompletedMessages().contains(new Long(1)));
        assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
        assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
       
        assertTrue(callback1.isComplete());
        assertEquals(callback1.getResult(),"echo1");
       
        //checking weather the incomingSequenceReport has the offered sequence ID
View Full Code Here

    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
            //assertions for the out sequence.
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
        assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TIMED_OUT);
        assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
       
        assertTrue(callback1.isErrorReported());
        assertEquals(callback1.getResult(),null);
       
        lastError = null;
View Full Code Here

    while(System.currentTimeMillis() < limit) {
      Thread.sleep(tickTime); // Try the assertions each tick interval, until they pass or we time out
     
      try {
            //assertions for the out sequence.
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
        assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TIMED_OUT);
        assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
       
        assertTrue(callback1.isErrorReported());
        assertEquals(callback1.getResult(),null);
       
        lastError = null;
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.client.SequenceReport

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.