Home Manual Reference Source Repository
import ServiceFactory from 'netflux/src/ServiceFactory.js'
public class | source

ServiceFactory

It is a factory helper class which is responsible to instantiate any service class.

Static Method Summary

Static Public Methods
public static

get(id: MESSAGE_BUILDER | WEB_RTC | WEB_SOCKET | FULLY_CONNECTED | CHANNEL_BUILDER, options: Object): Service

Provides the service instance specified by id.

Static Public Methods

public static get(id: MESSAGE_BUILDER | WEB_RTC | WEB_SOCKET | FULLY_CONNECTED | CHANNEL_BUILDER, options: Object): Service source

Provides the service instance specified by id.

Params:

NameTypeAttributeDescription
id MESSAGE_BUILDER | WEB_RTC | WEB_SOCKET | FULLY_CONNECTED | CHANNEL_BUILDER

The service identifier

options Object
  • optional

Any options that the service accepts

Return:

Service

Throw:

Error

If the service id is unknown