Package org.serviceconnector.call

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


    changeSubscriptionCall.setCompressed(scSubscribeMessage.isCompressed());
    changeSubscriptionCall.setRequestBody(scSubscribeMessage.getData());
    changeSubscriptionCall.setSessionInfo(scSubscribeMessage.getSessionInfo());
    SCServiceCallback callback = new SCServiceCallback(true);
    try {
      changeSubscriptionCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
    } catch (Exception e) {
      throw new SCServiceException("Change subscription failed.", e);
    }
    // 3. receiving reply and error handling
    SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here


    // mask matches now
    changeSubscriptionCall.setMask(TestConstants.mask);
    changeSubscriptionCall.setSessionInfo(TestConstants.sleepCmd);
    changeSubscriptionCall.setRequestBody("2000");
    cbk = new TestCallback();
    changeSubscriptionCall.invoke(cbk, 4000);

    changeSubscriptionCall = new SCMPClnChangeSubscriptionCall(this.requester, TestConstants.pubServerName1, sessionId);
    changeSubscriptionCall.setMask(TestConstants.mask);
    TestCallback cbk1 = new TestCallback();
    changeSubscriptionCall.invoke(cbk1, 1300);
View Full Code Here

    changeSubscriptionCall.invoke(cbk, 4000);

    changeSubscriptionCall = new SCMPClnChangeSubscriptionCall(this.requester, TestConstants.pubServerName1, sessionId);
    changeSubscriptionCall.setMask(TestConstants.mask);
    TestCallback cbk1 = new TestCallback();
    changeSubscriptionCall.invoke(cbk1, 1300);

    TestUtil.checkReply(cbk.getMessageSync(4000));
    reply = cbk1.getMessageSync(1300);
    Assert.assertTrue(reply.isFault());
    TestUtil.verifyError(reply, SCMPError.NO_FREE_CONNECTION, SCMPMsgType.CLN_CHANGE_SUBSCRIPTION);
View Full Code Here

    SCMPClnChangeSubscriptionCall changeSubscriptionCall = new SCMPClnChangeSubscriptionCall(this.requester,
        TestConstants.pubServerName1, sessionId);
    // mask matches now
    changeSubscriptionCall.setMask(TestConstants.mask);
    changeSubscriptionCall.invoke(cbk, 3000);
    TestUtil.checkReply(cbk.getMessageSync(1000));

    // receive publication first message
    receivePublicationCall = new SCMPReceivePublicationCall(this.requester, TestConstants.pubServerName1, sessionId);
    receivePublicationCall.invoke(cbk, 10000);
View Full Code Here

    changeSubscriptionCall.setCompressed(scSubscribeMessage.isCompressed());
    changeSubscriptionCall.setRequestBody(scSubscribeMessage.getData());
    changeSubscriptionCall.setSessionInfo(scSubscribeMessage.getSessionInfo());
    SCServiceCallback callback = new SCServiceCallback(true);
    try {
      changeSubscriptionCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
    } catch (Exception e) {
      throw new SCServiceException("Change subscription failed.", e);
    }
    // 3. receiving reply and error handling
    SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
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.