org.inria.myriads.snoozenode.monitoring.datasender.api.impl
public class RabbitMQExternalSender extends Object implements DataSender
Constructor and Description |
---|
RabbitMQExternalSender(ExternalNotifierSettings monitoringExternalSettings)
Constructor.
|
RabbitMQExternalSender(String exchange,
ExternalNotifierSettings monitoringExternalSettings)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activateOptions()
Activate options.
|
void |
close()
Closes the channel and connection to RabbitMQ when shutting down the appender.
|
com.rabbitmq.client.Channel |
getChannel() |
com.rabbitmq.client.Connection |
getConnection() |
String |
getExchange() |
com.rabbitmq.client.ConnectionFactory |
getFactory() |
String |
getHost() |
String |
getIdentifier() |
String |
getPassword() |
int |
getPort() |
String |
getQueue() |
String |
getRoutingKey() |
String |
getType() |
String |
getUsername() |
String |
getVirtualHost() |
boolean |
isDurable() |
void |
send(Object data)
Sends data.
|
void |
send(Object data,
String routingKey)
Sends data.
|
void |
setChannel(com.rabbitmq.client.Channel channel) |
void |
setConnection(com.rabbitmq.client.Connection connection) |
void |
setDurable(boolean durable) |
void |
setExchange(String exchange) |
void |
setFactory(com.rabbitmq.client.ConnectionFactory factory) |
void |
setHost(String host) |
void |
setIdentifier(String identifier) |
void |
setPassword(String password) |
void |
setPort(int port) |
void |
setQueue(String queue) |
void |
setRoutingKey(String routingKey) |
void |
setType(String type) |
void |
setUsername(String username) |
void |
setVirtualHost(String virtualHost) |
public RabbitMQExternalSender(ExternalNotifierSettings monitoringExternalSettings)
monitoringExternalSettings
- external settings.public RabbitMQExternalSender(String exchange, ExternalNotifierSettings monitoringExternalSettings)
exchange
- Exchange name.monitoringExternalSettings
- External settings.public void activateOptions()
public void close()
close
in interface DataSender
public void send(Object data)
DataSender
send
in interface DataSender
data
- The data to sendpublic void send(Object data, String routingKey)
DataSender
send
in interface DataSender
data
- The data to sendroutingKey
- The sender Idpublic com.rabbitmq.client.ConnectionFactory getFactory()
public void setFactory(com.rabbitmq.client.ConnectionFactory factory)
factory
- the factory to setpublic com.rabbitmq.client.Connection getConnection()
public void setConnection(com.rabbitmq.client.Connection connection)
connection
- the connection to setpublic com.rabbitmq.client.Channel getChannel()
public void setChannel(com.rabbitmq.client.Channel channel)
channel
- the channel to setpublic String getIdentifier()
public void setIdentifier(String identifier)
identifier
- the identifier to setpublic String getHost()
public void setHost(String host)
host
- the host to setpublic int getPort()
public void setPort(int port)
port
- the port to setpublic String getUsername()
public void setUsername(String username)
username
- the username to setpublic String getPassword()
public void setPassword(String password)
password
- the password to setpublic String getVirtualHost()
public void setVirtualHost(String virtualHost)
virtualHost
- the virtualHost to setpublic String getExchange()
public void setExchange(String exchange)
exchange
- the exchange to setpublic String getQueue()
public void setQueue(String queue)
queue
- the queue to setpublic String getType()
public void setType(String type)
type
- the type to setpublic boolean isDurable()
public void setDurable(boolean durable)
durable
- the durable to setpublic String getRoutingKey()
public void setRoutingKey(String routingKey)
routingKey
- the routingKey to setCopyright © 2013. All Rights Reserved.