Package core.apiCore.interfaces
Class ServiceBusInterface
java.lang.Object
core.apiCore.interfaces.ServiceBusInterface
public class ServiceBusInterface extends Object
- Author:
- ehsan.matean
-
Field Summary
Fields Modifier and Type Field Description static com.rabbitmq.client.Channelchannelstatic com.rabbitmq.client.Connectionconnectionstatic StringSERVICEBUS_CONNECTION_STRstatic StringSERVICEBUS_HOSTstatic StringSERVICEBUS_MESSAGE_ID_PREFIXstatic StringSERVICEBUS_OUTBOUND_QUEUEstatic StringSERVICEBUS_OUTBOUND_TOPICstatic StringSERVICEBUS_QUEUEstatic StringSERVICEBUS_TOPIC -
Constructor Summary
Constructors Constructor Description ServiceBusInterface() -
Method Summary
Modifier and Type Method Description static voidcloseConnection()close connectionstatic voidevaluateOption(ServiceObject serviceObject)static voidgetOutboundMessages()gets message from outbound queue Adds messages to ouboutMessage hashmapstatic voidsendServiceBusMessage(ServiceObject serviceObject, String messageId)send rabbitMq messagestatic voidtestServicebusInterface(ServiceObject serviceObject)interface for database calls
-
Field Details
-
SERVICEBUS_CONNECTION_STR
- See Also:
- Constant Field Values
-
SERVICEBUS_QUEUE
- See Also:
- Constant Field Values
-
SERVICEBUS_OUTBOUND_QUEUE
- See Also:
- Constant Field Values
-
SERVICEBUS_TOPIC
- See Also:
- Constant Field Values
-
SERVICEBUS_OUTBOUND_TOPIC
- See Also:
- Constant Field Values
-
SERVICEBUS_HOST
- See Also:
- Constant Field Values
-
SERVICEBUS_MESSAGE_ID_PREFIX
- See Also:
- Constant Field Values
-
connection
public static com.rabbitmq.client.Connection connection -
channel
public static com.rabbitmq.client.Channel channel
-
-
Constructor Details
-
ServiceBusInterface
public ServiceBusInterface()
-
-
Method Details
-
testServicebusInterface
interface for database calls- Parameters:
serviceObject-- Throws:
Exception
-
sendServiceBusMessage
public static void sendServiceBusMessage(ServiceObject serviceObject, String messageId) throws InterruptedException, com.microsoft.azure.servicebus.primitives.ServiceBusExceptionsend rabbitMq message- Parameters:
apiObject-- Throws:
com.microsoft.azure.servicebus.primitives.ServiceBusExceptionInterruptedException
-
evaluateOption
-
closeConnection
public static void closeConnection()close connection -
getOutboundMessages
gets message from outbound queue Adds messages to ouboutMessage hashmap- Parameters:
receiver-- Throws:
Exception
-