Examples of newSessionService()


Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

      sc.setMaxConnections(20); // can be set before attach, default 100 Connections
      sc.setKeepAliveIntervalSeconds(10); // can be set before attach, default 0 -> inactive
      sc.attach(); // attaching client to SC , communication starts

      String serviceName = "session-1";
      service = sc.newSessionService(serviceName); // name of the service to use
      service.setEchoIntervalSeconds(10); // can be set before create session
      service.setEchoTimeoutSeconds(2); // can be set before create session

      SCMessage msg = new SCMessage();
      msg.setSessionInfo("session-info"); // optional
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

      sc.setMaxConnections(20); // can be set before attach
      sc.setKeepAliveIntervalSeconds(0); // can be set before attach
      sc.attach(); // regular

      String serviceName = "session-1";
      service = sc.newSessionService(serviceName); // regular, no other params possible
      service.setEchoIntervalSeconds(10); // can be set before create session
      service.setEchoTimeoutSeconds(2); // can be set before create session

      SCMessage msg = new SCMessage();
      msg.setSessionInfo("session-info"); // optional
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

      sc.setMaxConnections(100);

      // connects to SC, checks connection to SC
      sc.attach();

      SCSessionService sessionServiceA = sc.newSessionService("session-1");
      // creates a session
      SCMessage scMessage = new SCMessage();
      scMessage.setSessionInfo("sessionInfo");
      sessionServiceA.setEchoTimeoutSeconds(300);
      SCMessageCallback cbk = new ExampleCallback(sessionServiceA);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

      sc.setMaxConnections(100);

      // connects to SC, checks connection to SC
      sc.attach();

      SCSessionService sessionServiceA = sc.newSessionService("session-1");
      // creates a session
      SCMessage scMessage = new SCMessage();
      scMessage.setSessionInfo("sessionInfo");
      sessionServiceA.setEchoTimeoutSeconds(300);
      SCMessageCallback cbk = new ExampleCallback(sessionServiceA);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

      sc.setMaxConnections(100);

      // connects to SC, checks connection to SC
      sc.attach();

      SCSessionService sessionServiceA = sc.newSessionService("session-1");
      // creates a session
      SCMessage scMessage = new SCMessage();
      scMessage.setSessionInfo("sessionInfo");
      sessionServiceA.setEchoTimeoutSeconds(300);
      SCMessageCallback cbk = new ExampleCallback(sessionServiceA);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

      sc.setMaxConnections(20); // can be set before attach, default 100 Connections
      sc.setKeepAliveIntervalSeconds(10); // can be set before attach, default 0 -> inactive
      sc.attach(); // attaching client to SC , communication starts

      String serviceName = "session-1";
      sessionSrv = sc.newSessionService(serviceName); // name of the service to use
      sessionSrv.setEchoIntervalSeconds(10); // can be set before create session
      sessionSrv.setEchoTimeoutSeconds(2); // can be set before create session

      SCMessage msg = new SCMessage();
      msg.setSessionInfo("session-info"); // optional
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

    this.sessionClient.detach();

    // 2: connect new client to SC0
    SCClient clientToSc0 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    clientToSc0.attach();
    SCSessionService sessionSrvToSC0 = clientToSc0.newSessionService(TestConstants.sesServiceName1);

    // 3: load data to cache (cid=700) on SC0
    SCMessage request = new SCMessage();
    request.setData("cacheFor1Hour_managedData");
    request.setCacheId("700");
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

    this.startSC0AAndServers();

    // 1: connect new client2 to top level (cascaded) SC
    SCClient client2 = new SCClient(TestConstants.HOST, sessionClient.getPort(), ConnectionType.NETTY_TCP);
    client2.attach();
    SCSessionService sessionService2 = client2.newSessionService(TestConstants.sesServiceName1);
    sessionService2.createSession(new SCMessage(), new SessionMsgCallback(sessionService2));

    // 2: load data to cache (cid=700) by client1
    SCMessage request = new SCMessage();
    request.setData("cacheFor1Hour_managedData");
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

    this.startSC0AAndServers();

    // 1: connect new client2 to top level (cascaded) SC
    SCClient client2 = new SCClient(TestConstants.HOST, sessionClient.getPort(), ConnectionType.NETTY_TCP);
    client2.attach();
    SCSessionService sessionService2 = client2.newSessionService(TestConstants.sesServiceName1);
    sessionService2.createSession(new SCMessage(), new SessionMsgCallback(sessionService2));

    // 2: load data to cache (cid=700) by client1
    SCMessage request = new SCMessage();
    request.setData("cacheFor1Hour_managedData");
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newSessionService()

  @Test
  public void t30_cc_2Clients1Cache() throws Exception {
    // 1: connect new client2 to top level (cascaded) SC
    SCClient client2 = new SCClient(TestConstants.HOST, sessionClient.getPort(), ConnectionType.NETTY_TCP);
    client2.attach();
    SCSessionService sessionService2 = client2.newSessionService(TestConstants.sesServiceName1);
    sessionService2.createSession(new SCMessage(), new SessionMsgCallback(sessionService2));

    // 2: load data to cache (cid=700) by client1
    SCMessage request = new SCMessage();
    request.setData("cacheFor1Hour_managedData");
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.