Package org.serviceconnector.net.connection

Examples of org.serviceconnector.net.connection.ConnectionFactory


   * Description: connect, send 50000 message and disconnect<br>
   * Expectation: passes
   */
  @Test
  public void t01_Send50000() throws Exception {
    ConnectionFactory connectionFactory = AppContext.getConnectionFactory();
    IConnection connection = connectionFactory.createConnection(ConnectionType.NETTY_HTTP.getValue());
    connection.setHost(TestConstants.HOST);
    connection.setPort(TestConstants.PORT_SC0_HTTP);
    connection.setIdleTimeoutSeconds(0); // idle timeout inactive
    IIdleConnectionCallback idleCallback = new IdleCallback();
    ConnectionContext connectionContext = new ConnectionContext(connection, idleCallback, 0);
View Full Code Here


   * Description: connect, send message and disconnect - 50'000 times the same connection<br>
   * Expectation: passes
   */
  @Test
  public void t01_ConnectSendAndDisconnect50000() throws Exception {
    ConnectionFactory connectionFactory = AppContext.getConnectionFactory();
    IConnection connection = connectionFactory.createConnection(ConnectionType.NETTY_HTTP.getValue());
    connection.setHost(TestConstants.HOST);
    connection.setPort(TestConstants.PORT_SC0_HTTP);
    connection.setIdleTimeoutSeconds(0); // idle timeout inactive
    IIdleConnectionCallback idleCallback = new IdleCallback();
    ConnectionContext connectionContext = new ConnectionContext(connection, idleCallback, 0);
View Full Code Here

    message.setMessageType(SCMPMsgType.ATTACH);
    message.setHeader(SCMPHeaderAttributeKey.SC_VERSION, SCVersion.CURRENT.toString());
    message.setHeader(SCMPHeaderAttributeKey.LOCAL_DATE_TIME, ldt);

    for (int i = 0; i < numberOfConnections; i++) {
      ConnectionFactory connectionFactory = AppContext.getConnectionFactory();
      IConnection connection = connectionFactory.createConnection(ConnectionType.NETTY_HTTP.getValue());
      connections[i] = connection;
      connection.setHost(TestConstants.HOST);
      connection.setPort(TestConstants.PORT_SC0_HTTP);
      connection.setIdleTimeoutSeconds(0);
      IIdleConnectionCallback idleCallback = new IdleCallback();
View Full Code Here

   * Description: connect, send 50000 message and disconnect<br>
   * Expectation: passes
   */
  @Test
  public void t01_Send50000() throws Exception {
    ConnectionFactory connectionFactory = AppContext.getConnectionFactory();
    IConnection connection = connectionFactory.createConnection(ConnectionType.NETTY_HTTP.getValue());
    connection.setHost(TestConstants.HOST);
    connection.setPort(TestConstants.PORT_SC0_HTTP);
    connection.setIdleTimeoutSeconds(0); // idle timeout inactive
    IIdleConnectionCallback idleCallback = new IdleCallback();
    ConnectionContext connectionContext = new ConnectionContext(connection, idleCallback, 0);
View Full Code Here

   * Description: connect, send message and disconnect - 50'000 times the same connection<br>
   * Expectation: passes
   */
  @Test
  public void t01_ConnectSendAndDisconnect50000() throws Exception {
    ConnectionFactory connectionFactory = AppContext.getConnectionFactory();
    IConnection connection = connectionFactory.createConnection(ConnectionType.NETTY_HTTP.getValue());
    connection.setHost(TestConstants.HOST);
    connection.setPort(TestConstants.PORT_SC0_HTTP);
    connection.setIdleTimeoutSeconds(0); // idle timeout inactive
    IIdleConnectionCallback idleCallback = new IdleCallback();
    ConnectionContext connectionContext = new ConnectionContext(connection, idleCallback, 0);
View Full Code Here

    message.setMessageType(SCMPMsgType.ATTACH);
    message.setHeader(SCMPHeaderAttributeKey.SC_VERSION, SCVersion.CURRENT.toString());
    message.setHeader(SCMPHeaderAttributeKey.LOCAL_DATE_TIME, ldt);

    for (int i = 0; i < numberOfConnections; i++) {
      ConnectionFactory connectionFactory = AppContext.getConnectionFactory();
      IConnection connection = connectionFactory.createConnection(ConnectionType.NETTY_HTTP.getValue());
      connections[i] = connection;
      connection.setHost(TestConstants.HOST);
      connection.setPort(TestConstants.PORT_SC0_HTTP);
      connection.setIdleTimeoutSeconds(0);
      IIdleConnectionCallback idleCallback = new IdleCallback();
View Full Code Here

TOP

Related Classes of org.serviceconnector.net.connection.ConnectionFactory

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.