Show / Hide Table of Contents

    Interface ISession

    Represents a single unit of work on an IConnection. So the ISession can be used to perform transactional receive and sends

    Inherited Members
    System.IDisposable.Dispose()
    Namespace: Apache.NMS
    Assembly: Apache.NMS.dll
    Syntax
    public interface ISession : IDisposable

    Properties

    | Improve this Doc View Source

    AcknowledgementMode

    Declaration
    AcknowledgementMode AcknowledgementMode { get; }
    Property Value
    Type Description
    AcknowledgementMode
    | Improve this Doc View Source

    ConsumerTransformer

    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.

    Declaration
    ConsumerTransformerDelegate ConsumerTransformer { get; set; }
    Property Value
    Type Description
    ConsumerTransformerDelegate
    | Improve this Doc View Source

    ProducerTransformer

    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.

    Declaration
    ProducerTransformerDelegate ProducerTransformer { get; set; }
    Property Value
    Type Description
    ProducerTransformerDelegate
    | Improve this Doc View Source

    RequestTimeout

    Declaration
    TimeSpan RequestTimeout { get; set; }
    Property Value
    Type Description
    System.TimeSpan
    | Improve this Doc View Source

    Transacted

    Declaration
    bool Transacted { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    | Improve this Doc View Source

    Acknowledge()

    Declaration
    void Acknowledge()
    | Improve this Doc View Source

    Close()

    Closes the session. There is no need to close the producers and consumers of a closed session.

    Declaration
    void Close()
    | Improve this Doc View Source

    Commit()

    If this is a transactional session then commit all message send and acknowledgements for producers and consumers in this session

    Declaration
    void Commit()
    | Improve this Doc View Source

    CreateBrowser(IQueue)

    Creates a QueueBrowser object to peek at the messages on the specified queue.

    Declaration
    IQueueBrowser CreateBrowser(IQueue queue)
    Parameters
    Type Name Description
    IQueue queue

    A IQueue

    Returns
    Type Description
    IQueueBrowser

    A IQueueBrowser

    Exceptions
    Type Condition
    System.NotSupportedException

    If the Prodiver does not support creation of Queue Browsers.

    | Improve this Doc View Source

    CreateBrowser(IQueue, String)

    Creates a QueueBrowser object to peek at the messages on the specified queue using a message selector.

    Declaration
    IQueueBrowser CreateBrowser(IQueue queue, string selector)
    Parameters
    Type Name Description
    IQueue queue

    A IQueue

    System.String selector

    A System.String

    Returns
    Type Description
    IQueueBrowser

    A IQueueBrowser

    Exceptions
    Type Condition
    System.NotSupportedException

    If the Prodiver does not support creation of Queue Browsers.

    | Improve this Doc View Source

    CreateBytesMessage()

    Creates a new binary message

    Declaration
    IBytesMessage CreateBytesMessage()
    Returns
    Type Description
    IBytesMessage
    | Improve this Doc View Source

    CreateBytesMessage(Byte[])

    Creates a new binary message with the given body

    Declaration
    IBytesMessage CreateBytesMessage(byte[] body)
    Parameters
    Type Name Description
    System.Byte[] body
    Returns
    Type Description
    IBytesMessage
    | Improve this Doc View Source

    CreateConsumer(IDestination)

    Creates a consumer of messages on a given destination

    Declaration
    IMessageConsumer CreateConsumer(IDestination destination)
    Parameters
    Type Name Description
    IDestination destination
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateConsumer(IDestination, String)

    Creates a consumer of messages on a given destination with a selector

    Declaration
    IMessageConsumer CreateConsumer(IDestination destination, string selector)
    Parameters
    Type Name Description
    IDestination destination
    System.String selector
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateConsumer(IDestination, String, Boolean)

    Creates a consumer of messages on a given destination with a selector

    Declaration
    IMessageConsumer CreateConsumer(IDestination destination, string selector, bool noLocal)
    Parameters
    Type Name Description
    IDestination destination
    System.String selector
    System.Boolean noLocal
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateDurableConsumer(ITopic, String)

    Declaration
    IMessageConsumer CreateDurableConsumer(ITopic destination, string name)
    Parameters
    Type Name Description
    ITopic destination
    System.String name
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateDurableConsumer(ITopic, String, String)

    Declaration
    IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector)
    Parameters
    Type Name Description
    ITopic destination
    System.String name
    System.String selector
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateDurableConsumer(ITopic, String, String, Boolean)

    Creates a named durable consumer of messages on a given destination with a selector

    Declaration
    IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal)
    Parameters
    Type Name Description
    ITopic destination
    System.String name
    System.String selector
    System.Boolean noLocal
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateMapMessage()

    Creates a new Map message which contains primitive key and value pairs

    Declaration
    IMapMessage CreateMapMessage()
    Returns
    Type Description
    IMapMessage
    | Improve this Doc View Source

    CreateMessage()

    Creates a new message with an empty body

    Declaration
    IMessage CreateMessage()
    Returns
    Type Description
    IMessage
    | Improve this Doc View Source

    CreateObjectMessage(Object)

    Creates a new Object message containing the given .NET object as the body

    Declaration
    IObjectMessage CreateObjectMessage(object body)
    Parameters
    Type Name Description
    System.Object body
    Returns
    Type Description
    IObjectMessage
    | Improve this Doc View Source

    CreateProducer()

    Creates a producer of messages

    Declaration
    IMessageProducer CreateProducer()
    Returns
    Type Description
    IMessageProducer
    | Improve this Doc View Source

    CreateProducer(IDestination)

    Creates a producer of messages on a given destination

    Declaration
    IMessageProducer CreateProducer(IDestination destination)
    Parameters
    Type Name Description
    IDestination destination
    Returns
    Type Description
    IMessageProducer
    | Improve this Doc View Source

    CreateSharedConsumer(ITopic, String)

    Declaration
    IMessageConsumer CreateSharedConsumer(ITopic destination, string name)
    Parameters
    Type Name Description
    ITopic destination
    System.String name
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateSharedConsumer(ITopic, String, String)

    Declaration
    IMessageConsumer CreateSharedConsumer(ITopic destination, string name, string selector)
    Parameters
    Type Name Description
    ITopic destination
    System.String name
    System.String selector
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateSharedDurableConsumer(ITopic, String)

    Declaration
    IMessageConsumer CreateSharedDurableConsumer(ITopic destination, string name)
    Parameters
    Type Name Description
    ITopic destination
    System.String name
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateSharedDurableConsumer(ITopic, String, String)

    Declaration
    IMessageConsumer CreateSharedDurableConsumer(ITopic destination, string name, string selector)
    Parameters
    Type Name Description
    ITopic destination
    System.String name
    System.String selector
    Returns
    Type Description
    IMessageConsumer
    | Improve this Doc View Source

    CreateStreamMessage()

    Creates a new stream message

    Declaration
    IStreamMessage CreateStreamMessage()
    Returns
    Type Description
    IStreamMessage
    | Improve this Doc View Source

    CreateTemporaryQueue()

    Creates a temporary queue

    Declaration
    ITemporaryQueue CreateTemporaryQueue()
    Returns
    Type Description
    ITemporaryQueue
    | Improve this Doc View Source

    CreateTemporaryTopic()

    Creates a temporary topic

    Declaration
    ITemporaryTopic CreateTemporaryTopic()
    Returns
    Type Description
    ITemporaryTopic
    | Improve this Doc View Source

    CreateTextMessage()

    Creates a new text message with an empty body

    Declaration
    ITextMessage CreateTextMessage()
    Returns
    Type Description
    ITextMessage
    | Improve this Doc View Source

    CreateTextMessage(String)

    Creates a new text message with the given body

    Declaration
    ITextMessage CreateTextMessage(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type Description
    ITextMessage
    | Improve this Doc View Source

    DeleteDestination(IDestination)

    Delete a destination (Queue, Topic, Temp Queue, Temp Topic).

    Declaration
    void DeleteDestination(IDestination destination)
    Parameters
    Type Name Description
    IDestination destination
    | Improve this Doc View Source

    DeleteDurableConsumer(String)

    Deletes a durable consumer created with CreateDurableConsumer().

    Declaration
    [Obsolete("should use unsubscribe instead")]
    void DeleteDurableConsumer(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the durable consumer

    | Improve this Doc View Source

    GetQueue(String)

    Returns the queue for the given name

    Declaration
    IQueue GetQueue(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    IQueue
    | Improve this Doc View Source

    GetTopic(String)

    Returns the topic for the given name

    Declaration
    ITopic GetTopic(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    ITopic
    | Improve this Doc View Source

    Recover()

    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.

    Declaration
    void Recover()
    | Improve this Doc View Source

    Rollback()

    If this is a transactional session then rollback all message send and acknowledgements for producers and consumers in this session

    Declaration
    void Rollback()
    | Improve this Doc View Source

    Unsubscribe(String)

    Declaration
    void Unsubscribe(string name)
    Parameters
    Type Name Description
    System.String name

    Events

    | Improve this Doc View Source

    TransactionCommittedListener

    Declaration
    event SessionTxEventDelegate TransactionCommittedListener
    Event Type
    Type Description
    SessionTxEventDelegate
    | Improve this Doc View Source

    TransactionRolledBackListener

    Declaration
    event SessionTxEventDelegate TransactionRolledBackListener
    Event Type
    Type Description
    SessionTxEventDelegate
    | Improve this Doc View Source

    TransactionStartedListener

    Declaration
    event SessionTxEventDelegate TransactionStartedListener
    Event Type
    Type Description
    SessionTxEventDelegate
    • Improve this Doc
    • View Source
    Back to top Copyright © 2005-2019 Apache Software Foundation project
    Generated by DocFX