Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCSessionServerCallback


    DemoSessionServer sessionServer = new DemoLargeSessionServer();
    sessionServer.run();
  }

  public SCSessionServerCallback newSrvCallback(SCSessionServer server) {
    SCSessionServerCallback cbk = new SrvLargeCallback(server);
    return cbk;
  }
View Full Code Here


    DemoSessionServer sessionServer = new DemoSessionServer();
    sessionServer.run();
  }

  public SCSessionServerCallback newSrvCallback(SCSessionServer server) {
    SCSessionServerCallback cbk = new SrvCallback(server);
    return cbk;
  }
View Full Code Here

      String serviceName = "session-1";
      SCSessionServer server = sc.newSessionServer(serviceName); // no other params possible
      int maxSess = 100;
      int maxConn = 10;
      SCSessionServerCallback cbk = newSrvCallback(server);
      try {
        server.register(maxSess, maxConn, cbk); // regular
        // server.registerServer(10, maxSess, maxConn, cbk); //
        // alternative with operation timeout
      } catch (Exception e) {
View Full Code Here

    DemoCCServer sessionServer = new DemoCCServer();
    sessionServer.run();
  }

  public SCSessionServerCallback newSessionSrvCallback(SCSessionServer server) {
    SCSessionServerCallback cbk = new SrvSessionCallback(server);
    return cbk;
  }
View Full Code Here

      String serviceName = "session-1";
      SCSessionServer server = sc.newSessionServer(serviceName); // no other params possible
      int maxSess = 100;
      int maxConn = 10;
      SCSessionServerCallback cbk = newSessionSrvCallback(server);
      try {
        server.register(maxSess, maxConn, cbk); // regular
        // server.registerServer(10, maxSess, maxConn, cbk); //
        // alternative with operation timeout
      } catch (Exception e) {
View Full Code Here

      sc.startListener();

      String[] serviceNames = this.serviceNames.split(",");
      for (String serviceName : serviceNames) {
        SCSessionServer server = sc.newSessionServer(serviceName);
        SCSessionServerCallback cbk = new SrvCallback(server);
        try {
          server.register(10, this.maxSessions, this.maxConnections, cbk);
        } catch (Exception e) {
          LOGGER.error("runSessionServer", e);
          server.deregister();
View Full Code Here

  @Test (expected = SCServiceException.class)
  public void t101_register() throws Exception {
    server = new SCServer(TestConstants.HOST, 9002, TestConstants.PORT_SES_SRV_TCP, ConnectionType.NETTY_TCP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here

  @Test (expected = SCServiceException.class)
  public void t103_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP, ConnectionType.NETTY_TCP);
    server.startListener();
    sessionServer = server.newSessionServer("");
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here

  @Test (expected = SCServiceException.class)
  public void t104_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP, ConnectionType.NETTY_TCP);
    server.startListener();
    sessionServer = server.newSessionServer(" ");
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here

  @Test (expected = SCServiceException.class)
  public void t105_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP, ConnectionType.NETTY_TCP);
    server.startListener();
    sessionServer = server.newSessionServer("gaga");
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.srv.SCSessionServerCallback

Copyright © 2018 www.massapicom. 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.