Package org.serviceconnector.call

Examples of org.serviceconnector.call.SCMPReceivePublicationCall.invoke()


    String sessionId = reply.getSessionId();

    SCMPReceivePublicationCall receivePublicationCall = new SCMPReceivePublicationCall(this.requester,
        TestConstants.pubServerName1, sessionId);
    cbk = new TestCallback();
    receivePublicationCall.invoke(cbk, 20000);
    reply = cbk.getMessageSync(20000);
    Assert.assertTrue(reply.isLargeMessage());
    Assert.assertEquals(TestUtil.getLargeString(), reply.getBody());

    SCMPClnUnsubscribeCall unSubscribeCall = new SCMPClnUnsubscribeCall(this.requester, TestConstants.pubServerName1, sessionId);
View Full Code Here


    String sessionId = reply.getSessionId();

    // receive publication - get message
    SCMPReceivePublicationCall receivePublicationCall = new SCMPReceivePublicationCall(this.requester,
        TestConstants.pubServerName1, sessionId);
    receivePublicationCall.invoke(cbk, 20000);
    reply = cbk.getMessageSync(15000);
    TestUtil.checkReply(reply);
    Assert.assertFalse(reply.getHeaderFlag(SCMPHeaderAttributeKey.NO_DATA));

    Thread.sleep(65000);
View Full Code Here

    TestUtil.checkReply(reply);
    Assert.assertFalse(reply.getHeaderFlag(SCMPHeaderAttributeKey.NO_DATA));

    Thread.sleep(65000);
    receivePublicationCall = new SCMPReceivePublicationCall(this.requester, TestConstants.pubServerName1, sessionId);
    receivePublicationCall.invoke(cbk, 2000);
    reply = cbk.getMessageSync(1000);
    TestUtil.verifyError(reply, SCMPError.SUBSCRIPTION_NOT_FOUND, SCMPMsgType.RECEIVE_PUBLICATION);
  }

  /**
 
View Full Code Here

    Thread.sleep(50000);
    // receive publication - get message
    SCMPReceivePublicationCall receivePublicationCall1 = new SCMPReceivePublicationCall(this.requester,
        TestConstants.pubServerName1, sessionId1);
    cbk1 = new TestCallback();
    receivePublicationCall1.invoke(cbk1, 20000);
    reply1 = cbk1.getMessageSync(15000);
    TestUtil.checkReply(reply1);
    Assert.assertFalse(reply1.getHeaderFlag(SCMPHeaderAttributeKey.NO_DATA));

    // sleep 15 seconds - client2 timed out
View Full Code Here

    // sleep 15 seconds - client2 timed out
    Thread.sleep(15000);
    SCMPReceivePublicationCall receivePublicationCall2 = new SCMPReceivePublicationCall(this.requester,
        TestConstants.pubServerName1, sessionId2);
    cbk1 = new TestCallback();
    receivePublicationCall2.invoke(cbk1, 2000);
    reply1 = cbk1.getMessageSync(1000);
    TestUtil.verifyError(reply1, SCMPError.SUBSCRIPTION_NOT_FOUND, SCMPMsgType.RECEIVE_PUBLICATION);

    SCMPClnUnsubscribeCall unSubscribeCall = new SCMPClnUnsubscribeCall(this.requester, TestConstants.pubServerName1,
        sessionId1);
View Full Code Here

    req.setSessionId(cascClient.getSubscriptionId());
    req.setServiceName(cascClient.getServiceName());
    SCMPReceivePublicationCall receivePublicationCall = new SCMPReceivePublicationCall(this.requester, req);

    try {
      receivePublicationCall.invoke(callback, timeoutMillis);
    } catch (Exception e) {
      // receive publication failed
      callback.receive(e);
      return;
    }
View Full Code Here

    SCPublishServiceCallback callback = new SCPublishServiceCallback(this, this.messageCallback);
    SCMPReceivePublicationCall receivePublicationCall = new SCMPReceivePublicationCall(this.requester, this.serviceName,
        this.sessionId);
    try {
      PerformanceLogger.begin(this.sessionId);
      receivePublicationCall.invoke(callback, Constants.SEC_TO_MILLISEC_FACTOR
          * (this.receivePublicationTimeoutSeconds + this.noDataIntervalSeconds));
    } catch (Exception e) {
      PerformanceLogger.end(this.sessionId);
      // inactivate the session
      this.sessionActive = false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.