Apache.NMS
A policy used to customize exactly how you want the redelivery to work.
The time in milliseconds to delay a redelivery
The redelivered counter.
Gets or sets the collision avoidance percent. This causes the redelivery delay
to be adjusted in order to avoid possible collision when messages are redelivered
to concurrent consumers.
The collision avoidance factor.
Gets or sets a value indicating whether to [use collision avoidance].
true if [use collision avoidance]; otherwise, false.
The time in milliseconds to initially delay a redelivery
The initial redelivery delay.
Gets or sets the maximum redeliveries. A value less than zero indicates
that there is no maximum and the NMS provider should retry forever.
The maximum redeliveries.
Gets or sets a value indicating whether [use exponential back off].
true if [use exponential back off]; otherwise, false.
Gets or sets the back off multiplier.
The back off multiplier.
Clone this object and return a new instance that the caller now owns.
Gets the random number generator.
The random number generator.
Gets the next boolean
true if [next bool]; otherwise, false.
Convert the acknowledgment mode string into AcknowledgementMode enum.
Equivalent enum value. If unknown string is encounted, it will default to AutoAcknowledge.
Convert an object into a text message. The object must be serializable to XML.
Convert an object into a text message. The object must be serializable to XML.
Convert a text message into an object. The object must be serializable from XML.
Serialize the object as XML into the Text body of the message.
Set the NMSType to the full name of the object type.
Deserialize the object from the text message. The object must be serializable from XML.
Get the runtime type for the class name. This routine will search all loaded
assemblies in the current App Domain to find the type.
Full name of the type.
Type object if found, or null if not found.
Decrement the count, releasing any waiting Threads when the count reaches Zero.
Causes the current Thread to wait for the count to reach zero, unless
the Thread is interrupted.
Causes the current thread to wait until the latch has counted down to zero, unless
the thread is interrupted, or the specified waiting time elapses.
Gets the current count for this Latch.
The start of the Windows epoch
The start of the Java epoch
The difference between the Windows epoch and the Java epoch
in milliseconds.
A BinaryWriter that switches the endian orientation of the read operations so that they
are compatible across platforms.
Method Read
An int
A char[]
An int
An int
Method ReadChars
A char[]
An int
Method ReadInt16
A short
Method ReadChar
A char
Method ReadInt64
A long
Method ReadUInt64
An ulong
Method ReadUInt32
An uint
Method ReadUInt16
An ushort
Method ReadInt32
An int
Method ReadString
A string
Method ReadString16, reads a String value encoded in the Java modified
UTF-8 format with a length index encoded as a 16bit unsigned short.
A string
Method ReadString32, reads a String value encoded in the Java modified
UTF-8 format with a length index encoded as a singed integer value.
A string
A BinaryWriter that switches the endian orientation of the write operations so that they
are compatible across platforms.
Method Write
A long
Method Write
An ushort
Method Write
An int
Method Write
A char[]
An int
An int
Method Write
A char[]
Method Write
An uint
Method Write
A char
Method Write
An ulong
Method Write
A short
Method Write, writes a string to the output using the WriteString16
method.
A string
Method WriteString16, writes a string to the output using the Java
standard modified UTF-8 encoding with an unsigned short value written first to
indicate the length of the encoded data, the short is read as an unsigned
value so the max amount of data this method can write is 65535 encoded bytes.
Unlike the WriteString32 method this method does not encode the length
value to -1 if the string is null, this is to match the behaviour of
the Java DataOuputStream class's writeUTF method.
Because modified UTF-8 encding can result in a number of bytes greater that
the size of the String this method must first check that the encoding proces
will not result in a value that cannot be written becuase it is greater than
the max value of an unsigned short.
A string
Method WriteString32, writes a string to the output using the Openwire
standard modified UTF-8 encoding which an int value written first to
indicate the length of the encoded data, the int is read as an signed
value so the max amount of data this method can write is 2^31 encoded bytes.
In the case of a null value being passed this method writes a -1 to the
stream to indicate that the string is null.
Because modified UTF-8 encding can result in a number of bytes greater that
the size of the String this method must first check that the encoding proces
will not result in a value that cannot be written becuase it is greater than
the max value of an int.
A string
Method Write
A double
Method Write
A double
Support class that switches from one endian to the other.
Utility class used to set NMS properties via introspection for IMessage derived
instances. This class allows IMessage classes to define Message specific properties
that can be accessed using the standard property get / set semantics.
This is especially useful for NMSX type properties which can vary by provider and
are obtianed via a call to IConnectionMetaData.NMSXPropertyNames. The client can
set the properties on an IMessage instance without a direct cast to the providers
specific Message types.
Properties accessed in this way are treated as NMS Message headers which are never
read-only therefore there is no exception thrown if the message itself is in the
read-only property mode.
This class provides a mechanism to intercept calls to a IPrimitiveMap
instance and perform validation, handle type conversion, or some other
function necessary to use the PrimitiveMap in a Message or other NMS
object.
Be default this class enforces the standard conversion policy for primitive
types in NMS shown in the table below:
| | 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
|----------------------------------------------------------------------
Represents a Map of primitive types where the keys are all string instances
and the values are strings or numbers.
Base Utility class for conversion between IMessage type objects for different
NMS providers.
Copies the standard NMS and user defined properties from the givem
message to the specified message, the class version transforms the
Destination instead of just doing a straight copy.
Copies the standard NMS and user defined properties from the givem
message to the specified message, this method makes no attempt to convert
the values in the Message to native provider implementations.
A default implementation of IPrimitiveMap
Method ToString
A string
Unmarshalls the map from the given data or if the data is null just
return an empty map
Unmarshals a PrimitiveMap directly from a Stream object. This
allows for clients to read PrimitiveMaps from Compressed or other
wise encoded streams without this class needing to know about it.
A
A
Marshals a PrimitiveMap directly to a Stream object. This
allows a client to write a PrimitiveMap in a compressed or
otherwise encoded form without this class needing to know
about it.
A
Marshals the primitive type map to a byte array
Unmarshals the primitive type map from the given byte array
Class to provide support for working with Session objects.
Get the destination by parsing the embedded type prefix. Default is Queue if no prefix is
embedded in the destinationName.
Session object to use to get the destination.
Name of destination with embedded prefix. The embedded prefix can be one of the following:
- queue://
- topic://
- temp-queue://
- temp-topic://
Get the destination by parsing the embedded type prefix.
Session object to use to get the destination.
Name of destination with embedded prefix. The embedded prefix can be one of the following:
- queue://
- topic://
- temp-queue://
- temp-topic://
Default type if no embedded prefix is specified.
Delete the named destination by parsing the embedded type prefix. Default is Queue if no prefix is
embedded in the destinationName.
Session object to use to get the destination.
Name of destination with embedded prefix. The embedded prefix can be one of the following:
- queue://
- topic://
- temp-queue://
- temp-topic://
Delete the named destination by parsing the embedded type prefix.
Session object to use to get the destination.
Name of destination with embedded prefix. The embedded prefix can be one of the following:
- queue://
- topic://
- temp-queue://
- temp-topic://
Default type if no embedded prefix is specified.
Class to provide support for Uri query parameters which uses .Net reflection
to identify and set properties.
Given a string that could be a Composite Uri that uses syntax not compatible
with the .NET Uri class such as an ActiveMQ failover Uri formatted as
"failover://(tcp://localhost:61616)", the initial '://' must be changed
to ':(' so that the Uri class doesn't attempt to parse the '(tcp:' as
the Uri's Authority as that is not a valid host name.
A string that could be a Composite Uri that uses syntax not compatible
with the .NET Uri class
Parse a Uri query string of the form ?x=y&z=0
into a map of name/value pairs.
The query string to parse. This string should not contain
Uri escape characters.
Sets the public properties of a target object using a string map.
This method uses .Net reflection to identify public properties of
the target object matching the keys from the passed map.
The object whose properties will be set.
Map of key/value pairs.
Sets the public properties of a target object using a string map.
This method uses .Net reflection to identify public properties of
the target object matching the keys from the passed map.
The object whose properties will be set.
Map of key/value pairs.
Key value prefix. This is prepended to the property name
before searching for a matching key value.
Class to provide support for working with Xml objects.
From xml spec valid chars:
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
Static class constructor.
Serialize the object to XML format. The XML encoding will be UTF-8. A Byte Order Mark (BOM)
will NOT be placed at the beginning of the string.
This removes characters that are invalid for xml encoding
Text to be encoded.
Text with invalid xml characters removed.
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.
Represents a message either to be sent to a message broker or received from a message broker.
If using client acknowledgement mode on the session, then this method will acknowledge that the
message has been processed correctly.
Clears out the message body. Clearing a message's body does not clear its header
values or property entries.
If this message body was read-only, calling this method leaves the message body in
the same state as an empty body in a newly created message.
Clears a message's properties.
The message's header fields and body are not cleared.
Provides access to the message properties (headers).
The correlation ID used to correlate messages from conversations or long running business processes.
The destination of the message. This property is set by the IMessageProducer.
The amount of time for which this message is valid. Zero if this message does not expire.
The message ID which is set by the provider.
Whether or not this message is persistent.
The Priority of this message.
Returns true if this message has been redelivered to this or another consumer before being acknowledged successfully.
The destination that the consumer of this message should send replies to
The timestamp of when the message was pubished in UTC time. If the publisher disables setting
the timestamp on the message, the time will be set to the start of the UNIX epoc (1970-01-01 00:00:00).
The type name of this message.
Reads a byte from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Writes a byte to the Message stream.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads a boolean from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Write a one byte value to the message stream representing the boolean
value passed.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads a char from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Write a two byte value to the message stream representing the character
value passed. High byte first.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads a Short from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Write a two byte value to the message stream representing the short
value passed. High byte first.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads an int from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Write a four byte value to the message stream representing the integer
value passed. High byte first.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads a long from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Write a eight byte value to the message stream representing the long
value passed. High byte first.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads a float from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Write a four byte value to the message stream representing the float
value passed. High byte first.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads an double from the Message Stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Write a eight byte value to the message stream representing the double
value passed. High byte first.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads a byte array from the bytes message stream.
If the length of array value is less than the number of bytes remaining to
be read from the stream, the array should be filled. A subsequent call reads
the next increment, and so on.
If the number of bytes remaining in the stream is less than the length of array
value, the bytes should be read into the array. The return value of the total number
of bytes read will be less than the length of the array, indicating that there are
no more bytes left to be read from the stream. The next read of the stream returns -1.
The byte array that will be used as a buffer to read into.
A
The number of bytes read into the passed byte array, or -1 if there are no more
bytes left to be read from the stream.
Thrown when there is an unhandled exception thrown from the provider.
Thrown when the Message is in write-only mode.
Reads a portion of the bytes message stream.
If the length of array value is less than the number of bytes remaining to be
read from the stream, the array should be filled. A subsequent call reads the
next increment, and so on.
If the number of bytes remaining in the stream is less than the length of array
value, the bytes should be read into the array. The return value of the total
number of bytes read will be less than the length of the array, indicating that
there are no more bytes left to be read from the stream. The next read of the
stream returns -1.
If length is negative, or length is greater than the length of the array value,
then an Exception is thrown. No bytes will be read from the stream for this
exception case.
The byte array that will be used as a buffer to read into.
The amount of bytes to read into the buffer.
A
The number of bytes read into the passed byte array, or -1 if there are no more
bytes left to be read from the stream.
Thrown when the Message is in write-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Writes a byte array to the bytes message stream.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Writes a portion of a byte array to the bytes message stream.
A
A
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Reads a string that has been encoded using a modified UTF-8 format from the bytes
message stream.
A
Thrown when the Message is in write-only mode.
Thrown when an unexpected end of bytes has been reached.
Thrown when there is an unhandled exception thrown from the provider.
Writes a string to the bytes message stream using UTF-8 encoding in a
machine-independent manner.
A
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Writes an object to the bytes message stream.
This method works only for the objectified primitive object types
(Int32, Double, Boolean ...), String objects, and byte arrays.
A
the object in the .NET programming language to be written; it must not be null
Thrown when the Message has an invalid format.
Thrown when the Message is in read-only mode.
Thrown when there is an unhandled exception thrown from the provider.
Puts the message body in read-only mode and repositions the stream of bytes to the beginning.
Thrown when the Message has an invalid format.
Thrown when there is an unhandled exception thrown from the provider.
Gets the number of bytes of the message body when the message is in read-only mode.
The value returned can be used to allocate a byte array. The value returned is the
entire length of the message body, regardless of where the pointer for reading the
message is currently located.
Thrown when the Message is in write-only mode.
Thrown when there is an unhandled exception thrown from the provider.
The mode used to acknowledge messages after they are consumed
With this acknowledgment mode, the session will not
acknowledge receipt of a message since the broker assumes
successful receipt of a message after the onMessage handler
has returned without error.
With this acknowledgment mode, the session automatically
acknowledges a client's receipt of a message either when
the session has successfully returned from a call to receive
or when the message listener the session has called to
process the message successfully returns. Acknowlegements
may be delayed in this mode to increase performance at
the cost of the message being redelivered this client fails.
With this acknowledgment mode, the client acknowledges a
consumed message by calling the message's acknowledge method.
This acknowledgement acknowledges the given message and all
unacknowedged messages that have preceeded it for the session
in which the message was delivered.
Messages will be consumed when the transaction commits.
With this acknowledgment mode, the client acknowledges a
consumed message by calling the message's acknowledge method.
This acknowledgement mode allows the client to acknowledge a
single message. This mode is not required to be supported by
all NMS providers, however the provider should throw an appropriate
exception to indicate that the mode is unsupported.
A delegate that can receive transport level exceptions.
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.
A delegate that is used by Fault tolerant NMS Implementation to notify their
clients that the Connection that was interrupted has now been restored.
Represents a connection with a message broker
A lifecycle for NMS objects to indicate they can be started
A lifecycle for NMS objects to indicate they can be stopped
Creates a new session to work on this connection
Creates a new session to work on this connection
Closes the connection.
For a long running Connection that creates many temp destinations
this method will close and destroy all previously created temp
destinations to reduce resource consumption. This can be useful
when the Connection is pooled or otherwise used for long periods
of time. Only locally created temp destinations should be removed
by this call.
NOTE: This is an optional operation and for NMS providers that
do not support this functionality the method should just return
without throwing any exceptions.
An asynchronous listener which can be notified if an error occurs
An asynchronous listener that is notified when a Fault tolerant connection
has been interrupted.
An asynchronous listener that is notified when a Fault tolerant connection
has been resumed.
A Delegate that is called each time a Message is dispatched to allow the client to do
any necessary transformations on the received message before it is delivered. The
Connection sets the provided delegate instance on each Session it creates which then
passes that along to the Consumers it creates.
A delegate that is called each time a Message is sent from this Producer which allows
the application to perform any needed transformations on the Message before it is sent.
The Connection sets the provided delegate instance on each Session it creates which then
passes that along to the Producer it creates.
The default timeout for network requests.
The default acknowledgement mode
Sets the unique clienet ID for this connection before Start() or returns the
unique client ID after the connection has started
Get/or set the redelivery policy for this connection.
Gets the Meta Data for the NMS Connection instance.
A Factory of IConnection objects
Creates a new connection
Creates a new connection with the given user name and password
Get/or set the broker Uri.
Get/or set the redelivery policy that new IConnection objects are
assigned upon creation.
A Delegate that is called each time a Message is dispatched to allow the client to do
any necessary transformations on the received message before it is delivered. The
ConnectionFactory sets the provided delegate instance on each Connection instance that
is created from this factory, each connection in turn passes the delegate along to each
Session it creates which then passes that along to the Consumers it creates.
A delegate that is called each time a Message is sent from this Producer which allows
the application to perform any needed transformations on the Message before it is sent.
The ConnectionFactory sets the provided delegate instance on each Connection instance that
is created from this factory, each connection in turn passes the delegate along to each
Session it creates which then passes that along to the Producers it creates.
Provides information describing the NMS IConnection instance.
Get the Major version number of the NMS API this Provider supports.
Get the Minor version number of the NMS API this Provider supports.
Get the name of this NMS Provider.
Gets a formatted string detailing the NMS API version this Provider supports.
Gets a String array of all the NMSX property names this NMS Provider supports.
Gets the Providers Major version number.
Gets the Providers Minor version number.
Gets a formatted string detailing the version of this NMS Provider.
Represents the type of the destination such as a queue or topic.
A base interface for destinations such as queues or topics
Represents an NMS exception
Initializes a new instance of the NMSException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
When overridden in a derived class, sets the SerializationInfo with information about the exception.
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Returns the error code for the exception, if one has been provided.
Initializes a new instance of the IllegalStateException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Represents a Map message which contains key and value pairs which are
of primitive types
A delegate that can receive messages async.
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.
A consumer of messages
Waits until a message is available and returns it
If a message is available within the timeout duration it is returned otherwise this method returns null
Receives the next message if one is immediately available for delivery on the client side
otherwise this method returns null. It is never an error for this method to return null, the
time of Message availability varies so your client cannot rely on this method to receive a
message immediately after one has been sent.
Closes the message consumer.
Clients should close message consumers them when they are not needed.
This call blocks until a receive or message listener in progress has completed.
A blocked message consumer receive call returns null when this message consumer is closed.
An asynchronous listener which can be used to consume messages asynchronously
A Delegate that is called each time a Message is dispatched to allow the client to do
any necessary transformations on the received message before it is delivered.
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.
An object capable of sending messages to some destination
Sends the message to the default destination for this producer
Sends the message to the default destination with the explicit QoS configuration
Sends the message to the given destination
Sends the message to the given destination with the explicit QoS configuration
Close the producer.
Creates a new message with an empty body
Creates a new text message with an empty body
Creates a new text message with the given body
Creates a new Map message which contains primitive key and value pairs
Creates a new Object message containing the given .NET object as the body
Creates a new binary message
Creates a new binary message with the given body
Creates a new stream message
A delegate that is called each time a Message is sent from this Producer which allows
the application to perform any needed transformations on the Message before it is sent.
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.
Creates a INetTxSession object.
Creates a INetTxSession object and enlists in the specified Transaction.
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.
Creates a new connection
Creates a new connection with the given user name and password
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.
Represents a single unit of work on an IConnection.
So the ISession can be used to perform transactional receive and sends
Creates a producer of messages
Creates a producer of messages on a given destination
Creates a consumer of messages on a given destination
Creates a consumer of messages on a given destination with a selector
Creates a consumer of messages on a given destination with a selector
Creates a named durable consumer of messages on a given destination with a selector
Deletes a durable consumer created with CreateDurableConsumer().
Name of the durable consumer
Creates a QueueBrowser object to peek at the messages on the specified queue.
A
A
If the Prodiver does not support creation of Queue Browsers.
Creates a QueueBrowser object to peek at the messages on the specified queue
using a message selector.
A
A
A
If the Prodiver does not support creation of Queue Browsers.
Returns the queue for the given name
Returns the topic for the given name
Creates a temporary queue
Creates a temporary topic
Delete a destination (Queue, Topic, Temp Queue, Temp Topic).
Creates a new message with an empty body
Creates a new text message with an empty body
Creates a new text message with the given body
Creates a new Map message which contains primitive key and value pairs
Creates a new Object message containing the given .NET object as the body
Creates a new binary message
Creates a new binary message with the given body
Creates a new stream message
Closes the session. There is no need to close the producers and consumers
of a closed session.
Stops all Message delivery in this session and restarts it again
with the oldest unabcknowledged message. Messages that were delivered
but not acknowledge should have their redelivered property set.
This is an optional method that may not by implemented by all NMS
providers, if not implemented an Exception will be thrown.
Message redelivery is not requried to be performed in the original
order. It is not valid to call this method on a Transacted Session.
If this is a transactional session then commit all message
send and acknowledgements for producers and consumers in this session
If this is a transactional session then rollback all message
send and acknowledgements for producers and consumers in this session
A Delegate that is called each time a Message is dispatched to allow the client to do
any necessary transformations on the received message before it is delivered.
The Session instance sets the delegate on each Consumer it creates.
A delegate that is called each time a Message is sent from this Producer which allows
the application to perform any needed transformations on the Message before it is sent.
The Session instance sets the delegate on each Producer it creates.
Enlist the Session in the specified Transaction.
If the Session is already enlisted in a Transaction or there is an Ambient
Transaction and the given TX is not that Transaction then an exception should
be thrown.
Initializes a new instance of the InvalidClientIDException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
An attempt is made to access an invalid destination
Initializes a new instance of the InvalidDestinationException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Initializes a new instance of the InvalidSelectorException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Represents an Object message which contains a serializable .Net object.
Represents a queue in a message broker. A message sent to a queue is delivered
to at most one consumer on the queue.
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.
Closes the QueueBrowser.
If NMS Provider fails to close the Browser for some reason.
Gets this queue browser's message selector expression. If no Message
selector was specified than this method returns null.
If NMS Provider fails to get the Message Selector for some reason.
Gets the queue associated with this queue browser.
If NMS Provider fails to retrieve the IQueue associated with the Browser
doe to some internal error.
A delegate that is notified whenever a Transational evemt occurs for
the specified session such as TX started, committed or rolled back.
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
|----------------------------------------------------------------------
Reads a boolean from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a byte from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a byte array field from the stream message into the specified byte[]
object (the read buffer).
To read the field value, ReadBytes should be successively called until it returns
a value less than the length of the read buffer. The value of the bytes in the
buffer following the last byte read is undefined.
If ReadBytes returns a value equal to the length of the buffer, a subsequent
ReadBytes call must be made. If there are no more bytes to be read, this call
returns -1.
If the byte array field value is null, ReadBytes returns -1.
If the byte array field value is empty, ReadBytes returns 0.
Once the first ReadBytes call on a byte[] field value has been made, the full
value of the field must be read before it is valid to read the next field.
An attempt to read the next field before that has been done will throw a
MessageFormatException.
To read the byte field value into a new byte[] object, use the ReadObject method.
A
A
the total number of bytes read into the buffer, or -1 if there is no more data
because the end of the byte field has been reached
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a char from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a short from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a int from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a long from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a float from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a double from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a string from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Reads a Object from the stream message.
A
if the NMS provider fails to read the message due to some internal error.
if unexpected end of message stream has been reached.
if this type conversion is invalid.
if the message is in write-only mode.
Writes a boolean to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a byte to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a byte array field to the stream message.
The byte array value is written to the message as a byte array field.
Consecutively written byte array fields are treated as two distinct
fields when the fields are read.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a portion of a byte array as a byte array field to the stream message.
The a portion of the byte array value is written to the message as a byte
array field. Consecutively written byte array fields are treated as two distinct
fields when the fields are read.
A
A value that indicates the point in the buffer to
begin writing to the stream message.
A value that indicates how many bytes in the buffer
to write to the stream message.
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a char to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a short to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a int to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a long to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a float to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a double to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a string to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Writes a boolean to the stream message.
A
if the NMS provider fails to write to the message due to some internal error.
if the message is in read-only mode.
Puts the message body in read-only mode and repositions the stream to the beginning.
Thrown when the Message has an invalid format.
Thrown when there is an unhandled exception thrown from the provider.
Represents a temporary queue which exists for the duration
of the IConnection which created it.
Deletes this Temporary Destination, If there are existing receivers
still using it, a NMSException will be thrown.
If NMS Provider fails to Delete the Temp Destination or the client does
not support this operation.
Represents a temporary topic which exists for the duration
of the IConnection which created it.
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.
Deletes this Temporary Destination, If there are existing receivers
still using it, a NMSException will be thrown.
If NMS Provider fails to Delete the Temp Destination or the client does
not support this operation.
Represents a text based message
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.
Use the class to register an instance of ITrace as the
active trace destination.
Receives the message from the destination for this consumer. The object must be de-serializable from XML.
Receives the message from the destination for this consumer. The object must be de-serializable from XML.
Receives the message from the destination for this consumer. The object must be de-serializable from XML.
Initializes a new instance of the MessageEOFException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Deserializes the object from Xml, and returns it.
Deserializes the object from Xml, and returns it.
Initializes a new instance of the MessageFormatException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Initializes a new instance of the MessageNotReadableException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Initializes a new instance of the MessageNotWriteableException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Extension function to create a text message from an object. The object must be serializable to XML.
Sends the message to the default destination for this producer. The object must be serializable to XML.
Sends the message to the default destination with the explicit QoS configuration. The object must be serializable to XML.
Sends the message to the given destination
Sends the message to the given destination with the explicit QoS configuration. The object must be serializable to XML.
Represents a connection failure.
Initializes a new instance of the NMSConnectionException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Provider implementation mapping class.
Implementation of a factory for instances.
Static class constructor
The ConnectionFactory object must define a constructor that takes as a minimum a Uri object.
Any additional parameters are optional, but will typically include a Client ID string.
The URI for the ActiveMQ provider.
Optional parameters to use when creating the ConnectionFactory.
The ConnectionFactory object must define a constructor that takes as a minimum a Uri object.
Any additional parameters are optional, but will typically include a Client ID string.
The URI for the ActiveMQ provider.
Optional parameters to use when creating the ConnectionFactory.
Create a connection factory that can create connections for the given scheme in the URI.
The URI for the ActiveMQ provider.
Optional parameters to use when creating the ConnectionFactory.
A implementation that will be used.
Finds the associated with the given scheme.
The scheme (e.g. tcp, activemq or stomp).
The of the ConnectionFactory that will be used
to create the connection for the specified .
Lookup the connection factory assembly filename and class name.
Read an external configuration file that maps scheme to provider implementation.
Load XML config files named: nmsprovider-{scheme}.config
Following is a sample configuration file named nmsprovider-jms.config. Replace
the parenthesis with angle brackets for proper XML formatting.
(?xml version="1.0" encoding="utf-8" ?)
(configuration)
(provider assembly="MyCompany.NMS.JMSProvider.dll" classFactory="MyCompany.NMS.JMSProvider.ConnectionFactory"/)
(/configuration)
This configuration file would be loaded and parsed when a connection uri with a scheme of 'jms'
is used for the provider. In this example the connection string might look like:
jms://localhost:7222
Folder paths to look in.
The scheme.
Name of the assembly file.
Name of the factory class.
true if the configuration file for the specified could
be found; otherwise, false.
Get an array of search paths to look for config files.
A collection of search paths, including the current directory, the current AppDomain's
BaseDirectory and the current AppDomain's RelativeSearchPath.
Converts a params object[] collection into a plain object[]s, to pass to the constructor.
The first parameter in the collection.
The remaining parameters.
An array of instances.
Creates a new connection.
An created by the requested ConnectionFactory.
Creates a new connection with the given and credentials.
The username to use when establishing the connection.
The password to use when establishing the connection.
An created by the requested ConnectionFactory.
Get/or set the broker Uri.
The actual IConnectionFactory implementation that is being used. This implementation
depends on the scheme of the URI used when constructed.
Get/or Set the IRedeliveryPolicy instance using the IConnectionFactory implementation
that is being used.
Get/or Set the ConsumerTransformerDelegate using the IConnectionFactory implementation
that is currently being used.
Get/or Set the ProducerTransformerDelegate using the IConnectionFactory implementation
that is currently being used.
Define an enumerated array of message priorities.
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.
Defines a number of constants
Represents a security failure.
Initializes a new instance of the NMSSecurityException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Initializes a new instance of the ResourceAllocationException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Extension function to create a text message from an object. The object must be serializable to XML.
Extension function to get the destination by parsing the embedded type prefix. Default is Queue if no prefix is
embedded in the destinationName.
Extension function to get the destination by parsing the embedded type prefix.
Extension function to get the destination by parsing the embedded type prefix.
Extension function to get the destination by parsing the embedded type prefix.
Extension function to delete the named destination by parsing the embedded type prefix. Default is Queue if no prefix is
embedded in the destinationName.
Extension function to delete the named destination by parsing the embedded type prefix.
Extension function to delete the named destination by parsing the embedded type prefix.
Extension function to delete the named destination by parsing the embedded type prefix.
Initializes a new instance of the TransactionInProgressException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.
Initializes a new instance of the TransactionRolledBackException class with serialized data.
Throws System.ArgumentNullException if the info parameter is null.
Throws System.Runtime.Serialization.SerializationException if the class name is null or System.Exception.HResult is zero (0).
The SerializationInfo that holds the serialized object data about the exception being thrown.
The StreamingContext that contains contextual information about the source or destination.