Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCServer


   * Description:  register session server with no service name<br>
   * Expectation:  throws SCMPValidatorException
   */
  @Test (expected = SCMPValidatorException.class)
  public void t102_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(null);
  }
View Full Code Here


   * Description:  register session server with service name = ""<br>
   * Expectation:  throws SCServiceException
   */
  @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

   * Description:  register session server with service name = " "<br>
   * Expectation:  throws SCServiceException
   */
  @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

   * Description:  register session server with service name = "gaga"<br>
   * Expectation:  throws SCServiceException
   */
  @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

   * Description:  register session server with callback = null<br>
   * Expectation:  throws SCMPValidatorException
   */
  @Test (expected = SCMPValidatorException.class)
  public void t106_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(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = null;
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here

   * Description:  register session server with 1 session and 1 connection<br>
   * Expectation:  passes
   */
  @Test
  public void t107_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(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer.isRegistered());
View Full Code Here

   * Description:  register session server with 10 sessions and 10 connections<br>
   * Expectation:  passes
   */
  @Test
  public void t108_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(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(10, 10, cbk);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer.isRegistered());
View Full Code Here

   * Description:  register session server with 1 session and 10 connections<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t109_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(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 10, cbk);
  }
View Full Code Here

   * Description:  register session server with 10 session and 20 connections<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t110_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(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(10, 20, cbk);
  }
View Full Code Here

   * Description:  register session server with 0 session and 1 connection<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t111_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(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(0, 1, cbk);
  }
View Full Code Here

TOP

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

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.