public class AmqpConnections extends Object implements AmqpConnectionsMBean
AmqpConnections
service handles the list of known AMQP
servers, in order to keep live connections with them.Modifier and Type | Field and Description |
---|---|
private static org.objectweb.util.monolog.api.Logger |
logger |
(package private) static String |
SAVE_FILE_NAME |
private Map<String,LiveServerConnection> |
servers |
Constructor and Description |
---|
AmqpConnections() |
Modifier and Type | Method and Description |
---|---|
void |
addServer(String name,
String host,
int port)
Adds an AMQP server and starts a live connection with it, accessible via
the host and port provided.
|
void |
addServer(String name,
String host,
int port,
String user,
String pass)
Adds an AMQP server and starts a live connection with it, accessible via
the host and port provided.
|
void |
deleteServer(String name)
Removes the live connection to the specified AMQP server.
|
List<LiveServerConnection> |
getConnections()
Gets the list of currently opened connections.
|
String[] |
getServerNames()
Gets the list of known servers.
|
(package private) void |
readSavedConf() |
void |
stop() |
private static final org.objectweb.util.monolog.api.Logger logger
static final String SAVE_FILE_NAME
private Map<String,LiveServerConnection> servers
void readSavedConf()
public void addServer(String name, String host, int port)
addServer
in interface AmqpConnectionsMBean
name
- the name identifying the serverhost
- host of the added serverport
- port of the added serverpublic void addServer(String name, String host, int port, String user, String pass)
addServer
in interface AmqpConnectionsMBean
name
- the name identifying the serverhost
- host of the added serverport
- port of the added serveruser
- user namepass
- user passwordpublic void deleteServer(String name)
deleteServer
in interface AmqpConnectionsMBean
name
- the name identifying the serverpublic String[] getServerNames()
getServerNames
in interface AmqpConnectionsMBean
public List<LiveServerConnection> getConnections()
public void stop()
Copyright © 2016 ScalAgent D.T.. All Rights Reserved.