public class AmqpConnectionService extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
AmqpConnectionService.MyURLStreamHandler |
Modifier and Type | Field and Description |
---|---|
private static org.objectweb.util.monolog.api.Logger |
logger |
private static AmqpConnections |
singleton |
Constructor and Description |
---|
AmqpConnectionService() |
Modifier and Type | Method and Description |
---|---|
static void |
addServer(String urls)
Adds an AMQP server and starts a live connection with it, accessible via
the host and port provided.
|
static 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.
|
static 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.
|
static List<String> |
convertToList(String value) |
static void |
deleteServer(String names)
Removes the live connection to the specified AMQP server.
|
static AmqpConnections |
getInstance() |
static String[] |
getServerNames()
Gets the list of known servers.
|
static void |
init(String args,
boolean firstTime)
Initializes the service.
|
static void |
stopService()
Stops all connections to AMQP servers.
|
private static final org.objectweb.util.monolog.api.Logger logger
private static AmqpConnections singleton
public static AmqpConnections getInstance()
public static void addServer(String name, String host, int port)
name
- the name identifying the serverhost
- host of the added serverport
- port of the added serverpublic static void addServer(String name, String host, int port, String user, String pass)
name
- the name identifying the serverhost
- host of the added serverport
- port of the added serveruser
- user namepass
- user passwordpublic static void addServer(String urls)
urls
- the amqp url list identifying the servers separate by space.
ex: amqp://user:pass@localhost:5672/?name=serv1 amqp://user:pass@localhost:5678/?name=serv2
serv1 and serv2 are the name identifying the server.public static void deleteServer(String names)
names
- the name identifying the server or list of name separate by spacepublic static String[] getServerNames()
public static void init(String args, boolean firstTime) throws Exception
Exception
public static void stopService()
Copyright © 2019 ScalAgent D.T.. All rights reserved.