Interface IConnection
Represents a connection with a message broker
Inherited Members
Namespace: Apache.NMS
Assembly: Apache.NMS.dll
Syntax
public interface IConnection : IDisposable, IStartable, IStoppable
Properties
| Improve this Doc View SourceAcknowledgementMode
The default acknowledgement mode
Declaration
AcknowledgementMode AcknowledgementMode { get; set; }
Property Value
Type | Description |
---|---|
AcknowledgementMode |
ClientId
Sets the unique clienet ID for this connection before Start() or returns the unique client ID after the connection has started
Declaration
string ClientId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
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 Connection sets the provided delegate instance on each Session it creates which then passes that along to the Consumers it creates.
Declaration
ConsumerTransformerDelegate ConsumerTransformer { get; set; }
Property Value
Type | Description |
---|---|
ConsumerTransformerDelegate |
MetaData
Gets the Meta Data for the NMS Connection instance.
Declaration
IConnectionMetaData MetaData { get; }
Property Value
Type | Description |
---|---|
IConnectionMetaData |
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 Connection sets the provided delegate instance on each Session it creates which then passes that along to the Producer it creates.
Declaration
ProducerTransformerDelegate ProducerTransformer { get; set; }
Property Value
Type | Description |
---|---|
ProducerTransformerDelegate |
RedeliveryPolicy
Get/or set the redelivery policy for this connection.
Declaration
IRedeliveryPolicy RedeliveryPolicy { get; set; }
Property Value
Type | Description |
---|---|
IRedeliveryPolicy |
RequestTimeout
The default timeout for network requests.
Declaration
TimeSpan RequestTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Methods
| Improve this Doc View SourceClose()
Closes the connection.
Declaration
void Close()
CreateSession()
Creates a new session to work on this connection
Declaration
ISession CreateSession()
Returns
Type | Description |
---|---|
ISession |
CreateSession(AcknowledgementMode)
Creates a new session to work on this connection
Declaration
ISession CreateSession(AcknowledgementMode acknowledgementMode)
Parameters
Type | Name | Description |
---|---|---|
AcknowledgementMode | acknowledgementMode |
Returns
Type | Description |
---|---|
ISession |
PurgeTempDestinations()
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.
Declaration
void PurgeTempDestinations()
Events
| Improve this Doc View SourceConnectionInterruptedListener
An asynchronous listener that is notified when a Fault tolerant connection has been interrupted.
Declaration
event ConnectionInterruptedListener ConnectionInterruptedListener
Event Type
Type | Description |
---|---|
ConnectionInterruptedListener |
ConnectionResumedListener
An asynchronous listener that is notified when a Fault tolerant connection has been resumed.
Declaration
event ConnectionResumedListener ConnectionResumedListener
Event Type
Type | Description |
---|---|
ConnectionResumedListener |
ExceptionListener
An asynchronous listener which can be notified if an error occurs
Declaration
event ExceptionListener ExceptionListener
Event Type
Type | Description |
---|---|
ExceptionListener |