本文整理了Java中org.apache.qpid.proton.engine.Transport.getCondition()
方法的一些代码示例,展示了Transport.getCondition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transport.getCondition()
方法的具体详情如下:
包路径:org.apache.qpid.proton.engine.Transport
类名称:Transport
方法名:getCondition
暂无
代码示例来源:origin: Azure/azure-event-hubs-java
@Override
public void onTransportClosed(Event event) {
final Connection connection = event.getConnection();
final Transport transport = event.getTransport();
final ErrorCondition condition = transport.getCondition();
if (TRACE_LOGGER.isInfoEnabled()) {
TRACE_LOGGER.info(String.format(Locale.US, "onTransportClosed: hostname[%s], error[%s]",
connection != null ? connection.getHostname() : "n/a", (condition != null ? condition.getDescription() : "n/a")));
}
if (connection != null && connection.getRemoteState() != EndpointState.CLOSED) {
// if the remote-peer abruptly closes the connection without issuing close frame
// issue one
this.amqpConnection.onConnectionError(condition);
}
}
代码示例来源:origin: Azure/azure-event-hubs-java
@Override
public void onTransportError(Event event) {
final Connection connection = event.getConnection();
final Transport transport = event.getTransport();
final ErrorCondition condition = transport.getCondition();
if (TRACE_LOGGER.isWarnEnabled()) {
TRACE_LOGGER.warn(String.format(Locale.US, "onTransportError: hostname[%s], error[%s]",
connection != null ? connection.getHostname() : "n/a",
condition != null ? condition.getDescription() : "n/a"));
}
if (connection != null && connection.getRemoteState() != EndpointState.CLOSED) {
// if the remote-peer abruptly closes the connection without issuing close frame
// issue one
this.amqpConnection.onConnectionError(condition);
}
// onTransportError event is not handled by the global IO Handler for cleanup
transport.unbind();
this.notifyTransportErrors(event);
}
代码示例来源:origin: Azure/azure-service-bus-java
@Override
public void onTransportError(Event event)
{
ErrorCondition condition = event.getTransport().getCondition();
if (condition != null)
{
TRACE_LOGGER.warn("Connection.onTransportError: hostname:{}, error:{}", event.getConnection().getHostname(), condition.getDescription());
}
else
{
TRACE_LOGGER.warn("Connection.onTransportError: hostname:{}. error:{}", event.getConnection().getHostname(), "no description returned");
}
this.messagingFactory.onConnectionError(condition);
Connection connection = event.getConnection();
if(connection != null)
{
connection.free();
}
this.notifyTransportErrors(event);
}
代码示例来源:origin: Azure/azure-event-hubs-java
final ErrorCondition errorCondition = transport.getCondition();
final String hostName = event.getReactor().getConnectionAddress(connection);
final ProxySelector proxySelector = ProxySelector.getDefault();
代码示例来源:origin: Azure/azure-service-bus-java
final ErrorCondition errorCondition = transport.getCondition();
final String hostName = event.getReactor().getConnectionAddress(connection);
final ProxySelector proxySelector = ProxySelector.getDefault();
内容来源于网络,如有侵权,请联系作者删除!