Package org.apache.sandesha2.client

Examples of org.apache.sandesha2.client.SequenceReport


    if (messageContext != null) {
      SandeshaListener listener = (SandeshaListener) messageContext
          .getProperty(SandeshaClientConstants.SANDESHA_LISTENER);
      if (listener != null) {
        SequenceReport report = SandeshaClient.getOutgoingSequenceReport(internalSequenceID, configurationContext, false);
        listener.onTimeOut(report);
      }
    }
  }
View Full Code Here


    serviceClient.fireAndForget(getPingOMBlock("ping2"));
   
    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 {

        Thread.sleep(1000);
      }
View Full Code Here

      StorageManager storageManager) throws SandeshaException {
    ConfigurationContext configurationContext = messageContext.getConfigurationContext();

    configurationContext.setProperty(Sandesha2Constants.WITHIN_TRANSACTION, messageContext
        .getProperty(Sandesha2Constants.WITHIN_TRANSACTION));
    SequenceReport report = SandeshaClient.getOutgoingSequenceReport(internalSequenceID, configurationContext);
    TerminateManager.timeOutSendingSideSequence(configurationContext,sequencePropertyKey ,internalSequenceID, false, storageManager);

    SandeshaListener listener = (SandeshaListener) messageContext
        .getProperty(SandeshaClientConstants.SANDESHA_LISTENER);
    if (listener != null) {
View Full Code Here

    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
    serviceClient.fireAndForget(getPingOMBlock("ping3"));

    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);
 
    configContext.getListenerManager().stop();
    serviceClient.cleanup();
  }
View Full Code Here

   
    SandeshaClient.terminateSequence(serviceClient);
   
    Thread.sleep(5000);
   
    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);
 
    configContext.getListenerManager().stop();
    serviceClient.cleanup();
  }
View Full Code Here

   
  }
 
  private void terminateSequence (ServiceClient serviceClient) throws Exception {
   
      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

    String sequenceKey = SandeshaClient.createSequence(serviceClient,true);
    clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY, sequenceKey);
   
    Thread.sleep(10000);
   
    SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
   
    assertNotNull(sequenceReport.getSequenceID());
    assertFalse(sequenceReport.isSecureSequence());
   
    configContext.getListenerManager().stop();
    serviceClient.cleanup();
  }
View Full Code Here

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

    serviceClient.setOptions(clientOptions);
   
    serviceClient.fireAndForget(getPingOMBlock("echo1"));
   
    //assertions for the out sequence.
    SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
    assertTrue(sequenceReport.getCompletedMessages().isEmpty());
   
    //assertions for the in sequence
    List inboundReports = SandeshaClient.getIncomingSequenceReports(configContext);
    assertTrue(inboundReports.isEmpty());
   
View Full Code Here

    // Check the response
    String echoStr = checkEchoOMBlock(result);
    assertEquals(echoStr, "echo1");
   
    //assertions for the out sequence.
    SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
    assertTrue(sequenceReport.getCompletedMessages().isEmpty());
   
    //assertions for the in sequence
    List inboundReports = SandeshaClient.getIncomingSequenceReports(configContext);
    assertTrue(inboundReports.isEmpty());
   
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.