Package org.serviceconnector.api.cln

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


    msgCallback1 = new MsgCallback(sessionService1);
    response = sessionService1.createSession(request, msgCallback1);

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


    msgCallback1 = new MsgCallback(sessionService1);
    response = sessionService1.createSession(request, msgCallback1);

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

   *             the exception
   */
  @Test
  public void t50_enable_disable_command() throws Exception {
    SCMgmtClient client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    try {
      SCConsole.main(new String[] { "-h", TestConstants.HOST, "-p", String.valueOf(TestConstants.PORT_SC0_TCP),
          Constants.CC_CMD_DISABLE + "?serviceName=" + TestConstants.sesServiceName1 });
    } catch (ExitException e) {
      Assert.assertEquals(0, e.status);
View Full Code Here

   *             the exception
   */
  @Test
  public void t51_enable_disable_wildCard_command() throws Exception {
    SCMgmtClient client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    try {
      SCConsole.main(new String[] { "-h", TestConstants.HOST, "-p", String.valueOf(TestConstants.PORT_SC0_TCP),
          Constants.CC_CMD_DISABLE + "?serviceName=.*" });
    } catch (ExitException e) {
      Assert.assertEquals(0, e.status);
View Full Code Here

      urlRequestString.parseRequestURLString(bodyString);
      String callKey = urlRequestString.getCallKey();
      String serviceName = urlRequestString.getParamValue("serviceName");

      SCMgmtClient client = new SCMgmtClient(host, port, ConnectionType.NETTY_TCP);
      client.attach();

      if (callKey.equalsIgnoreCase(Constants.CC_CMD_KILL)) {
        client.killSC();
        System.out.println("SC exit requested");
      } else if (callKey.equalsIgnoreCase(Constants.CC_CMD_DUMP)) {
View Full Code Here

    demoPublishClient.run();
    // demoFileClient.start();
    // sleep to assure deregister from server to SC is done!
    Thread.sleep(500);
    SCMgmtClient client = new SCMgmtClient("localhost", 9000, ConnectionType.NETTY_TCP);
    client.attach();
    client.killSC();
  }
}
View Full Code Here

   */
  @Test(expected = SCMPValidatorException.class)
  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;
View Full Code Here

    response = sessionService1.createSession(request, msgCallback1);
    Assert.assertNotNull("the session ID is null", sessionService1.getSessionId());

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

    // delete session
    sessionService1.deleteSession();
View Full Code Here

    msgCallback1 = new MsgCallback(sessionService1);
    response = sessionService1.createSession(request, msgCallback1);

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

    msgCallback1 = new MsgCallback(sessionService1);
    response = sessionService1.createSession(request, msgCallback1);

    // 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);
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.