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

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

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

Transport.bind介绍

暂无

代码示例

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

public void setConnection(Connection connection)
{
  _connection = connection;
  _transport.bind(_connection);
}

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

public ProtonHandlerImpl(Executor dispatchExecutor) {
 this.dispatchExecutor = dispatchExecutor;
 this.creationTime = System.currentTimeMillis();
 transport.bind(connection);
 connection.collect(collector);
}

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

public ProtonHandler(Executor flushExecutor, boolean isServer) {
 this.flushExecutor = flushExecutor;
 this.readyListener = () -> this.flushExecutor.execute(() -> {
   flush();
 });
 this.creationTime = System.currentTimeMillis();
 this.isServer = isServer;
 try {
   ((TransportInternal) transport).setUseReadOnlyOutputBuffer(false);
 } catch (NoSuchMethodError nsme) {
   // using a version at runtime where the optimization isn't available, ignore
   log.trace("Proton output buffer optimisation unavailable");
 }
 transport.bind(connection);
 connection.collect(collector);
}

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

public ProtonHandler(EventLoop workerExecutor, ArtemisExecutor poolExecutor, boolean isServer) {
 this.workerExecutor = workerExecutor;
 this.poolExecutor = poolExecutor;
 this.readyListener = () -> runLater(this::flush);
 this.creationTime = System.currentTimeMillis();
 this.isServer = isServer;
 try {
   ((TransportInternal) transport).setUseReadOnlyOutputBuffer(false);
 } catch (NoSuchMethodError nsme) {
   // using a version at runtime where the optimization isn't available, ignore
   log.trace("Proton output buffer optimisation unavailable");
 }
 transport.bind(connection);
 connection.collect(collector);
}

代码示例来源: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: EnMasseProject/enmasse

transport.bind(connection);
Sasl sasl = transport.sasl();
sasl.client();

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

private void handleOpen(Event event) {
  Connection connection = event.getConnection();
  if (connection.getRemoteState() != EndpointState.UNINITIALIZED) {
    return;
  }
  Transport transport = Proton.transport();
  Sasl sasl = transport.sasl();
  sasl.client();
  sasl.setMechanisms("ANONYMOUS");
  transport.webSocket();
  transport.bind(connection);
}

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

@Override
  public void run(Selectable selectable) {
    Reactor reactor = selectable.getReactor();
    try {
      SocketChannel socketChannel = ((ServerSocketChannel)selectable.getChannel()).accept();
      if (socketChannel == null) {
        throw new ReactorInternalException("Selectable readable, but no socket to accept");
      }
      Handler handler = BaseHandler.getHandler(AcceptorImpl.this);
      if (handler == null) {
        handler = reactor.getHandler();
      }
      Connection conn = reactor.connection(handler);
      Transport trans = Proton.transport();
      Sasl sasl = trans.sasl();
      sasl.server();
      sasl.setMechanisms("ANONYMOUS");
      sasl.done(SaslOutcome.PN_SASL_OK);
      trans.bind(conn);
      IOHandler.selectableTransport(reactor, socketChannel.socket(), trans);
    } catch(IOException ioException) {
      sel.error();
    }
  }
}

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

protonTransport.bind(protonConnection);
protonConnection.collect(protonCollector);

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

protonTransport.bind(protonConnection);
protonConnection.collect(protonCollector);

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

protonTransport.setChannelMax(getChannelMax());
protonTransport.setEmitFlowEventOnSend(false);
protonTransport.bind(getEndpoint());
Sasl sasl = protonTransport.sasl();
if (sasl != null) {

代码示例来源:origin: org.apache.qpid/proton-j

sasl.done(SaslOutcome.PN_SASL_OK);
  trans.bind(conn);
  IOHandler.selectableTransport(reactor, socketChannel.socket(), trans);
} catch(IOException ioException) {

代码示例来源: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);
}

代码示例来源:origin: org.apache.qpid/proton-j

transport.bind(connection);

代码示例来源:origin: com.ibm.mqlight/mqlight-api

((TransportImpl) transport).setProtocolTracer(protocolTracer);
transport.setIdleTimeout(or.endpoint.getIdleTimeout());
transport.bind(protonConnection);
Collector collector = Proton.collector();
protonConnection.setContainer(or.clientId);

相关文章