public class OmqConnectionFactory
extends java.lang.Object
| Constructor and Description |
|---|
OmqConnectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
static com.rabbitmq.client.Channel |
getNewChannel()
This method creates a new channel if the singleton pattern is used
|
static com.rabbitmq.client.Connection |
getNewConnection(java.util.Properties env)
This function creates a new rabbitmq connection using the properties set
in env
|
static com.rabbitmq.client.Connection |
getNewWorkingConnection(java.util.Properties env)
This function returns a working connection.
|
static void |
init(java.util.Properties env)
If this class is wanted to use as a singleton class this is the init
function
|
public static void init(java.util.Properties env)
throws java.security.KeyManagementException,
java.security.NoSuchAlgorithmException,
java.io.IOException
env - - environment that sets the properties needed by RabbitMQjava.security.KeyManagementExceptionjava.security.NoSuchAlgorithmExceptionjava.io.IOExceptionpublic static com.rabbitmq.client.Connection getNewWorkingConnection(java.util.Properties env)
throws java.lang.Exception
env - - used if it's necessary to create a new connectionjava.lang.Exceptionpublic static com.rabbitmq.client.Connection getNewConnection(java.util.Properties env)
throws java.io.IOException,
java.security.KeyManagementException,
java.security.NoSuchAlgorithmException
env - - Properties needed to create a new connection: username,
password, rabbit_host, rabbit_port, enable_ssl (optional)java.io.IOExceptionjava.security.KeyManagementExceptionjava.security.NoSuchAlgorithmExceptionpublic static com.rabbitmq.client.Channel getNewChannel()
throws java.io.IOException
java.io.IOException