public class PublishRMQChannel extends AbstractRMQChannel implements PublishChannel
修飾子とタイプ | クラスと説明 |
---|---|
class |
PublishRMQChannel.PrepareTask
A class to prepare publising
|
class |
PublishRMQChannel.PublishTask
A class to publish message.
|
channel, rmqChannelListeners, state
コンストラクタと説明 |
---|
PublishRMQChannel()
Creates instance.
|
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addListener(RMQChannelListener listener)
Adds channel listener.
|
Future<PublishResult> |
publish(String exchangeName,
String routingKey,
com.rabbitmq.client.AMQP.BasicProperties props,
byte[] body)
Publish message.
|
void |
removeListener(RMQChannelListener listener)
Remove channel listener.
|
PublishResult |
setupExchange(String exchangeName,
String queueName)
Setup exchange.
|
PublishResult |
setupExchange(String exchangeName,
String queueName,
ExchangeType exchangeType,
String routingKey)
Setup exchange.
|
addRMQChannelListener, close, getChannel, isOpen, isOpenRMQChannel, notifyOnCloseCompleted, notifyOnOpen, notifyRMQChannelListeners, open, removeRMQChannelListener, shutdownCompleted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isOpen
public Future<PublishResult> publish(String exchangeName, String routingKey, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body)
publish
インタフェース内 PublishChannel
exchangeName
- the name of exchange.routingKey
- the routing key.props
- the properties of AMQP message.body
- the message body.PublishResult
.public PublishResult setupExchange(String exchangeName, String queueName)
setupExchange
インタフェース内 PublishChannel
exchangeName
- the exchange name. If null, unique name is used.
You can get it from PublishResult.getExchangeName()
.queueName
- the queue name. this is mandatory.PublishResult
.public PublishResult setupExchange(String exchangeName, String queueName, ExchangeType exchangeType, String routingKey)
setupExchange
インタフェース内 PublishChannel
exchangeName
- the exchange name. If null, unique name is used.
You can get it from PublishResult.getExchangeName()
.queueName
- the queue name. this is mandatory.exchangeType
- the exchange type.routingKey
- the routing key. Key usage is decided by exchange type.PublishResult
.public void addListener(RMQChannelListener listener)
addListener
インタフェース内 PublishChannel
listener
- the listener.public void removeListener(RMQChannelListener listener)
removeListener
インタフェース内 PublishChannel
listener
- the listener.Copyright © 2016–2018. All rights reserved.