Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCServer


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


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

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

   * Description:  register session server before listener is started<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t115_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP, ConnectionType.NETTY_TCP);
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
    server.startListener();
  }
View Full Code Here

   * Description:  register /de-register session server with 1 session and 1 connection 1000 times<br>
   * Expectation:  passes
   */
  @Test
  public void t116_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);
    int nr = 1000;
    int sleep = 0;
View Full Code Here

   * Description:  register two session servers to two services with two callbacks<br>
   * Expectation:  passes
   */
  @Test
  public void t198_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP, ConnectionType.NETTY_TCP);
    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());
View Full Code Here

   * Description:  register two session servers to two services with same callback<br>
   * Expectation:  passes
   */
  @Test
  public void t199_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP, ConnectionType.NETTY_TCP);
    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());
View Full Code Here

   * Description:  register session server on port  SC is not listening<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t201_register() throws Exception {
    server = new SCServer(TestConstants.HOST, 9002, 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);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer.isRegistered());
View Full Code Here

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

   * Description:  register session server with service name = ""<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t203_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("");
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 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.