Package org.serviceconnector.api.cln

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


    subMsgRequest.setNoDataIntervalSeconds(100);
    msgCallback = new MsgCallback(publishService);

    // 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


    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);

    // 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

    Assert.assertEquals("message body is not the same length", subMsgRequest.getDataLength(), subMsgResponse.getDataLength());
    Assert.assertEquals("compression is not the same", subMsgRequest.isCompressed(), subMsgResponse.isCompressed());

    // 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);
View Full Code Here

      if (FileUtility.exists(scProcess.getPidFileName())) {
        // file exists
        if (FileUtility.isFileLocked(scProcess.getPidFileName())) {
          // file is locked - SC is running
          SCMgmtClient client = new SCMgmtClient(TestConstants.HOST, scProcess.getSCPort(), ConnectionType.NETTY_TCP);
          client.attach(timeout);
          client.killSC();
        }
        FileUtility.waitNotExistsOrUnlocked(scProcess.getPidFileName(), timeout);
      }
      testLogger.info(scProcess.getProcessName() + " stopped");
View Full Code Here

    int timeout = 15; // seconds
    try {
      if (FileUtility.exists(srvProcess.getPidFileName())) {
        SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, srvProcess.getSCPort(),
            srvProcess.getConnectionType());
        clientMgmt.attach(timeout);
        String serviceName = srvProcess.getServiceNames().split(",")[0];
        clientMgmt.enableService(serviceName); // service might be disabled during tests
        if (srvProcess.getCommunicatorType() == TestConstants.COMMUNICATOR_TYPE_SESSION) {
          // Create session with KILL command
          SCSessionService scSessionService = clientMgmt.newSessionService(serviceName);
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.