Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCSessionServerCallback


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


  @Test (expected = SCServiceException.class)
  public void t210_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(10, 20, cbk);
  }
View Full Code Here

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

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

  @Test (expected = SCServiceException.class)
  public void t213_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(0, 0, cbk);
  }
View Full Code Here

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

   */
  @Test (expected = SCServiceException.class)
  public void t215_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
    server.startListener();
  }
View Full Code Here

  @Test
  public void t216_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    int nr = 1000;
    int sleep = 0;
    for (int i = 0; i < nr; i++) {
      if (((i+1) % 100) == 0) testLogger.info("Register/deregister nr. " + (i+1) + "...");
      sessionServer.register(1, 1, cbk);
View Full Code Here

  @Test
  public void t298_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    SCSessionServer sessionServer1 = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk1 = new SesSrvCallback(sessionServer1);
    sessionServer1.register(1, 1, cbk1);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer1.isRegistered());
   
    SCSessionServer sessionServer2 = server.newSessionServer(TestConstants.sesServiceName2);
    SCSessionServerCallback cbk2 = new SesSrvCallback(sessionServer2);
    sessionServer2.register(1, 1, cbk2);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer2.isRegistered());
   
    sessionServer1.deregister();
    sessionServer2.deregister();
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

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.