public MethodRegistry getRegistry() { return getMethodRegistry(); }
public AMQBody createAMQBody() { return _connection.getMethodRegistry().createBasicDeliverBody(_consumerTag, _deliveryTag, _isRedelivered, _exchangeName, _routingKey); }
@Override public void performAction(final AMQPConnection_0_8Impl object) { AMQConnectionException e = new AMQConnectionException(cause, description, 0, 0, getMethodRegistry(), null); sendConnectionClose(0, e.getCloseFrame()); } };
@Override public void confirmConsumerAutoClose(int channelId, AMQShortString consumerTag) { BasicCancelOkBody basicCancelOkBody = _connection.getMethodRegistry().createBasicCancelOkBody(consumerTag); writeFrame(basicCancelOkBody.generateFrame(channelId)); }
private void continueSaslNegotiation(final byte[] challenge) { ConnectionSecureBody secureBody = getMethodRegistry().createConnectionSecureBody(challenge); writeFrame(secureBody.generateFrame(0)); _state = ConnectionState.AWAIT_SECURE_OK; }
private AMQBody createEncodedReturnFrame(MessagePublishInfo messagePublishInfo, int replyCode, AMQShortString replyText) { return _connection.getMethodRegistry().createBasicReturnBody(replyCode, replyText, messagePublishInfo.getExchange(), messagePublishInfo.getRoutingKey()); }
private AMQBody createEncodedGetOkBody(AMQMessage message, InstanceProperties props, long deliveryTag, int queueSize) { final AMQShortString exchangeName; final AMQShortString routingKey; final MessagePublishInfo pb = message.getMessagePublishInfo(); exchangeName = pb.getExchange(); routingKey = pb.getRoutingKey(); final boolean isRedelivered = Boolean.TRUE.equals(props.getProperty(InstanceProperties.Property.REDELIVERED)); return _connection.getMethodRegistry().createBasicGetOkBody(deliveryTag, isRedelivered, exchangeName, routingKey, queueSize); }
@Override public void receiveConnectionClose(final int replyCode, final AMQShortString replyText, final int classId, final int methodId) { if(LOGGER.isDebugEnabled()) { LOGGER.debug("RECV ConnectionClose[" +" replyCode: " + replyCode + " replyText: " + replyText + " classId: " + classId + " methodId: " + methodId + " ]"); } try { if (_orderlyClose.compareAndSet(false, true)) { completeAndCloseAllChannels(); } MethodRegistry methodRegistry = getMethodRegistry(); ConnectionCloseOkBody responseBody = methodRegistry.createConnectionCloseOkBody(); writeFrame(responseBody.generateFrame(0)); } catch (Exception e) { LOGGER.error("Error closing connection for " + getRemoteAddressString(), e); } finally { closeNetworkConnection(); } }
@Override public void closeChannelAndWriteFrame(AMQChannel channel, int cause, String message) { writeFrame(new AMQFrame(channel.getChannelId(), getMethodRegistry().createChannelCloseBody(cause, AMQShortString.validValueOf(message), _currentClassId, _currentMethodId))); closeChannel(channel, cause, message, true); }
@Override public void performAction(final AMQPConnection_0_8Impl object) { int channelId = session.getChannelId(); closeChannel(channelId, cause, message); MethodRegistry methodRegistry = getMethodRegistry(); ChannelCloseBody responseBody = methodRegistry.createChannelCloseBody( cause, AMQShortString.validValueOf(message), 0, 0); writeFrame(responseBody.generateFrame(channelId)); } });
AMQMethodBody responseBody = getMethodRegistry().createConnectionStartBody((short) getProtocolMajorVersion(), (short) pv.getActualMinorVersion(), serverProperties,
response = getMethodRegistry().createChannelOpenOkBody();
MethodRegistry methodRegistry = getMethodRegistry(); AMQMethodBody responseBody = methodRegistry.createConnectionOpenOkBody(virtualHostName);
private void processSaslResponse(final byte[] response, final SubjectCreator subjectCreator) MethodRegistry methodRegistry = getMethodRegistry(); SubjectAuthenticationResult authResult = _successfulAuthenticationResult; byte[] challenge = null;