Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCServer


   * Description:  register session server with 10 sessions and 10 connections<br>
   * Expectation:  passes
   */
  @Test
  public void t208_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.register(10, 10, cbk);
    Assert.assertEquals("SessionServer is not registered", true, publishServer.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 t209_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.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 t210_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.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 t211_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.register(0, 1, cbk);
  }
View Full Code Here

   * Description:  register session server with 1 session and 0 connection<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t212_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.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 t213_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.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 t214_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.register(1, 1, cbk);
    publishServer.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 t215_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.register(1, 1, cbk);
    server.startListener();
  }
View Full Code Here

   * Description:  register two session servers to two services with two callbacks<br>
   * Expectation:  passes
   */
  @Test
  public void t298_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 cbk1 = new PubSrvCallback(publishServer1);
    publishServer1.register(1, 1, cbk1);
    Assert.assertEquals("SessionServer is not registered", true, publishServer1.isRegistered());
View Full Code Here

   * Description:  register two session servers to two services with same callback<br>
   * Expectation:  passes
   */
  @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());
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.