Show / Hide Table of Contents

# Class InactivityMonitor

This class make sure that the connection is still alive, by monitoring the reception of commands from the peer of the transport.

##### Inheritance

System.Object
TransportFilter
InactivityMonitor

##### Implements

ITransport
Apache.NMS.IStartable
System.IDisposable
Apache.NMS.IStoppable

##### Inherited Members

TransportFilter.next
TransportFilter.commandHandler
TransportFilter.exceptionHandler
TransportFilter.interruptedHandler
TransportFilter.resumedHandler
TransportFilter.OnInterrupted(ITransport)
TransportFilter.OnResumed(ITransport)
TransportFilter.AsyncRequest(Command)
TransportFilter.Request(Command)
TransportFilter.Request(Command, TimeSpan)
TransportFilter.Start()
TransportFilter.IsStarted
TransportFilter.Dispose()
TransportFilter.IsDisposed
TransportFilter.Command
TransportFilter.Exception
TransportFilter.Interrupted
TransportFilter.Resumed
TransportFilter.Narrow(Type)
TransportFilter.Timeout
TransportFilter.AsyncTimeout
TransportFilter.IsFaultTolerant
TransportFilter.IsConnected
TransportFilter.RemoteAddress
TransportFilter.IsReconnectSupported
TransportFilter.IsUpdateURIsSupported
TransportFilter.UpdateURIs(Boolean, Uri[])
TransportFilter.WireFormat
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Apache.NMS.ActiveMQ.Transport

###### Assembly: Apache.NMS.ActiveMQ.dll

##### Syntax

    public class InactivityMonitor : TransportFilter, ITransport, IStartable, IDisposable, IStoppable

### Constructors

| Improve this Doc View Source

#### InactivityMonitor(ITransport)

Constructor or the Inactivity Monitor

##### Declaration

    public InactivityMonitor(ITransport next)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | next |

### Properties

| Improve this Doc View Source

#### InitialDelayTime

##### Declaration

    public long InitialDelayTime { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int64 |

| Improve this Doc View Source

#### KeepAliveResponseRequired

##### Declaration

    public bool KeepAliveResponseRequired { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### ReadCheckTime

##### Declaration

    public long ReadCheckTime { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int64 |

| Improve this Doc View Source

#### WriteCheckTime

##### Declaration

    public long WriteCheckTime { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int64 |

### Methods

| Improve this Doc View Source

#### AllowReadCheck(TimeSpan)

Checks if we should allow the read check(if less than 90% of the read check time elapsed then we dont do the readcheck

##### Declaration

    public bool AllowReadCheck(TimeSpan elapsed)

##### Parameters

Type | Name | Description
--- | --- | ---
System.TimeSpan | elapsed |

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### CheckConnection(Object)

##### Declaration

    public void CheckConnection(object state)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | state |

| Improve this Doc View Source

#### Dispose(Boolean)

##### Declaration

    protected override void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | disposing |

##### Overrides

TransportFilter.Dispose(Boolean)
| Improve this Doc View Source

#### Finalize()

##### Declaration

    protected void Finalize()

| Improve this Doc View Source

#### OnCommand(ITransport, Command)

##### Declaration

    protected override void OnCommand(ITransport sender, Command command)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | sender |
Command | command |

##### Overrides

TransportFilter.OnCommand(ITransport, Command)
| Improve this Doc View Source

#### Oneway(Command)

##### Declaration

    public override void Oneway(Command command)

##### Parameters

Type | Name | Description
--- | --- | ---
Command | command |

##### Overrides

TransportFilter.Oneway(Command)
| Improve this Doc View Source

#### OnException(ITransport, Exception)

##### Declaration

    protected override void OnException(ITransport sender, Exception command)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | sender |
System.Exception | command |

##### Overrides

TransportFilter.OnException(ITransport, Exception)
| Improve this Doc View Source

#### ReadCheck()

##### Declaration

    public void ReadCheck()

| Improve this Doc View Source

#### Stop()

##### Declaration

    public override void Stop()

##### Overrides

TransportFilter.Stop()
| Improve this Doc View Source

#### WriteCheck()

Check the write to the broker

##### Declaration

    public void WriteCheck()

### Implements

ITransport
Apache.NMS.IStartable
System.IDisposable
Apache.NMS.IStoppable