Package org.serviceconnector.api.cln

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


    SCSessionService service = null;

    try {
      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
View Full Code Here


    SCClient sc = new SCClient("localhost", 7000, ConnectionType.NETTY_HTTP);

    try {
      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

      SCFileService service = sc.newFileService("file-1"); // name of the service to use

      List<String> fileNameList = service.listFiles();
      for (String fileName : fileNameList) {
View Full Code Here

    sc = new SCClient("localhost", 7000, ConnectionType.NETTY_HTTP); // alternative with connection type
    SCSessionService service = null;
    try {
      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
View Full Code Here

    try {
      sc = new SCClient("localhost", 7000);
      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");
View Full Code Here

    try {
      sc = new SCClient("localhost", 7000, ConnectionType.NETTY_HTTP);
      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");
View Full Code Here

    SCPublishService service = null;

    try {
      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 = "publish-1";
      service = sc.newPublishService(serviceName); // name of the service to use

      DemoPublishClientCallback cbk = new DemoPublishClientCallback(service); // callback on service!!
View Full Code Here

    try {
      sc = new SCClient("localhost", 7000);
      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");
View Full Code Here

        for (String networkInterface : networkInterfaces) {
          String host = networkInterface;
          int port = myLocalListenerConfiguration.getPort();
          try {
            SCClient localClient = new SCClient(host, port, ConnectionType.NETTY_TCP);
            localClient.attach();
            return localClient;
          } catch (Exception e) {
            LOGGER.warn("upload current log files, connect to network interface " + host + " failed. " + e.toString());
          }
        }
View Full Code Here

        for (String networkInterface : networkInterfaces) {
          String host = networkInterface;
          int port = myLocalListenerConfiguration.getPort();
          try {
            SCClient localClient = new SCClient(host, port, ConnectionType.NETTY_HTTP);
            localClient.attach();
            return localClient;
          } catch (Exception e) {
            LOGGER.warn("upload current log files, connect to network interface " + host + " and port " + port
                + " failed. " + e.toString());
          }
View Full Code Here

      String host = cascadedSC.getHost();
      int port = cascadedSC.getPortNr();
      String connectionType = cascadedSC.getConnectionType();
      try {
        SCClient localClient = new SCClient(host, port, ConnectionType.getType(connectionType));
        localClient.attach();
        return localClient;
      } catch (Exception e) {
        LOGGER.warn("upload current log files, connect to network interface " + host + " and port " + port + " failed. "
            + e.toString());
      }
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.