Amplify JS API Documentation
Library Documentation
NPM
GitHub
Preparing search index...
@aws-amplify/pubsub
clients/mqtt
PubSub
Class PubSub
Hierarchy (
View Summary
)
AbstractPubSub
<
PubSubOptions
>
PubSub
PubSub
Index
Constructors
constructor
Properties
_
client
Id
Observers
_
topic
Observers
Accessors
client
Id
clients
Queue
endpoint
is
SSL
Enabled
options
Methods
configure
connect
disconnect
new
Client
on
Disconnect
publish
subscribe
Constructors
constructor
new
PubSub
(
options
?:
PubSubOptions
)
:
PubSub
Parameters
options
:
PubSubOptions
= {}
Returns
PubSub
Properties
Protected
_
client
Id
Observers
_clientIdObservers
:
Map
<
string
,
Set
<
PubSubContentObserver
>
>
= ...
Protected
_
topic
Observers
_topicObservers
:
Map
<
string
,
Set
<
PubSubContentObserver
>
>
= ...
Accessors
Protected
client
Id
get
clientId
()
:
string
Returns
string
Protected
clients
Queue
get
clientsQueue
()
:
ClientsQueue
Returns
ClientsQueue
Protected
endpoint
get
endpoint
()
:
Promise
<
string
|
undefined
>
Returns
Promise
<
string
|
undefined
>
Protected
is
SSL
Enabled
get
isSSLEnabled
()
:
boolean
Returns
boolean
Protected
options
get
options
()
:
T
Returns
T
Methods
configure
configure
(
config
:
PubSubOptions
)
:
PubSubOptions
Parameters
config
:
PubSubOptions
Returns
PubSubOptions
Protected
connect
connect
(
clientId
:
string
,
options
?:
PubSubOptions
,
)
:
Promise
<
PahoClient
|
undefined
>
Parameters
clientId
:
string
options
:
PubSubOptions
= {}
Returns
Promise
<
PahoClient
|
undefined
>
Protected
disconnect
disconnect
(
clientId
:
string
)
:
Promise
<
void
>
Parameters
clientId
:
string
Returns
Promise
<
void
>
new
Client
newClient
(
__namedParameters
:
PubSubOptions
)
:
Promise
<
PahoClient
>
Parameters
__namedParameters
:
PubSubOptions
Returns
Promise
<
PahoClient
>
on
Disconnect
onDisconnect
(
__namedParameters
:
{
clientId
?:
string
;
errorCode
?:
number
}
)
:
void
Parameters
__namedParameters
:
{
clientId
?:
string
;
errorCode
?:
number
}
Returns
void
publish
publish
(
__namedParameters
:
PublishInput
)
:
Promise
<
void
>
Parameters
__namedParameters
:
PublishInput
Returns
Promise
<
void
>
subscribe
subscribe
(
__namedParameters
:
SubscribeInput
&
{
options
?:
PubSubOptions
}
,
)
:
Observable
<
PubSubContent
>
Parameters
__namedParameters
:
SubscribeInput
&
{
options
?:
PubSubOptions
}
Returns
Observable
<
PubSubContent
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
_
client
Id
Observers
_
topic
Observers
Accessors
client
Id
clients
Queue
endpoint
is
SSL
Enabled
options
Methods
configure
connect
disconnect
new
Client
on
Disconnect
publish
subscribe
Library Documentation
NPM
GitHub
Amplify JS API Documentation
Loading...