Class: Base

Base

Class representing the basics needed for a protocol

new Transports.Base(options)

transports/base.js, line 6

Create an instance of the Protocol

Name Type Description
options object

The options passed in to the instance

Name Type Description
manager Manager

The manager assigned to the protocol

scheduler Manager

Optional scheduler to create workers for.

Methods

getInstance(options, callback)

transports/base.js, line 41

Create a new worker instance and register it with the manager and scheduler.

Name Type Description
options object

Options

Name Type Description
scheduler Scheduler

Optional scheduler to register worker with, if not supplied then class options.scheduler will be used.

callback function

Callback to be called once worker is created and registered.

registerInstance(instance, scheduler)

transports/base.js, line 23

Register a worker instance with the manager and scheduler

Name Type Description
instance object

The instance to register

scheduler Scheduler

Optional scheduler to register worker with, if not supplied then class options.scheduler will be used.