The XMS API is an object-oriented
interface. The XMS object model is based on the
JMS 1.1 object model.
The following list summarizes the main XMS
classes, or types of object:
ConnectionFactory
A ConnectionFactory object encapsulates a set of parameters for a connection.
An application uses a ConnectionFactory to create a connection. An application
can provide the parameters at run time and create a ConnectionFactory object.
Alternatively, the connection parameters can be stored in a repository of administered objects. An
application can retrieve an object from the repository and create a
ConnectionFactory object from it.
Connection
A Connection object encapsulates an active connection from an application to
a messaging server. An application uses a connection to create sessions.
Destination
An application sends messages or receives messages using a Destination
object. In the publish/subscribe domain, a
Destination object encapsulates a topic and, in the point-to-point domain, a Destination object
encapsulates a queue. An application can provide the parameters to create a
Destination object at run time. Alternatively, it can create a
Destination object from an object definition that is stored in repository of
administered objects.
Session
A Session object is a single threaded context for sending and receiving
messages. An application uses a Session object to create
Message, MessageProducer, and
MessageConsumer objects.
Message
A Message object encapsulates the Message object that an
application sends using a MessageProducer object, or receives using a
MessageConsumer object.
MessageProducer
A MessageProducer object is used by an application to send messages to a
destination.
MessageConsumer
An MessageConsumer object is used by an application to receive messages sent
to a destination.
Figure 1 shows these objects
and their relationships. This diagram shows the main types of XMS
object: ConnectionFactory, Connection, Session, MessageProducer, MessageConsumer,
Message, and Destination. An application uses a connection factory
to create a connection, and uses a connection to create sessions.
The application can then use a session to create messages, message
producers, and message consumers. The application uses a message producer
to send messages to a destination, and uses a message consumer to
receive messages sent to a destination.
Figure 1. XMS objects and their relationships
In .NET, the XMS classes are defined as a set of .NET interfaces. When you are coding XMS
.NET applications, you need only the declared
interfaces.
The XMS object model is based on the domain
independent interfaces that are described in Java Message Service Specification, Version 1.1. Domain-specific classes, such as Topic,
TopicPublisher, and TopicSubscriber, are not provided.