Package org.serviceconnector.api.cln

Examples of org.serviceconnector.api.cln.SCMgmtClient.detach()


          System.out.println(scVersion);
        } catch (SCServiceException e) {
          System.out.println("Getting version (SC Version) of remote SC failed.");
          status = 4;
        }
        client.detach();
      } else if (callKey.equalsIgnoreCase(Constants.CC_CMD_SERVICE_CONF)) {
        try {
          Map<String, String> serviceConf = client.getServiceConfiguration(serviceName);
          System.out.println(serviceConf);
        } catch (SCServiceException e) {
View Full Code Here


          System.out.println(serviceConf);
        } catch (SCServiceException e) {
          System.out.println("Getting service [" + serviceName + "] configuration failed.");
          status = 4;
        }
        client.detach();
      } else {
        SCConsole.showError("Error - wrong call key in request string.");
        status = 3;
      }
    } catch (UnsupportedEncodingException e) {
View Full Code Here

  public void t83_disabledService() throws Exception {
    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.sesServiceName1);
    clientMgmt.detach();

    SCMessage request = null;
    SCMessage response = null;
    sessionService1 = client.newSessionService(TestConstants.sesServiceName1);
    msgCallback1 = new MsgCallback(sessionService1);
View Full Code Here

    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.sesServiceName1);
    clientMgmt.detach();

    // delete session
    sessionService1.deleteSession();
    Assert.assertNull("the session ID is NOT null after deleteSession()", sessionService1.getSessionId());
  }
View Full Code Here

    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.sesServiceName1);
    clientMgmt.detach();

    // execute
    request.setMessageInfo(TestConstants.echoCmd);
    response = sessionService1.execute(request);
    Assert.assertEquals("message body is not the same length", request.getDataLength(), response.getDataLength());
View Full Code Here

    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.sesServiceName1);
    clientMgmt.detach();

    // send
    request.setMessageInfo(TestConstants.echoCmd);
    sessionService1.send(request);
    msgCallback1.waitForMessage(10);
View Full Code Here

    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.pubServiceName1);
    clientMgmt.detach();

    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
  }

  /**
 
View Full Code Here

    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.pubServiceName1);
    clientMgmt.detach();

    publishService.unsubscribe();
    Assert.assertNull("the session ID is not null", publishService.getSessionId());
  }
View Full Code Here

    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.pubServiceName1);
    clientMgmt.detach();

    subMsgRequest.setMask(TestConstants.mask1);
    subMsgResponse = publishService.changeSubscription(subMsgRequest);
    Assert.assertNotNull("the session ID is null", publishService.getSessionId());
    Assert.assertEquals("message body is not the same length", subMsgRequest.getDataLength(), subMsgResponse.getDataLength());
View Full Code Here

          try {
            scPublishService.subscribe(scMessage, cbk);
          } catch (SCServiceException ex) {
          }
        }
        clientMgmt.detach();
        FileUtility.waitNotExistsOrUnlocked(srvProcess.getPidFileName(), timeout);
      }
      testLogger.info("Server " + srvProcess.getProcessName() + " stopped");
    } catch (Exception e) {
      testLogger.info(e.getMessage());
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.