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); }
transport.setEmitFlowEventOnSend(false); if (idleTimeout > 0) { transport.setIdleTimeout(idleTimeout);
transport.setEmitFlowEventOnSend(false); if (idleTimeout > 0) { transport.setIdleTimeout(idleTimeout);
protonTransport.setIdleTimeout(idleTimeout); protonTransport.bind(protonConnection); protonConnection.collect(protonCollector);
protonTransport.setIdleTimeout(idleTimeout); protonTransport.bind(protonConnection); protonConnection.collect(protonCollector);
if (amqpTransport.isUseInactivityMonitor() && amqpWireFormat.getIdleTimeout() > 0) { LOG.trace("Connection requesting Idle timeout of: {} mills", amqpWireFormat.getIdleTimeout()); protonTransport.setIdleTimeout(amqpWireFormat.getIdleTimeout());
if (amqpTransport.isUseInactivityMonitor() && amqpWireFormat.getIdleTimeout() > 0) { LOG.trace("Connection requesting Idle timeout of: {} mills", amqpWireFormat.getIdleTimeout()); protonTransport.setIdleTimeout(amqpWireFormat.getIdleTimeout());
protonTransport.setIdleTimeout(getIdleTimeout());
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); }
ProtocolTracer protocolTracer = new EngineProtocolTracer(or.clientId); ((TransportImpl) transport).setProtocolTracer(protocolTracer); transport.setIdleTimeout(or.endpoint.getIdleTimeout()); transport.bind(protonConnection); Collector collector = Proton.collector();