Search
Preparing search index...
The search index is not available
@pebula/nesbus
Options
All
Public
Public/Protected
All
Inherited
Menu
Globals
SbServer
Class SbServer
Hierarchy
Server
SbServer
Implements
CustomTransportStrategy
SbSubscriberRoutingContextFactory
Index
Constructors
constructor
Properties
client
configurator
id
Accessors
initialized
Methods
add
Handler
close
commit
Routes
create
Route
Context
destroy
get
Handler
ByPattern
get
Handlers
get
Options
Prop
handle
Event
init
listen
register
Route
send
transform
ToObservable
Constructors
constructor
new
SbServer
(
id
?:
string
)
:
SbServer
Parameters
Optional
id:
string
Returns
SbServer
Properties
client
client
:
ServiceBusClient
Optional
configurator
configurator
:
SbConfigurator
Optional
id
id
:
string
Accessors
initialized
get
initialized
(
)
:
boolean
Returns
boolean
Methods
add
Handler
add
Handler
(
pattern
:
any
, handler
:
MessageHandler
)
:
void
Parameters
pattern:
any
handler:
MessageHandler
Returns
void
close
close
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
commit
Routes
commit
Routes
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
create
Route
Context
create
Route
Context
(
)
:
SbSubscriberRoutingContext
Returns
SbSubscriberRoutingContext
destroy
destroy
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
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
Options
Prop
get
Options
Prop<T, K>
(
obj
:
T
, prop
:
K
, defaultValue
?:
T
[
K
]
)
:
T
[
K
]
Type parameters
T
:
MicroserviceOptions
[
"options"
]
K
:
keyof
T
Parameters
obj:
T
prop:
K
Optional
defaultValue:
T
[
K
]
Returns
T
[
K
]
handle
Event
handle
Event
(
pattern
:
string
, packet
:
ReadPacket
, context
:
BaseRpcContext
)
:
Promise
<
any
>
Parameters
pattern:
string
packet:
ReadPacket
context:
BaseRpcContext
Returns
Promise
<
any
>
init
init
(
options
:
SbServerOptions
, channelManager
:
SbChannelManager
, client
:
ServiceBusClient
, configurator
?:
SbConfigurator
)
:
void
Parameters
options:
SbServerOptions
channelManager:
SbChannelManager
client:
ServiceBusClient
Optional
configurator:
SbConfigurator
Returns
void
listen
listen
(
callback
:
(
)
=>
void
)
:
Promise
<
void
>
Parameters
callback:
(
)
=>
void
(
)
:
void
Returns
void
Returns
Promise
<
void
>
register
Route
register
Route
(
type
:
"pipe"
, key
:
string
|
symbol
, subscriber
:
SbSubscriberMetadata
, instanceWrapper
:
InstanceWrapper
<
any
>
, handler
:
OperatorFunction
<
SbContext
,
SbContext
>
)
:
any
register
Route
(
type
:
"method"
, key
:
string
|
symbol
, subscriber
:
SbSubscriberMetadata
, instanceWrapper
:
InstanceWrapper
<
any
>
, handler
:
MessageHandler
)
:
any
Parameters
type:
"pipe"
key:
string
|
symbol
subscriber:
SbSubscriberMetadata
instanceWrapper:
InstanceWrapper
<
any
>
handler:
OperatorFunction
<
SbContext
,
SbContext
>
Returns
any
Parameters
type:
"method"
key:
string
|
symbol
subscriber:
SbSubscriberMetadata
instanceWrapper:
InstanceWrapper
<
any
>
handler:
MessageHandler
Returns
any
send
send
(
stream$
:
Observable
<
any
>
, respond
:
(
data
:
WritePacket
)
=>
void
)
:
Subscription
Parameters
stream$:
Observable
<
any
>
respond:
(
data
:
WritePacket
)
=>
void
(
data
:
WritePacket
)
:
void
Parameters
data:
WritePacket
Returns
void
Returns
Subscription
transform
ToObservable
transform
ToObservable<T>
(
resultOrDeffered
:
any
)
:
Observable
<
T
>
Type parameters
T
Parameters
resultOrDeffered:
any
Returns
Observable
<
T
>
Globals
Sb
Server
constructor
client
configurator
id
initialized
add
Handler
close
commit
Routes
create
Route
Context
destroy
get
Handler
ByPattern
get
Handlers
get
Options
Prop
handle
Event
init
listen
register
Route
send
transform
ToObservable
Generated using
TypeDoc