IXDMChannel interface

Interface for a single XDM channel

Methods

getObjectRegistry()

Get the object registry to handle messages from this specific channel. Upon receiving a message, this channel registry will be used first, then the global registry will be used if no handler is found here.

getRemoteObjectProxy<T>(string, Object)

Get a proxied object that represents the object registered with the given instance id on the remote side of this channel.

invokeRemoteMethod<T>(string, string, any[], Object)

Invoke a method via RPC. Lookup the registered object on the remote end of the channel and invoke the specified method.

Method Details

getObjectRegistry()

Get the object registry to handle messages from this specific channel. Upon receiving a message, this channel registry will be used first, then the global registry will be used if no handler is found here.

function getObjectRegistry(): IXDMObjectRegistry

Returns

getRemoteObjectProxy<T>(string, Object)

Get a proxied object that represents the object registered with the given instance id on the remote side of this channel.

function getRemoteObjectProxy<T>(instanceId: string, contextData?: Object): Promise<T>

Parameters

instanceId

string

unique id of the registered object

contextData

Object

Optional context data to pass to a registered object's factory method

Returns

Promise<T>

invokeRemoteMethod<T>(string, string, any[], Object)

Invoke a method via RPC. Lookup the registered object on the remote end of the channel and invoke the specified method.

function invokeRemoteMethod<T>(methodName: string, instanceId: string, params?: any[], instanceContextData?: Object): Promise<T>

Parameters

methodName

string

instanceId

string

unique id of the registered object

params

any[]

Arguments to the method to invoke

instanceContextData

Object

Optional context data to pass to a registered object's factory method

Returns

Promise<T>