Table of Contents

Class Session

Namespace
Apache.NMS.ActiveMQ
Assembly
Apache.NMS.ActiveMQ.dll
public class Session : ISession, IDisposable, IDispatcher
Inheritance
Session
Implements
ISession
Derived
Inherited Members

Constructors

Session(Connection, SessionId, AcknowledgementMode)

public Session(Connection connection, SessionId sessionId, AcknowledgementMode acknowledgementMode)

Parameters

connection Connection
sessionId SessionId
acknowledgementMode AcknowledgementMode

Fields

clearInProgress

protected Atomic<bool> clearInProgress

Field Value

Atomic<bool>

closed

protected bool closed

Field Value

bool

closing

protected bool closing

Field Value

bool

disposed

protected bool disposed

Field Value

bool

Properties

AcknowledgementMode

public virtual AcknowledgementMode AcknowledgementMode { get; }

Property Value

AcknowledgementMode

CloseStopTimeout

public long CloseStopTimeout { get; set; }

Property Value

long

Connection

public Connection Connection { get; }

Property Value

Connection

ConsumerTransformer

public ConsumerTransformerDelegate ConsumerTransformer { get; set; }

Property Value

ConsumerTransformerDelegate

DispatchAsync

public bool DispatchAsync { get; set; }

Property Value

bool

DisposeStopTimeout

public long DisposeStopTimeout { get; set; }

Property Value

long

Exclusive

public bool Exclusive { get; set; }

Property Value

bool

Executor

public SessionExecutor Executor { get; }

Property Value

SessionExecutor

IsAutoAcknowledge

public virtual bool IsAutoAcknowledge { get; }

Property Value

bool

IsClientAcknowledge

public virtual bool IsClientAcknowledge { get; }

Property Value

bool

IsDupsOkAcknowledge

public virtual bool IsDupsOkAcknowledge { get; }

Property Value

bool

IsIndividualAcknowledge

public virtual bool IsIndividualAcknowledge { get; }

Property Value

bool

IsTransacted

public virtual bool IsTransacted { get; }

Property Value

bool

MaximumPendingMessageLimit

public int MaximumPendingMessageLimit { set; }

Property Value

int

NextDeliveryId

public long NextDeliveryId { get; }

Property Value

long

Priority

public byte Priority { get; set; }

Property Value

byte

ProducerTransformer

public ProducerTransformerDelegate ProducerTransformer { get; set; }

Property Value

ProducerTransformerDelegate

RequestTimeout

public TimeSpan RequestTimeout { get; set; }

Property Value

TimeSpan

Retroactive

public bool Retroactive { get; set; }

Property Value

bool

SessionId

public SessionId SessionId { get; }

Property Value

SessionId

Started

public bool Started { get; }

Property Value

bool

Transacted

public bool Transacted { get; }

Property Value

bool

TransactionContext

public TransactionContext TransactionContext { get; }

Property Value

TransactionContext

Methods

AddConsumer(MessageConsumer)

public void AddConsumer(MessageConsumer consumer)

Parameters

consumer MessageConsumer

AddProducer(MessageProducer)

public void AddProducer(MessageProducer producer)

Parameters

producer MessageProducer

Close()

public virtual void Close()

Commit()

public void Commit()

CreateBrowser(IQueue)

public IQueueBrowser CreateBrowser(IQueue queue)

Parameters

queue IQueue

Returns

IQueueBrowser

CreateBrowser(IQueue, string)

public IQueueBrowser CreateBrowser(IQueue queue, string selector)

Parameters

queue IQueue
selector string

Returns

IQueueBrowser

CreateBytesMessage()

public IBytesMessage CreateBytesMessage()

Returns

IBytesMessage

CreateBytesMessage(byte[])

public IBytesMessage CreateBytesMessage(byte[] body)

Parameters

body byte[]

Returns

IBytesMessage

CreateConsumer(IDestination)

public IMessageConsumer CreateConsumer(IDestination destination)

Parameters

destination IDestination

Returns

IMessageConsumer

CreateConsumer(IDestination, string)

public IMessageConsumer CreateConsumer(IDestination destination, string selector)

Parameters

destination IDestination
selector string

Returns

IMessageConsumer

CreateConsumer(IDestination, string, bool)

public IMessageConsumer CreateConsumer(IDestination destination, string selector, bool noLocal)

Parameters

destination IDestination
selector string
noLocal bool

Returns

IMessageConsumer

CreateDurableConsumer(ITopic, string, string, bool)

public IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal)

Parameters

destination ITopic
name string
selector string
noLocal bool

Returns

IMessageConsumer

CreateMapMessage()

public IMapMessage CreateMapMessage()

Returns

IMapMessage

CreateMessage()

public IMessage CreateMessage()

Returns

IMessage

CreateObjectMessage(object)

public IObjectMessage CreateObjectMessage(object body)

Parameters

body object

Returns

IObjectMessage

CreateProducer()

public IMessageProducer CreateProducer()

Returns

IMessageProducer

CreateProducer(IDestination)

public IMessageProducer CreateProducer(IDestination destination)

Parameters

destination IDestination

Returns

IMessageProducer

CreateStreamMessage()

public IStreamMessage CreateStreamMessage()

Returns

IStreamMessage

CreateTemporaryQueue()

public ITemporaryQueue CreateTemporaryQueue()

Returns

ITemporaryQueue

CreateTemporaryTopic()

public ITemporaryTopic CreateTemporaryTopic()

Returns

ITemporaryTopic

CreateTextMessage()

public ITextMessage CreateTextMessage()

Returns

ITextMessage

CreateTextMessage(string)

public ITextMessage CreateTextMessage(string text)

Parameters

text string

Returns

ITextMessage

CreateTransactionContext()

protected virtual TransactionContext CreateTransactionContext()

Returns

TransactionContext

DeleteDestination(IDestination)

public void DeleteDestination(IDestination destination)

Parameters

destination IDestination

DeleteDurableConsumer(string)

public void DeleteDurableConsumer(string name)

Parameters

name string

Dispatch(MessageDispatch)

public void Dispatch(MessageDispatch dispatch)

Parameters

dispatch MessageDispatch

Dispose()

public void Dispose()

Dispose(bool)

protected void Dispose(bool disposing)

Parameters

disposing bool

~Session()

protected ~Session()

GetNextConsumerId()

public ConsumerId GetNextConsumerId()

Returns

ConsumerId

GetNextProducerId()

public ProducerId GetNextProducerId()

Returns

ProducerId

GetQueue(string)

public IQueue GetQueue(string name)

Parameters

name string

Returns

IQueue

GetTopic(string)

public ITopic GetTopic(string name)

Parameters

name string

Returns

ITopic

Recover()

public void Recover()

RemoveConsumer(MessageConsumer)

public void RemoveConsumer(MessageConsumer consumer)

Parameters

consumer MessageConsumer

RemoveProducer(ProducerId)

public void RemoveProducer(ProducerId objectId)

Parameters

objectId ProducerId

Rollback()

public void Rollback()

Start()

public void Start()

Stop()

public void Stop()

Events

TransactionCommittedListener

public event SessionTxEventDelegate TransactionCommittedListener

Event Type

SessionTxEventDelegate

TransactionRolledBackListener

public event SessionTxEventDelegate TransactionRolledBackListener

Event Type

SessionTxEventDelegate

TransactionStartedListener

public event SessionTxEventDelegate TransactionStartedListener

Event Type

SessionTxEventDelegate