Cocop.AmqpMathToolConnector  2.1.0
API to connect math environment with AMQP
Classes | Public Member Functions | List of all members
eu.cocop.amqp2math.AmqpConnector Class Reference

Public Member Functions

 AmqpConnector (AmqpPropsManager props, String ... topics) throws CommunicationException
 
 AmqpConnector (AmqpPropsManager props, boolean debugOn, String ... topics) throws CommunicationException
 
Notifier getNotifierForTopic (String topic)
 
void sendMessage (String topic, byte[] msg)
 
void close ()
 

Detailed Description

Provides means to send messages to and receive messages from a message bus.

Author
Petri Kannisto

Constructor & Destructor Documentation

◆ AmqpConnector() [1/2]

eu.cocop.amqp2math.AmqpConnector.AmqpConnector ( AmqpPropsManager  props,
String ...  topics 
) throws CommunicationException

Constructor.

Parameters
propsMessage bus properties.
topicsTopics to subscribe to.
Exceptions
CommunicationExceptionThrown if an error occurs.

◆ AmqpConnector() [2/2]

eu.cocop.amqp2math.AmqpConnector.AmqpConnector ( AmqpPropsManager  props,
boolean  debugOn,
String ...  topics 
) throws CommunicationException

Constructor.

Parameters
propsMessage bus properties.
debugOnWhether debug prints are enabled.
topicsTopics to subscribe to.
Exceptions
CommunicationExceptionThrown if an error occurs.

Member Function Documentation

◆ close()

void eu.cocop.amqp2math.AmqpConnector.close ( )

Releases the resources the object utilises.

◆ getNotifierForTopic()

Notifier eu.cocop.amqp2math.AmqpConnector.getNotifierForTopic ( String  topic)

Starts to listen the given topic.

Parameters
topicTopic.
Returns
Notifier object for the topic.
Exceptions
IllegalArgumentExceptionThrown if the topic is unknown.

◆ sendMessage()

void eu.cocop.amqp2math.AmqpConnector.sendMessage ( String  topic,
byte []  msg 
)

Sends a message to given topic.

Parameters
topicTopic.
msgMessage.

The documentation for this class was generated from the following file: