Namespace Apache.NMS
Classes
IllegalStateException
InvalidClientIDException
InvalidDestinationException
An attempt is made to access an invalid destination
InvalidSelectorException
MessageEOFException
MessageFormatException
MessageNotReadableException
MessageNotWriteableException
NMSConnectionException
Represents a connection failure.
NMSConnectionFactory
Implementation of a factory for IConnection instances.
NMSConstants
Defines a number of constants
NMSException
Represents an NMS exception
NMSSecurityException
Represents a security failure.
ProviderFactoryInfo
Provider implementation mapping class.
ResourceAllocationException
Tracer
TransactionInProgressException
TransactionRolledBackException
Interfaces
IBytesMessage
A BytesMessage object is used to send a message containing a stream of uninterpreted bytes. It inherits from the Message interface and adds a bytes message body. The receiver of the message supplies the interpretation of the bytes.
This message type is for client encoding of existing message formats. If possible, one of the other self-defining message types should be used instead.
Although the NMS API allows the use of message properties with byte messages, they are typically not used, since the inclusion of properties may affect the format.
When the message is first created, and when ClearBody is called, the body of the message is in write-only mode. After the first call to Reset has been made, the message body is in read-only mode. After a message has been sent, the client that sent it can retain and modify it without affecting the message that has been sent. The same message object can be sent multiple times. When a message has been received, the provider has called Reset so that the message body is in read-only mode for the client.
If ClearBody is called on a message in read-only mode, the message body is cleared and the message is in write-only mode.
If a client attempts to read a message in write-only mode, a MessageNotReadableException is thrown.
If a client attempts to write a message in read-only mode, a MessageNotWriteableException is thrown.
IConnection
Represents a connection with a message broker
IConnectionFactory
A Factory of IConnection objects
IConnectionMetaData
Provides information describing the NMS IConnection instance.
IDestination
A base interface for destinations such as queues or topics
IMapMessage
Represents a Map message which contains key and value pairs which are of primitive types
IMessage
Represents a message either to be sent to a message broker or received from a message broker.
IMessageConsumer
A consumer of messages
IMessageProducer
An object capable of sending messages to some destination
INetTxConnection
The INetTxConnection extends the functionality of the IConnection interface by adding the createNetTxSession method (optional).
The INetTxConnection interface is optional. NMS providers are not required to support this interface. This interface is for use by NMS providers to support transactional environments.
INetTxConnectionFactory
Some application servers provide support for use in a .NET transactions (optional).
To include NMS API transactions in a MSDTC transaction, an application server requires a .NET Transaction aware NMS provider that is capable of mapping the MSDTC transaction model into operations that are supported by the application server. An NMS provider exposes its .NET Transaction support using an INetTxConnectionFactory object, which an application server uses to create INetTxConnection objects.
The INetTxConnectionFactory interface is optional. NMS providers are not required to support this interface. This interface is for use by NMS providers to support transactional environments.
INetTxSession
The INetTxSession interface extends the capability of Session by adding access to a NMS provider's support for the Distributed Transactions (optional). The transaction support leverages the .NET Frameworks System.Transactions API.
The NMS Provider implements this interface by participating in the current ambient transaction as defined by the System.Transactions.Transaction.Current static member. Whenever a new Transaction is entered the NMS provider should enlist in that transaction. When there is no ambient transaction then the NMS Provider should allow the INetTxSession instance to behave as a session that is in Auto Acknowledge mode.
Calling the Commit or Rollback methods on a INetTxSession instance should throw an exception as those operations are controlled by the Transaction Manager.
The INetTxSession interface is optional. NMS providers are not required to support this interface. This interface is for use by NMS providers to support transactional environments.
INMSConsumer
An object capable of sending messages to some destination
INMSContext
A INMSContext is the main interface in the simplified NMS API introduced for NMS 2.0. This combines in a single object the functionality of two separate objects from the NMS 1.x API: an IConnection and an ISession.
This is comparable to JMS 2.0 API that extended JMS 1.x API
INMSProducer
An object capable of sending messages to some destination
IObjectMessage
Represents an Object message which contains a serializable .Net object.
IPrimitiveMap
Represents a Map of primitive types where the keys are all string instances and the values are strings or numbers.
IQueue
Represents a queue in a message broker. A message sent to a queue is delivered to at most one consumer on the queue.
IQueueBrowser
A client uses a QueueBrowser object to look at messages on a queue without removing them.
The Enumeration method returns a java.util.Enumeration that is used to scan the queue's messages. It may be an enumeration of the entire content of a queue, or it may contain only the messages matching a message selector.
Messages may be arriving and expiring while the scan is done. The NMS API does not require the content of an enumeration to be a static snapshot of queue content. Whether these changes are visible or not depends on the NMS provider.
IRedeliveryPolicy
ISession
Represents a single unit of work on an IConnection. So the ISession can be used to perform transactional receive and sends
IStartable
A lifecycle for NMS objects to indicate they can be started
IStoppable
A lifecycle for NMS objects to indicate they can be stopped
IStreamMessage
A StreamMessage object is used to send a stream of primitive types in the .NET programming language. It is filled and read sequentially. It inherits from the Message interface and adds a stream message body.
The primitive types can be read or written explicitly using methods for each type. They may also be read or written generically as objects. For instance, a call to IStreamMessage.WriteInt32(6) is equivalent to StreamMessage.WriteObject( (Int32)6 ). Both forms are provided, because the explicit form is convenient for static programming, and the object form is needed when types are not known at compile time.
When the message is first created, and when ClearBody is called, the body of the message is in write-only mode. After the first call to reset has been made, the message body is in read-only mode. After a message has been sent, the client that sent it can retain and modify it without affecting the message that has been sent. The same message object can be sent multiple times. When a message has been received, the provider has called reset so that the message body is in read-only mode for the client.
If ClearBody is called on a message in read-only mode, the message body is cleared and the message body is in write-only mode.
If a client attempts to read a message in write-only mode, a MessageNotReadableException is thrown.
If a client attempts to write a message in read-only mode, a MessageNotWriteableException is thrown.
IStreamMessage objects support the following conversion table. The marked cases must be supported. The unmarked cases must throw a NMSException. The String-to-primitive conversions may throw a runtime exception if the primitive's valueOf() method does not accept it as a valid String representation of the primitive.
A value written as the row type can be read as the column type.
boolean byte short char int long float double String byte[] | |
---|---|
boolean | X X |
byte | X X X X X |
short | X X X X |
char | X X |
int | X X X |
long | X X |
float | X X X |
double | X X |
String | X X X X X X X X |
byte[] | X |
---------------------------------------------------------------------- |
ITemporaryQueue
Represents a temporary queue which exists for the duration of the IConnection which created it.
ITemporaryTopic
Represents a temporary topic which exists for the duration of the IConnection which created it.
ITextMessage
Represents a text based message
ITopic
Represents a topic in a message broker. A message sent to a topic is delivered to all consumers on the topic who are interested in the message.
ITrace
The ITrace interface is used internally by ActiveMQ to log messages. The client aplication may provide an implementation of ITrace if it wishes to route messages to a specific destination.
Enums
AcknowledgementMode
The mode used to acknowledge messages after they are consumed
DestinationType
Represents the type of the destination such as a queue or topic.
MsgDeliveryMode
Define an enumerated array of message delivery modes. Provider-specific values can be used to extend this enumerated mode. TIBCO is known to provide a third value of ReliableDelivery. At minimum, a provider must support Persistent and NonPersistent.
MsgPriority
Define an enumerated array of message priorities.
Delegates
CompletionListener
ConnectionInterruptedListener
A delegate that is used by Fault tolerant NMS Implementation to notify their clients that the Connection is not currently active to due some error.
ConnectionResumedListener
A delegate that is used by Fault tolerant NMS Implementation to notify their clients that the Connection that was interrupted has now been restored.
ConsumerTransformerDelegate
A delegate that a client can register that will be called each time a consumer dispatches a message to the client code to allow the client to Transform a received message from one type to another, StreamMessage to TextMessage, ObjectMessage to TextMessage containing XML, etc. This allows a client to create a consumer that will automatically transform a message to a type that the client is capable of processing or adding additional information to a received message. For messages that do not need to be processed the client should return null from this method, in this case the original message will be dispatched to the client.
ExceptionListener
A delegate that can receive transport level exceptions.
MessageListener
A delegate that can receive messages async.
ProducerTransformerDelegate
A delegate that a client can register that will be called each time a Producer's send method is called to allow the client to Transform a sent message from one type to another, StreamMessage to TextMessage, ObjectMessage to TextMessage containing XML, etc. This allows a client to create a producer that will automatically transform a message to a type that some receiving client is capable of processing or adding additional information to a sent message such as additional message headers, etc. For messages that do not need to be processed the client should return null from this method, in this case the original message will be sent.
SessionTxEventDelegate
A delegate that is notified whenever a Transational evemt occurs for the specified session such as TX started, committed or rolled back.