Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCPublishServer


   */
  @Test
  public void t299_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    SCPublishServer publishServer1 = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer1);
    publishServer1.register(1, 1, cbk);
    Assert.assertEquals("SessionServer is not registered", true, publishServer1.isRegistered());
   
    SCPublishServer publishServer2 = server.newPublishServer(TestConstants.pubServiceName2);
    publishServer2.register(1, 1, cbk);
    Assert.assertEquals("SessionServer is not registered", true, publishServer2.isRegistered());
   
    publishServer1.deregister();
    publishServer2.deregister();
  }
View Full Code Here


      sc.setImmediateConnect(true);
      sc.startListener();

      String[] serviceNames = this.serviceNames.split(",");
      for (String serviceName : serviceNames) {
        SCPublishServer server = sc.newPublishServer(serviceName);
        SCPublishServerCallback cbk = new SrvCallback(server);
        try {
          server.register(10, this.maxSessions, this.maxConnections, cbk);
        } catch (Exception e) {
          LOGGER.error("runPublishServer", 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.SCPublishServer

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.