ResourceInterface

ResourceInterface

Base class for both: Resource & ResourceFaçade which implements interface for talking to Job / JobFaçade & Manager.

Constructor

new ResourceInterface(id, name)

Source:

Constructor

Parameters:
Name Type Description
id string

id of resource

name string

name of the resource

Members

id

Source:

Get id of resource

isBusy

Source:

Check if resource is busy

isOpen

Source:

Check if resource is open

job

Source:

Get resource job

job

Source:

Set resource job

name

Source:

Get name of resource

Methods

abort()

Source:

Abort job

canBeTerminated() → {boolean}

Source:

Whether manager is allowed to terminate process on master exit

Returns:

true if manager can;

Type
boolean

onceClosed() → {Promise}

Source:

Resolved returned promise, once resource is closed

Returns:

promise

Type
Promise

onceOnline() → {Promise}

Source:

Resolved returned promise, once resource is online

Returns:

promise

Type
Promise

onceOpened() → {Promise}

Source:

Resolved returned promise, once resource is opened

Returns:

promise

Type
Promise

run()

Source:

Run job