public final class MQConnection extends Object implements com.rabbitmq.client.ShutdownListener
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageToQueue(String exchange,
String routingKey,
com.rabbitmq.client.AMQP.BasicProperties props,
byte[] body)
Puts a message in the message queue.
|
com.rabbitmq.client.Connection |
getConnection()
Gets the connection.
|
static MQConnection |
getInstance()
Gets the instance.
|
void |
initialize(String name,
hudson.util.Secret password,
String uri,
String vh)
Initializes this instance with supplied values.
|
void |
shutdownCompleted(com.rabbitmq.client.ShutdownSignalException cause) |
public static MQConnection getInstance()
public void addMessageToQueue(String exchange, String routingKey, com.rabbitmq.client.AMQP.BasicProperties props, byte[] body)
exchange - the exchange to publish the message toroutingKey - the routing keyprops - other properties for the message - routing headers etcbody - the message bodypublic com.rabbitmq.client.Connection getConnection()
public void initialize(String name, hudson.util.Secret password, String uri, String vh)
name - the user namepassword - the user passworduri - the server urivh - the virtual hostpublic void shutdownCompleted(com.rabbitmq.client.ShutdownSignalException cause)
shutdownCompleted in interface com.rabbitmq.client.ShutdownListenerCopyright © 2016–2019. All rights reserved.