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
All Methods Static Methods Concrete Methods 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 Detail
-
SERVICEBUS_CONNECTION_STR
public static final String SERVICEBUS_CONNECTION_STR
- See Also:
- Constant Field Values
-
SERVICEBUS_QUEUE
public static final String SERVICEBUS_QUEUE
- See Also:
- Constant Field Values
-
SERVICEBUS_OUTBOUND_QUEUE
public static final String SERVICEBUS_OUTBOUND_QUEUE
- See Also:
- Constant Field Values
-
SERVICEBUS_TOPIC
public static final String SERVICEBUS_TOPIC
- See Also:
- Constant Field Values
-
SERVICEBUS_OUTBOUND_TOPIC
public static final String SERVICEBUS_OUTBOUND_TOPIC
- See Also:
- Constant Field Values
-
SERVICEBUS_HOST
public static final String SERVICEBUS_HOST
- See Also:
- Constant Field Values
-
SERVICEBUS_MESSAGE_ID_PREFIX
public static final String 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
-
-
Method Detail
-
testServicebusInterface
public static void testServicebusInterface(ServiceObject serviceObject) throws Exception
interface for database calls- Parameters:
serviceObject-- Throws:
Exception
-
sendServiceBusMessage
public static void sendServiceBusMessage(ServiceObject serviceObject, String messageId) throws InterruptedException, com.microsoft.azure.servicebus.primitives.ServiceBusException
send rabbitMq message- Parameters:
apiObject-- Throws:
com.microsoft.azure.servicebus.primitives.ServiceBusExceptionInterruptedException
-
evaluateOption
public static void evaluateOption(ServiceObject serviceObject)
-
closeConnection
public static void closeConnection()
close connection
-
-