Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCSessionServer$SCServerCallback


   */
  @Test
  public void t299_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 cbk = new SesSrvCallback(sessionServer1);
    sessionServer1.register(1, 1, cbk);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer1.isRegistered());
   
    SCSessionServer sessionServer2 = server.newSessionServer(TestConstants.sesServiceName2);
    sessionServer2.register(1, 1, cbk);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer2.isRegistered());
   
    sessionServer1.deregister();
    sessionServer2.deregister();
  }
View Full Code Here


      sc.setImmediateConnect(true);
      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();
        }
      }
      FileCtx fileCtx = FileUtility.createPIDfileAndLock(FileUtility.getLogPath() + fs + this.serverName + ".pid");
      // add exit handler
      try {
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.srv.SCSessionServer$SCServerCallback

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.