The ISession type exposes the following members.

Methods

  NameDescription
Public methodClose
Closes the session. There is no need to close the producers and consumers of a closed session.
Public methodCommit
If this is a transactional session then commit all message send and acknowledgements for producers and consumers in this session
Public methodCreateBrowser(IQueue)
Creates a QueueBrowser object to peek at the messages on the specified queue.
Public methodCreateBrowser(IQueue, String)
Creates a QueueBrowser object to peek at the messages on the specified queue using a message selector.
Public methodCreateBytesMessage()()()()
Creates a new binary message
Public methodCreateBytesMessage(array<Byte>[]()[][])
Creates a new binary message with the given body
Public methodCreateConsumer(IDestination)
Creates a consumer of messages on a given destination
Public methodCreateConsumer(IDestination, String)
Creates a consumer of messages on a given destination with a selector
Public methodCreateConsumer(IDestination, String, Boolean)
Creates a consumer of messages on a given destination with a selector
Public methodCreateDurableConsumer
Creates a named durable consumer of messages on a given destination with a selector
Public methodCreateMapMessage
Creates a new Map message which contains primitive key and value pairs
Public methodCreateMessage
Creates a new message with an empty body
Public methodCreateObjectMessage
Creates a new Object message containing the given .NET object as the body
Public methodCreateProducer()()()()
Creates a producer of messages
Public methodCreateProducer(IDestination)
Creates a producer of messages on a given destination
Public methodCreateStreamMessage
Creates a new stream message
Public methodCreateTemporaryQueue
Creates a temporary queue
Public methodCreateTemporaryTopic
Creates a temporary topic
Public methodCreateTextMessage()()()()
Creates a new text message with an empty body
Public methodCreateTextMessage(String)
Creates a new text message with the given body
Public methodDeleteDestination
Delete a destination (Queue, Topic, Temp Queue, Temp Topic).
Public methodDeleteDurableConsumer
Deletes a durable consumer created with CreateDurableConsumer().
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
Public methodGetQueue
Returns the queue for the given name
Public methodGetTopic
Returns the topic for the given name
Public methodRecover
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.
Public methodRollback
If this is a transactional session then rollback all message send and acknowledgements for producers and consumers in this session

Extension Methods

  NameDescription
Public Extension MethodCreateXmlMessage
Extension function to create a text message from an object. The object must be serializable to XML.
(Defined by SessionExtensions.)
Public Extension MethodDeleteDestination(String)Overloaded.
Extension function to delete the named destination by parsing the embedded type prefix. Default is Queue if no prefix is embedded in the destinationName.
(Defined by SessionExtensions.)
Public Extension MethodDeleteDestination(String, DestinationType)Overloaded.
Extension function to delete the named destination by parsing the embedded type prefix.
(Defined by SessionExtensions.)
Public Extension MethodDeleteQueue
Extension function to delete the named destination by parsing the embedded type prefix.
(Defined by SessionExtensions.)
Public Extension MethodDeleteTopic
Extension function to delete the named destination by parsing the embedded type prefix.
(Defined by SessionExtensions.)
Public Extension MethodGetDestination(String)Overloaded.
Extension function to get the destination by parsing the embedded type prefix. Default is Queue if no prefix is embedded in the destinationName.
(Defined by SessionExtensions.)
Public Extension MethodGetDestination(String, DestinationType)Overloaded.
Extension function to get the destination by parsing the embedded type prefix.
(Defined by SessionExtensions.)

Properties

  NameDescription
Public propertyAcknowledgementMode
Public propertyConsumerTransformer
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.
Public propertyProducerTransformer
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.
Public propertyRequestTimeout
Public propertyTransacted

Events

See Also