### Hierarchy

- Subscription

## Index

### Constructors

- constructor

### Properties

- behaviourBind
- callback
- header
- mqttSensorQueue
- renderer
- type

### Methods

- bind
- getTopic
- onMessage
- publish
- reception
- unsubscribe

## Constructors

### constructor

- new Subscription(type: ConversationQueueType, header: QueueHeader, callback: QueueCallback, mqttSensorQueue: MqttSensorQueue, renderer: IRenderer): Subscription

- - Defined in lib/connection/Subscription.ts:17

  #### Parameters

  - ##### type: ConversationQueueType

  - ##### header: QueueHeader

  - ##### callback: QueueCallback

  - ##### mqttSensorQueue: MqttSensorQueue

  - ##### renderer: IRenderer

  #### Returns Subscription

## Properties

### Private behaviourBind

behaviourBind: Array<IBehaviour> = []

- Defined in lib/connection/Subscription.ts:17

### callback

callback: QueueCallback

- Defined in lib/connection/Subscription.ts:14

### header

header: QueueHeader

- Defined in lib/connection/Subscription.ts:13

### mqttSensorQueue

mqttSensorQueue: MqttSensorQueue

- Defined in lib/connection/Subscription.ts:15

### renderer

renderer: IRenderer

- Defined in lib/connection/Subscription.ts:16

### type

type: ConversationQueueType

- Defined in lib/connection/Subscription.ts:12

## Methods

### bind

- bind(behaviour: IBehaviour): void

- - Defined in lib/connection/Subscription.ts:80

  Binds the given IBehaviour to the Subscription.

  #### Parameters

  - ##### behaviour: IBehaviour

  #### Returns void

### Private getTopic

- getTopic(): string

- - Defined in lib/connection/Subscription.ts:86

  #### Returns string

### onMessage

- onMessage(message: object): void

- - Defined in lib/connection/Subscription.ts:60

  #### Parameters

  - ##### message: object

  #### Returns void

### publish

- publish(payload: IEventPayload): void

- - Defined in lib/connection/Subscription.ts:46

  Sends the given message

  #### Parameters

  - ##### payload: IEventPayload

    the payload

  #### Returns void

### reception

- reception(attributes: object): void

- - Defined in lib/connection/Subscription.ts:52

  Initial request to make the system aware that the user is listening.

  #### Parameters

  - ##### attributes: object

  #### Returns void

### unsubscribe

- unsubscribe(): void

- - Defined in lib/connection/Subscription.ts:36

  Unsubscribes from the queue

  #### Returns void

Generated using TypeDoc