use of org.apache.qpid.server.plugin.MessageConverter in project qpid-broker-j by apache.
the class ManagementNode method enqueue.
@Override
public void enqueue(final ServerMessage message, final Action<? super MessageInstance> action, final MessageEnqueueRecord record) {
@SuppressWarnings("unchecked") MessageConverter<ServerMessage, InternalMessage> converter = (MessageConverter<ServerMessage, InternalMessage>) MessageConverterRegistry.getConverter((message.getClass()), InternalMessage.class);
final InternalMessage msg = converter.convert(message, _addressSpace);
try {
if (action != null) {
action.performAction(new ConsumedMessageInstance(msg));
}
processRequest(msg);
} finally {
converter.dispose(msg);
}
}
Aggregations