Search
Preparing search index...
The search index is not available
@nestjs/common
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
ServerMqtt
Class ServerMqtt
Hierarchy
Server
ServerMqtt
Implements
any
Index
Constructors
constructor
Properties
logger
message
Handlers
mqtt
Client
options
url
Methods
add
Handler
bind
Events
close
create
Mqtt
Client
deserialize
get
Ack
Queue
Name
get
Handler
ByPattern
get
Handlers
get
Message
Handler
get
Options
Prop
get
Publisher
get
Res
Queue
Name
handle
Error
handle
Event
handle
Message
listen
load
Package
send
start
transform
ToObservable
Constructors
constructor
new
Server
Mqtt
(
options
:
any
)
:
ServerMqtt
Parameters
options:
any
Returns
ServerMqtt
Properties
Protected
logger
logger
:
any
= new Logger(Server.name)
Protected
message
Handlers
message
Handlers
:
any
= new Map<string, MessageHandler>()
Private
mqtt
Client
mqtt
Client
:
MqttClient
Private
options
options
:
any
Private
url
url
:
string
Methods
add
Handler
add
Handler
(
pattern
:
any
, callback
:
MessageHandler
, isEventHandler
?:
boolean
)
:
void
Parameters
pattern:
any
callback:
MessageHandler
Default value
isEventHandler:
boolean
= false
Returns
void
bind
Events
bind
Events
(
mqttClient
:
MqttClient
)
:
void
Parameters
mqttClient:
MqttClient
Returns
void
close
close
(
)
:
void
Returns
void
create
Mqtt
Client
create
Mqtt
Client
(
)
:
MqttClient
Returns
MqttClient
deserialize
deserialize
(
content
:
any
)
:
ReadPacket
&
PacketId
Parameters
content:
any
Returns
ReadPacket
&
PacketId
get
Ack
Queue
Name
get
Ack
Queue
Name
(
pattern
:
string
)
:
string
Parameters
pattern:
string
Returns
string
get
Handler
ByPattern
get
Handler
ByPattern
(
pattern
:
string
)
:
MessageHandler
|
null
Parameters
pattern:
string
Returns
MessageHandler
|
null
get
Handlers
get
Handlers
(
)
:
Map
<
string
,
MessageHandler
>
Returns
Map
<
string
,
MessageHandler
>
get
Message
Handler
get
Message
Handler
(
pub
:
MqttClient
)
:
Function
Parameters
pub:
MqttClient
Returns
Function
get
Options
Prop
get
Options
Prop<T, K>
(
obj
:
T
, prop
:
K
, defaultValue
?:
T[K]
)
:
T[K]
Type parameters
T
:
any
K
:
keyof T
Parameters
obj:
T
prop:
K
Default value
defaultValue:
T[K]
= undefined
Returns
T[K]
get
Publisher
get
Publisher
(
client
:
MqttClient
, pattern
:
any
, id
:
string
)
:
any
Parameters
client:
MqttClient
pattern:
any
id:
string
Returns
any
get
Res
Queue
Name
get
Res
Queue
Name
(
pattern
:
string
)
:
string
Parameters
pattern:
string
Returns
string
handle
Error
handle
Error
(
stream
:
any
)
:
void
Parameters
stream:
any
Returns
void
handle
Event
handle
Event
(
pattern
:
string
, packet
:
ReadPacket
)
:
Promise
<
any
>
Parameters
pattern:
string
packet:
ReadPacket
Returns
Promise
<
any
>
handle
Message
handle
Message
(
channel
:
string
, buffer
:
Buffer
, pub
:
MqttClient
)
:
Promise
<
any
>
Parameters
channel:
string
buffer:
Buffer
pub:
MqttClient
Returns
Promise
<
any
>
listen
listen
(
callback
:
function
)
:
Promise
<
void
>
Parameters
callback:
function
(
)
:
void
Returns
void
Returns
Promise
<
void
>
Protected
load
Package
load
Package<T>
(
name
:
string
, ctx
:
string
, loader
?:
Function
)
:
T
Type parameters
T
Parameters
name:
string
ctx:
string
Optional
loader:
Function
Returns
T
send
send
(
stream$
:
Observable
<
any
>
, respond
:
function
)
:
Subscription
Parameters
stream$:
Observable
<
any
>
respond:
function
(
data
:
WritePacket
)
:
void
Parameters
data:
WritePacket
Returns
void
Returns
Subscription
start
start
(
callback
?:
function
)
:
void
Parameters
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
transform
ToObservable
transform
ToObservable<T>
(
resultOrDeffered
:
any
)
:
Observable
<
T
>
Type parameters
T
Parameters
resultOrDeffered:
any
Returns
Observable
<
T
>
Globals
Server
Mqtt
constructor
logger
message
Handlers
mqtt
Client
options
url
add
Handler
bind
Events
close
create
Mqtt
Client
deserialize
get
Ack
Queue
Name
get
Handler
ByPattern
get
Handlers
get
Message
Handler
get
Options
Prop
get
Publisher
get
Res
Queue
Name
handle
Error
handle
Event
handle
Message
listen
load
Package
send
start
transform
ToObservable
Generated using
TypeDoc