use of org.apache.activemq.artemis.core.protocol.core.Channel in project activemq-artemis by apache.
the class RemotingConnectionImpl method killMessage.
@Override
public void killMessage(SimpleString nodeID) {
if (channelVersion < DisconnectConsumerWithKillMessage.VERSION_INTRODUCED) {
return;
}
Channel clientChannel = getChannel(1, -1);
DisconnectConsumerWithKillMessage response = new DisconnectConsumerWithKillMessage(nodeID);
clientChannel.send(response, -1);
}
use of org.apache.activemq.artemis.core.protocol.core.Channel in project activemq-artemis by apache.
the class RemotingConnectionImpl method getChannel.
@Override
public synchronized Channel getChannel(final long channelID, final int confWindowSize) {
Channel channel = channels.get(channelID);
if (channel == null) {
channel = new ChannelImpl(this, channelID, confWindowSize, outgoingInterceptors);
channels.put(channelID, channel);
}
return channel;
}
use of org.apache.activemq.artemis.core.protocol.core.Channel in project activemq-artemis by apache.
the class RemotingConnectionImpl method fail.
@Override
public void fail(final ActiveMQException me, String scaleDownTargetNodeID) {
synchronized (failLock) {
if (destroyed) {
return;
}
destroyed = true;
}
if (!(me instanceof ActiveMQRemoteDisconnectException)) {
ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
}
try {
transportConnection.forceClose();
} catch (Throwable e) {
ActiveMQClientLogger.LOGGER.failedForceClose(e);
}
// Then call the listeners
callFailureListeners(me, scaleDownTargetNodeID);
callClosingListeners();
internalClose();
for (Channel channel : channels.values()) {
channel.returnBlocking(me);
}
}
use of org.apache.activemq.artemis.core.protocol.core.Channel in project activemq-artemis by apache.
the class ActiveMQClientProtocolManager method stop.
@Override
public void stop() {
alive = false;
synchronized (inCreateSessionGuard) {
if (inCreateSessionLatch != null)
inCreateSessionLatch.countDown();
}
Channel channel1 = getChannel1();
if (channel1 != null) {
channel1.returnBlocking();
}
waitLatch.countDown();
}
use of org.apache.activemq.artemis.core.protocol.core.Channel in project activemq-artemis by apache.
the class ActiveMQClientProtocolManager method ping.
@Override
public void ping(long connectionTTL) {
Channel channel = connection.getChannel(ChannelImpl.CHANNEL_ID.PING.id, -1);
Ping ping = new Ping(connectionTTL);
channel.send(ping);
connection.flush();
}
Aggregations