Package org.serviceconnector.call

Examples of org.serviceconnector.call.SCMPManageCall


   * @throws SCServiceException
   *             manage call to SC failed<br />
   *             error message received from SC<br />
   */
  private String manageCall(int operationTimeoutSeconds, String instruction) throws SCServiceException {
    SCMPManageCall manageCall = new SCMPManageCall(this.requester);
    SCServiceCallback callback = new SCServiceCallback(true);
    try {
      manageCall.setRequestBody(instruction);
      manageCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
    } catch (Exception e) {
      this.requester.destroy();
      throw new SCServiceException(instruction + " SC failed.", e);
    }
    if (instruction.equalsIgnoreCase(Constants.CC_CMD_KILL)) {
View Full Code Here


   * Description: Manage call - disable/enable service<br>
   * Expectation: passes
   */
  @Test
  public void t01_ManageCallDisableEnableService() throws Exception {
    SCMPManageCall manageCall = new SCMPManageCall(this.requester);
    TestCallback cbk = new TestCallback();

    // disable service
    manageCall.setRequestBody(Constants.CC_CMD_DISABLE + Constants.QUESTION_MARK + Constants.SERVICE_NAME
        + Constants.EQUAL_SIGN + TestConstants.sesServerName1);
    manageCall.invoke(cbk, 1000);
    SCMPMessage result = cbk.getMessageSync(3000);
    TestUtil.checkReply(result);
    // try to create a session on disabled service - should fail
    SCMPMessage fault = this.clnCreateSession();
    TestUtil.verifyError(fault, SCMPError.SERVICE_DISABLED, SCMPMsgType.CLN_CREATE_SESSION);

    // enable service
    manageCall.setRequestBody(Constants.CC_CMD_ENABLE + Constants.QUESTION_MARK + Constants.SERVICE_NAME + Constants.EQUAL_SIGN
        + TestConstants.sesServerName1);
    manageCall.invoke(cbk, 1000);
    result = cbk.getMessageSync(3000);
    TestUtil.checkReply(result);
  }
View Full Code Here

   * Description: Manage call - disable service verify by inspect call<br>
   * Expectation: passes
   */
  @Test
  public void t02_ManageCallDisableServiceVerifyByInspect() throws Exception {
    SCMPManageCall manageCall = new SCMPManageCall(this.requester);
    TestCallback cbk = new TestCallback();

    // disable service
    manageCall.setRequestBody(Constants.CC_CMD_DISABLE + Constants.QUESTION_MARK + Constants.SERVICE_NAME
        + Constants.EQUAL_SIGN + TestConstants.sesServerName1);
    manageCall.invoke(cbk, 1000);
    SCMPMessage result = cbk.getMessageSync(3000);
    TestUtil.checkReply(result);

    // state of enableService
    SCMPInspectCall inspectCall = new SCMPInspectCall(this.requester);
View Full Code Here

TOP

Related Classes of org.serviceconnector.call.SCMPManageCall

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.