Package org.serviceconnector.net.connection

Examples of org.serviceconnector.net.connection.ConnectionContext


  /** {@inheritDoc} */
  @Override
  public void send(SCMPMessage message, int timeoutMillis, ISCMPMessageCallback callback) throws Exception {
    // return an already connected live instance
    IConnection connection = this.connectionPool.getConnection();
    ConnectionContext connectionContext = connection.getContext();
    try {
      ISCMPMessageCallback requesterCallback = new RequesterSCMPCallback(callback, connectionContext);
      // setting up operation timeout after successful send
      TimeoutWrapper timeoutWrapper = new TimeoutWrapper((ITimeout) requesterCallback);
      RequesterSCMPCallback reqCallback = (RequesterSCMPCallback) requesterCallback;
View Full Code Here


  @SuppressWarnings("unchecked")
  @Override
  public void send(SCMPMessage message, int timeoutMillis, ISCMPMessageCallback scmpCallback) throws Exception {
    // return an already connected live instance
    IConnection connection = this.connectionPool.getConnection();
    ConnectionContext connectionContext = connection.getContext();

    try {
      ISCMPMessageCallback requesterCallback = null;
      // differ if message is large or not, sending procedure is different
      if (message.isLargeMessage()) {
View Full Code Here

            this.writeBean(writer, connectionPool);
            writer.writeEndElement();
            continue;
          }
          if (value instanceof ConnectionContext) {
            ConnectionContext connectionContext = (ConnectionContext) value;
            writer.writeStartElement("connectionContext");
            this.writeBean(writer, connectionContext);
            writer.writeEndElement();
            continue;
          }
View Full Code Here

    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);
    connection.setContext(connectionContext);
    String ldt = DateTimeUtility.getCurrentTimeZoneMillis();

    SCMPMessage message = new SCMPMessage(SCMPVersion.CURRENT);
    message.setMessageType(SCMPMsgType.ATTACH);
View Full Code Here

    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);
    connection.setContext(connectionContext);
    String ldt = DateTimeUtility.getCurrentTimeZoneMillis();

    SCMPMessage message = new SCMPMessage(SCMPVersion.CURRENT);
    message.setMessageType(SCMPMsgType.ATTACH);
View Full Code Here

      connections[i] = connection;
      connection.setHost(TestConstants.HOST);
      connection.setPort(TestConstants.PORT_SC0_HTTP);
      connection.setIdleTimeoutSeconds(0);
      IIdleConnectionCallback idleCallback = new IdleCallback();
      ConnectionContext connectionContext = new ConnectionContext(connection, idleCallback, 0);
      connection.setContext(connectionContext);
      connection.connect();
      TestCallback cbk = new TestCallback();
      connection.send(message, cbk);
      TestUtil.checkReply(cbk.getMessageSync(3000));
View Full Code Here

            this.writeBean(writer, connectionPool);
            writer.writeEndElement();
            continue;
          }
          if (value instanceof ConnectionContext) {
            ConnectionContext connectionContext = (ConnectionContext) value;
            writer.writeStartElement("connectionContext");
            this.writeBean(writer, connectionContext);
            writer.writeEndElement();
            continue;
          }
View Full Code Here

    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);
    connection.setContext(connectionContext);
    String ldt = DateTimeUtility.getCurrentTimeZoneMillis();

    SCMPMessage message = new SCMPMessage();
    message.setMessageType(SCMPMsgType.ATTACH);
View Full Code Here

    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);
    connection.setContext(connectionContext);
    String ldt = DateTimeUtility.getCurrentTimeZoneMillis();

    SCMPMessage message = new SCMPMessage();
    message.setMessageType(SCMPMsgType.ATTACH);
View Full Code Here

      connections[i] = connection;
      connection.setHost(TestConstants.HOST);
      connection.setPort(TestConstants.PORT_SC0_HTTP);
      connection.setIdleTimeoutSeconds(0);
      IIdleConnectionCallback idleCallback = new IdleCallback();
      ConnectionContext connectionContext = new ConnectionContext(connection, idleCallback, 0);
      connection.setContext(connectionContext);
      connection.connect();
      TestCallback cbk = new TestCallback();
      connection.send(message, cbk);
      TestUtil.checkReply(cbk.getMessageSync(3000));
View Full Code Here

TOP

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

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.