Package org.serviceconnector.call

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


    // create another session3
    createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(3600);
    TestCallback cbk3 = new TestCallback();
    createSessionCall.invoke(cbk3, 3000);
    resp = cbk3.getMessageSync(3000);
    String sessionId3 = resp.getSessionId();

    // reserve connection 2 with session2
    clnExecuteCall = new SCMPClnExecuteCall(this.requester, TestConstants.sesServerName1, sessionId3);
View Full Code Here


    // create another session2
    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(3600);
    TestCallback cbk2 = new TestCallback();
    createSessionCall.invoke(cbk2, 3000);
    SCMPMessage resp = cbk2.getMessageSync(3000);
    String sessionId2 = resp.getSessionId();

    // create another session3
    createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
View Full Code Here

    // create another session3
    createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(3600);
    TestCallback cbk3 = new TestCallback();
    createSessionCall.invoke(cbk3, 3000);
    resp = cbk3.getMessageSync(3000);
    String sessionId3 = resp.getSessionId();

    // reserve connection 2 with session2
    clnExecuteCall = new SCMPClnExecuteCall(this.requester, TestConstants.sesServerName1, sessionId3);
View Full Code Here

  protected void createSession() throws Exception {
    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(3600);
    TestCallback cbk = new TestCallback();
    createSessionCall.invoke(cbk, 3000);
    SCMPMessage resp = cbk.getMessageSync(3000);
    this.sessionId = resp.getSessionId();
  }

  /**
 
View Full Code Here

    // create another session2
    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(3600);
    TestCallback cbk2 = new TestCallback();
    createSessionCall.invoke(cbk2, 3000);
    SCMPMessage resp = cbk2.getMessageSync(3000);
    String sessionId2 = resp.getSessionId();

    // reserve connection 2 with session2
    clnExecuteCall = new SCMPClnExecuteCall(this.requester, TestConstants.sesServerName1, sessionId2);
View Full Code Here

  protected void createSession() throws Exception {
    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(3600);
    TestCallback cbk = new TestCallback();
    createSessionCall.invoke(cbk, 3000);
    SCMPMessage resp = cbk.getMessageSync(3000);
    this.sessionId = resp.getSessionId();
  }

  /**
 
View Full Code Here

  public void t10_CreateSessionDeleteSession() throws Exception {
    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(3000);
    TestCallback cbk = new TestCallback();
    createSessionCall.invoke(cbk, 2000);
    SCMPMessage responseMessage = cbk.getMessageSync(4000);
    String sessId = responseMessage.getSessionId();
    TestUtil.checkReply(responseMessage);

    SCMPClnDeleteSessionCall deleteSessionCall = new SCMPClnDeleteSessionCall(this.requester, responseMessage.getServiceName(),
View Full Code Here

  public void t20_SessionRejected() throws Exception {
    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo(TestConstants.rejectCmd);
    createSessionCall.setEchoIntervalSeconds(300);
    TestCallback cbk = new TestCallback();
    createSessionCall.invoke(cbk, 4000);
    SCMPMessage responseMessage = cbk.getMessageSync(3000);
    String sessId = responseMessage.getSessionId();
    Assert.assertNull(sessId);
    Assert.assertFalse(responseMessage.isFault());
    Assert.assertTrue(responseMessage.getHeaderFlag(SCMPHeaderAttributeKey.REJECT_SESSION));
View Full Code Here

  public void t30_SessionTimesOut() throws Exception {
    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo("sessionInfo");
    createSessionCall.setEchoIntervalSeconds(10);
    TestCallback cbk = new TestCallback();
    createSessionCall.invoke(cbk, 4000);
    SCMPMessage responseMessage = cbk.getMessageSync(3000);
    TestUtil.checkReply(responseMessage);

    String sessionId = responseMessage.getSessionId();
    // wait until session times out and get cleaned up
View Full Code Here

    SCMPClnCreateSessionCall createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo(TestConstants.sleepCmd);
    createSessionCall.setEchoIntervalSeconds(10);
    createSessionCall.setRequestBody("3000");
    TestCallback cbk = new TestCallback();
    createSessionCall.invoke(cbk, 10000);

    createSessionCall = new SCMPClnCreateSessionCall(this.requester, TestConstants.sesServerName1);
    createSessionCall.setSessionInfo(TestConstants.sleepCmd);
    createSessionCall.setEchoIntervalSeconds(10);
    createSessionCall.setRequestBody("3000");
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.