org.apache.qpid.proton.engine.Transport.setEmitFlowEventOnSend()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中org.apache.qpid.proton.engine.Transport.setEmitFlowEventOnSend()方法的一些代码示例,展示了Transport.setEmitFlowEventOnSend()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transport.setEmitFlowEventOnSend()方法的具体详情如下:
包路径:org.apache.qpid.proton.engine.Transport
类名称:Transport
方法名:setEmitFlowEventOnSend

Transport.setEmitFlowEventOnSend介绍

[英]Configure whether a synthetic Flow event should be emitted when messages are sent, reflecting a change in the credit level on the link that may prompt other action. Defaults to true.
[中]配置在发送消息时是否应发出合成流事件,以反映可能提示其他操作的链接上信用级别的变化。默认为true。

代码示例

代码示例来源:origin: Azure/azure-service-bus-java

@Override
public void onConnectionLocalOpen(Event event)
{
  Connection connection = event.getConnection();
  if (connection.getRemoteState() != EndpointState.UNINITIALIZED)
  {
    return;
  }
  Transport transport = Proton.transport();
  transport.sasl();
  transport.setEmitFlowEventOnSend(false);
  transport.bind(connection);
}

代码示例来源:origin: org.apache.activemq/artemis-proton-plug

public AbstractConnectionContext(AMQPConnectionCallback connectionCallback,
                String containerId,
                int idleTimeout,
                int maxFrameSize,
                int channelMax,
                Executor dispatchExecutor,
                ScheduledExecutorService scheduledPool) {
 this.connectionCallback = connectionCallback;
 this.containerId = (containerId != null) ? containerId : UUID.randomUUID().toString();
 connectionProperties.put(Symbol.valueOf("product"), "apache-activemq-artemis");
 connectionProperties.put(Symbol.valueOf("version"), VersionLoader.getVersion().getFullVersion());
 this.scheduledPool = scheduledPool;
 connectionCallback.setConnection(this);
 this.handler =   ProtonHandler.Factory.create(dispatchExecutor);
 Transport transport = handler.getTransport();
 transport.setEmitFlowEventOnSend(false);
 if (idleTimeout > 0) {
   transport.setIdleTimeout(idleTimeout);
 }
 transport.setChannelMax(channelMax);
 transport.setMaxFrameSize(maxFrameSize);
 handler.addEventHandler(listener);
}

代码示例来源:origin: org.apache.activemq/artemis-amqp-protocol

handler.addEventHandler(this);
Transport transport = handler.getTransport();
transport.setEmitFlowEventOnSend(false);
if (idleTimeout > 0) {
  transport.setIdleTimeout(idleTimeout);

代码示例来源:origin: apache/activemq-artemis

handler.addEventHandler(this);
Transport transport = handler.getTransport();
transport.setEmitFlowEventOnSend(false);
if (idleTimeout > 0) {
  transport.setIdleTimeout(idleTimeout);

代码示例来源:origin: apache/qpid-jms

this.connectionRequest = connectRequest;
protonTransport.setEmitFlowEventOnSend(false);

代码示例来源:origin: org.apache.qpid/qpid-jms-client

this.connectionRequest = connectRequest;
protonTransport.setEmitFlowEventOnSend(false);

代码示例来源:origin: apache/activemq-artemis

protonTransport.setEmitFlowEventOnSend(false);
protonTransport.bind(getEndpoint());
Sasl sasl = protonTransport.sasl();

代码示例来源:origin: org.apache.activemq/activemq-all

public AmqpConnection(AmqpTransport transport, BrokerService brokerService) {
  this.amqpTransport = transport;
  AmqpInactivityMonitor monitor = transport.getInactivityMonitor();
  if (monitor != null) {
    monitor.setAmqpTransport(amqpTransport);
  }
  this.amqpWireFormat = transport.getWireFormat();
  this.brokerService = brokerService;
  // the configured maxFrameSize on the URI.
  int maxFrameSize = amqpWireFormat.getMaxAmqpFrameSize();
  if (maxFrameSize > AmqpWireFormat.NO_AMQP_MAX_FRAME_SIZE) {
    this.protonTransport.setMaxFrameSize(maxFrameSize);
    try {
      this.protonTransport.setOutboundFrameSizeLimit(maxFrameSize);
    } catch (Throwable e) {
      // Ignore if older proton-j was injected.
    }
  }
  this.protonTransport.bind(this.protonConnection);
  this.protonTransport.setChannelMax(CHANNEL_MAX);
  this.protonTransport.setEmitFlowEventOnSend(false);
  this.protonConnection.collect(eventCollector);
  updateTracer();
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

public AmqpConnection(AmqpTransport transport, BrokerService brokerService) {
  this.amqpTransport = transport;
  AmqpInactivityMonitor monitor = transport.getInactivityMonitor();
  if (monitor != null) {
    monitor.setAmqpTransport(amqpTransport);
  }
  this.amqpWireFormat = transport.getWireFormat();
  this.brokerService = brokerService;
  // the configured maxFrameSize on the URI.
  int maxFrameSize = amqpWireFormat.getMaxAmqpFrameSize();
  if (maxFrameSize > AmqpWireFormat.NO_AMQP_MAX_FRAME_SIZE) {
    this.protonTransport.setMaxFrameSize(maxFrameSize);
    try {
      this.protonTransport.setOutboundFrameSizeLimit(maxFrameSize);
    } catch (Throwable e) {
      // Ignore if older proton-j was injected.
    }
  }
  this.protonTransport.bind(this.protonConnection);
  this.protonTransport.setChannelMax(CHANNEL_MAX);
  this.protonTransport.setEmitFlowEventOnSend(false);
  this.protonConnection.collect(eventCollector);
  updateTracer();
}

代码示例来源:origin: io.vertx/vertx-proton

ProtonTransport(Connection connection, Vertx vertx, NetClient netClient, NetSocket socket,
        ProtonSaslAuthenticator authenticator, ProtonTransportOptions options) {
 this.connection = connection;
 this.vertx = vertx;
 this.netClient = netClient;
 this.socket = socket;
 int maxFrameSize = options.getMaxFrameSize() == 0 ? DEFAULT_MAX_FRAME_SIZE : options.getMaxFrameSize();
 transport.setMaxFrameSize(maxFrameSize);
 transport.setOutboundFrameSizeLimit(maxFrameSize);
 transport.setEmitFlowEventOnSend(false); // TODO: make configurable
 transport.setIdleTimeout(2 * options.getHeartbeat());
 ((TransportInternal) transport).setUseReadOnlyOutputBuffer(false);
 if (authenticator != null) {
  authenticator.init(this.socket, (ProtonConnection) this.connection.getContext(), transport);
 }
 this.authenticator = authenticator;
 transport.bind(connection);
 connection.collect(collector);
 socket.endHandler(this::handleSocketEnd);
 socket.handler(this::handleSocketBuffer);
}

相关文章