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

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

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

Transport.close_tail介绍

暂无

代码示例

代码示例来源:origin: Azure/azure-iot-sdk-java

@Override
public void onConnectionRemoteClose(Event event)
{
  // Code_SRS_SERVICE_SDK_JAVA_AMQPSENDHANDLER_34_032: [This function shall close the transport tail]
  event.getTransport().close_tail();
}

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

_transport.close_tail();
  _inputDone = true;
} else if (bytesRead > 0) {

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

int bytesRead = _channel.read(tail);
if (bytesRead < 0) {
  _transport.close_tail();
  _inputDone = true;
} else if (bytesRead > 0) {

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

if (transport != null) {
  transport.setCondition(condition);
  transport.close_tail();
  transport.close_head();
  transport.pop(transport.pending());

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

if (transport != null) {
  transport.setCondition(condition);
  transport.close_tail();
  transport.close_head();
  transport.pop(Math.max(0, transport.pending())); // Force generation of TRANSPORT_HEAD_CLOSE (not in C code)

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

condition.setDescription(ioException.getMessage());
transport.setCondition(condition);
transport.close_tail();
transport.close_head();

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

condition.setDescription(exception.getMessage());
transport.setCondition(condition);
transport.close_tail();
transport.close_head();
transport.pop(Math.max(0, transport.pending())); // Force generation of TRANSPORT_HEAD_CLOSE (not in C code)

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

@Override
  public void run(Selectable selectable) {
    Reactor reactor = selectable.getReactor();
    Transport transport = ((SelectableImpl)selectable).getTransport();
    int capacity = transport.capacity();
    if (capacity > 0) {
      SocketChannel socketChannel = (SocketChannel)selectable.getChannel();
      try {
        int n = socketChannel.read(transport.tail());
        if (n == -1) {
          transport.close_tail();
        } else {
          transport.process();
        }
      } catch (IOException | TransportException e) {
        ErrorCondition condition = new ErrorCondition();
        condition.setCondition(Symbol.getSymbol("proton:io"));
        condition.setDescription(e.getMessage());
        transport.setCondition(condition);
        transport.close_tail();
      }
    }
    // (Comment from C code:) occasionally transport events aren't
    // generated when expected, so the following hack ensures we
    // always update the selector
    update(selectable);
    reactor.update(selectable);
  }
};

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

@Override
  public void run(Selectable selectable) {
    Reactor reactor = selectable.getReactor();
    Transport transport = ((SelectableImpl)selectable).getTransport();
    int capacity = transport.capacity();
    if (capacity > 0) {
      SocketChannel socketChannel = (SocketChannel)selectable.getChannel();
      try {
        int n = socketChannel.read(transport.tail());
        if (n == -1) {
          transport.close_tail();
        } else {
          transport.process();
        }
      } catch (IOException e) {
        ErrorCondition condition = new ErrorCondition();
        condition.setCondition(Symbol.getSymbol("proton:io"));
        condition.setDescription(e.getMessage());
        transport.setCondition(condition);
        transport.close_tail();
      }
    }
    // (Comment from C code:) occasionally transport events aren't
    // generated when expected, so the following hack ensures we
    // always update the selector
    update(selectable);
    reactor.update(selectable);
  }
};

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

engineConnection.transport.close_tail();
engineConnection.requestor.tell(new DisconnectNotification(
    engineConnection, ce.cause), this);

相关文章