API Docs for: 0.9.0
Show:

MojitoDispatcher Class

This object is responsible for running mojits.

Methods

_createActionContext

(
  • command
  • adapter
)
protected

Create AC object for a particular controller.

Parameters:

  • command Object

    the command to dispatch

  • adapter OutputAdapter

    the output adapter

_createActionContext

(
  • command
  • adapter
)
protected

Create AC object for a particular controller.

Parameters:

  • command Object

    the command to dispatch

  • adapter OutputAdapter

    the output adapter

_useController

(
  • command
  • adapter
)
protected

Attaches requirements to dispatch the current mojit when position. This is usually needed when running in the client side and loading mojits on demand.

Parameters:

  • command Object

    the command to dispatch

  • adapter OutputAdapter

    the output adapter

dispatch

(
  • command
  • adapter
)
public

Dispatch a command in the current runtime, or fallback to a remote runtime when posible.

Parameters:

  • command Object

    the command to dispatch

  • adapter OutputAdapter

    the output adapter

dispatch

(
  • command
  • adapter
)
public

Dispatch a command in the current runtime, or fallback to a remote runtime when posible.

Parameters:

  • command Object

    the command to dispatch

  • adapter OutputAdapter

    the output adapter

init

(
  • resourceStore
  • rpcTunnel
)
Y.mojito.Dispatcher public

Initializes the dispatcher instance.

Parameters:

  • resourceStore Y.mojito.ResourceStore

    the store to use.

  • rpcTunnel Y.mojito.TunnelClient

    optional tunnel client for RPC calls

Returns:

Y.mojito.Dispatcher:

init

(
  • resourceStore
  • rpcTunnel
)
Y.mojito.Dispatcher public

Initializes the dispatcher instance.

Parameters:

  • resourceStore Y.mojito.ResourceStore

    the store to use.

  • rpcTunnel Y.mojito.TunnelClient

    optional tunnel client for RPC calls

Returns:

Y.mojito.Dispatcher:

rpc

(
  • command
  • adapter
)
public

Executes a command in a remote runtime if possible.

Parameters:

  • command Object

    the command to dispatch

  • adapter OutputAdapter

    the output adapter

rpc

(
  • command
  • adapter
)
public

Executes a command in a remote runtime if possible.

Parameters:

  • command Object

    the command to dispatch

  • adapter OutputAdapter

    the output adapter