001package io.jboot.components.mq.rabbitmq; 002 003import com.rabbitmq.client.AMQP; 004import com.rabbitmq.client.Channel; 005import com.rabbitmq.client.Envelope; 006import io.jboot.components.mq.MessageContext; 007import io.jboot.components.mq.Jbootmq; 008 009public class RabbitmqMessageContext extends MessageContext { 010 011 final Channel channel; 012 final String consumerTag; 013 final Envelope envelope; 014 final AMQP.BasicProperties properties; 015 016 public RabbitmqMessageContext(Jbootmq mq, Channel channel, String consumerTag, Envelope envelope, AMQP.BasicProperties properties) { 017 super(mq); 018 this.channel = channel; 019 this.consumerTag = consumerTag; 020 this.envelope = envelope; 021 this.properties = properties; 022 } 023 024 public Channel getChannel() { 025 return channel; 026 } 027 028 public String getConsumerTag() { 029 return consumerTag; 030 } 031 032 public Envelope getEnvelope() { 033 return envelope; 034 } 035 036 public AMQP.BasicProperties getProperties() { 037 return properties; 038 } 039}