JMS defines a set of high-level interfaces that encapsulate several messaging concepts. These high-level interfaces are further extended for the Point-To-Point and publish/subscribe messaging domains:
- ConnectionFactory: This is an administered object with the ability to create a connection.
- Connection: This is an active connection handle to the provider.
- Destination: This is an administered object that encapsulates the identity of a message destination where messages are sent to/received from.
- Session: This is a single-threaded context for sending/receiving messages. To ensure a simple session-based transaction, concurrent access to a message by multiple threads is restricted. We can use multiple sessions for a multithreaded application.
- MessageProducer: This is used to send messages.
- MessageConsumer: This is used to receive messages.
The following table shows interfaces specific to both the Point-To-Point and publish/subscribe paradigms enhanced from their corresponding high-level interface: