Package org.apache.sandesha2.client

Examples of org.apache.sandesha2.client.SequenceReport


   
    SandeshaClient.createSequence(serviceClient,true);
   
    Thread.sleep(15000);
   
    SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
   
    assertNotNull(sequenceReport.getSequenceID());
   
    serviceClient.finalizeInvoke();
  }
View Full Code Here


       
        Thread.sleep(40000);
   
        //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");
   
    serviceClient.finalizeInvoke();
View Full Code Here

       
        Thread.sleep(40000);
   
        //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");
   
    serviceClient.finalizeInvoke();
View Full Code Here

   
    serviceClient.fireAndForget(getPingOMBlock("ping1"));
    serviceClient.fireAndForget(getPingOMBlock("ping2"));
    serviceClient.fireAndForget(getPingOMBlock("ping3"));
   
    SequenceReport sequenceReport = null;   
    boolean complete = false;
    while (!complete) {
      sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
      if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3)
        complete = true;
      else {
        try {
          Thread.sleep(1000);
        } catch (InterruptedException e1) {
View Full Code Here

    serviceClient.sendReceiveNonBlocking (getEchoOMBlock("echo1",sequenceKey),callback1);
       
        Thread.sleep(22000);
   
        //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

   
    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");

    serviceClient.fireAndForget(getPingOMBlock("ping3"));
   
    SequenceReport sequenceReport = null;
   
    boolean complete = false;
    while (!complete) {
      sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
      if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3)
        complete = true;
      else {
        try {
          Thread.sleep(1000);
        } catch (InterruptedException e) {
View Full Code Here

    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
    serviceClient.fireAndForget(getPingOMBlock("ping3"));
   
    boolean complete = false;
    while (!complete) {
      SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
      if (sequenceReport!=null && sequenceReport .getCompletedMessages().size()==3)
        complete = true;
      else {
        try {
          Thread.sleep(1000);
        } catch (InterruptedException e) {
View Full Code Here

       
        Thread.sleep(45000);
   
        //testing outgoing sequence reports
    SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
    assertTrue(sequenceReport.getCompletedMessages().contains(new Long(1)));
    assertTrue(sequenceReport.getCompletedMessages().contains(new Long(2)));
    assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
    assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
   
    //testing incoming sequence reports
    ArrayList incomingSequenceReports = SandeshaClient.getIncomingSequenceReports(configContext);
    assertEquals(incomingSequenceReports.size(),1);
    SequenceReport incomingSequenceReport = (SequenceReport) incomingSequenceReports.get(0);
    assertEquals(incomingSequenceReport.getCompletedMessages().size(),2);
    assertNotNull(incomingSequenceReport.getSequenceID());
    assertEquals(incomingSequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_IN);
    assertEquals(incomingSequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
    assertNotNull(incomingSequenceReport.getInternalSequenceID());
   
    assertEquals(incomingSequenceReport.getSequenceID(),incomingSequenceReport.getInternalSequenceID())//for the incoming side, internalSequenceID==sequenceID
   
    serviceClient.finalizeInvoke();
  }
View Full Code Here

    serviceClient.fireAndForget(getPingOMBlock("ping2"));
    serviceClient.fireAndForget(getPingOMBlock("ping3"));

    boolean complete = false;
    while (!complete) {
      SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
      if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3)
        complete = true;
      else {
        try {
          Thread.sleep(1000);
        } catch (InterruptedException e1) {
View Full Code Here

    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
    serviceClient.fireAndForget(getPingOMBlock("ping1"));
   
    Thread.sleep(10000);
       
    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);
 
    serviceClient.finalizeInvoke();
  }
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.