public interface PublishChannel
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addListener(RMQChannelListener listener)
Adds channel listener.
|
boolean |
isOpen()
Gets channel is opened.
|
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 type,
String routingKey)
Setup exchange.
|
Future<PublishResult> publish(String exchangeName, String routingKey, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body)
exchangeName
- the name of exchange.routingKey
- the routing key.props
- the properties of AMQP message.body
- the message body.PublishResult
.PublishResult setupExchange(String exchangeName, String queueName) throws CancellationException, ExecutionException, InterruptedException
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
.CancellationException
- if the computation was cancelled.ExecutionException
- if the computation threw an exception.InterruptedException
- if the current thread was interrupted while waiting.PublishResult setupExchange(String exchangeName, String queueName, ExchangeType type, String routingKey) throws CancellationException, ExecutionException, InterruptedException
exchangeName
- the exchange name. If null, unique name is used.
You can get it from PublishResult.getExchangeName()
.queueName
- the queue name. this is mandatory.type
- the exchange type.routingKey
- the routing key. Key usage is decided by exchange type.PublishResult
.CancellationException
- if the computation was cancelled.ExecutionException
- if the computation threw an exception.InterruptedException
- if the current thread was interrupted while waiting.boolean isOpen()
void addListener(RMQChannelListener listener)
listener
- the listener.void removeListener(RMQChannelListener listener)
listener
- the listener.Copyright © 2016–2018. All rights reserved.