Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCServer


   * 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_PUB_SRV_TCP, ConnectionType.NETTY_TCP);
    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 t198_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_PUB_SRV_TCP, ConnectionType.NETTY_TCP);
    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 t199_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_PUB_SRV_TCP, ConnectionType.NETTY_TCP);
    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

   * 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_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(TestConstants.pubServiceName1);
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.register(1, 1, cbk);
  }
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_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer(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_PUB_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    publishServer = server.newPublishServer("");
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.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 t204_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(" ");
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.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 t205_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("gaga");
    SCPublishServerCallback cbk = new PubSrvCallback(publishServer);
    publishServer.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 t206_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 = null;
    publishServer.register(1, 1, cbk);
  }
View Full Code Here

   * Description:  register session server with 1 session and 1 connection<br>
   * Expectation:  passes
   */
  @Test
  public void t207_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);
    Assert.assertEquals("SessionServer is not registered", true, publishServer.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.