Class: LocalPipelineWorker

LocalPipelineWorker(hostFragment)

new LocalPipelineWorker(hostFragment)

Parameters:
Name Type Description
hostFragment AppMainFragment
Source:

Members

hostFragment :AppMainFragment

Type:
Source:

Methods

buildFragmentRoute(routeParams, savedState, data, cb)

Called by MainRoutingPipeline to build the fragment route Uses localBuildingState to see if route already built and thus only fire param changes check and move on
Parameters:
Name Type Description
routeParams RouteParams
savedState SavedFragmentState
data Object
cb genericFunction
Source:

cancelFragmentRoute(cb)

Parameters:
Name Type Description
cb genericFunction
Source:

destroyFragment(cb)

Called by MainRoutingPipeline to destroy the fragment
Parameters:
Name Type Description
cb fragmentDestroyCb
Source:

getLifeCycleObject() → {FragmentLifeCycleManager}

Source:
Returns:
Type
FragmentLifeCycleManager

getRouteChangeConsent(cb)

Called by MainRoutingPipeline to get the destroy consent of the fragment hosting this local pipeline worker
Parameters:
Name Type Description
cb routingPipelineConsentCb
Source:

isFragmentRunning() → {boolean}

To be used by Remote Manager to validate fragment is in the correct state before attempting to change anything in the UI. All UI calls not in an async "thread."" Handled by callback in main "thread"
Source:
Returns:
Type
boolean

onStateBuilding(args)

Parameters:
Name Type Description
args FragmentPipelineWorkerArgs
Source:

onStateCancelBuild(args)

Parameters:
Name Type Description
args Object
Source:

onStateConsenting(args)

Parameters:
Name Type Description
args Object
Source:

onStateRunning(args)

Parameters:
Name Type Description
args FragmentPipelineWorkerArgs
Source:

routeMaintained()

Called by MainRoutingPipeline Inform a previously consented fragment that the route has been maintained by a parent OR It was consenting to a route where it is not being destroyed, and the consent was either approved or not. Regardless, running state valid Therefore, transition the child's state back to running RATIONALE FOR THIS STRUCTURE Imagine a route /newBlog/:blogId/addMedia The addMedia fragment is the last node, but there's the :blogId fragment that probably is rendering and managing the view of WYSIWYG editor. If all consenting powers rest on the last node, the user's unsaved work will get lost. Thus, all in destruction stack MUST consent to destruction This algorithm allows for more flexible architectures
Source:

transitionFragmentState(newState, args)

Parameters:
Name Type Description
newState number
args Object
Source:

(static) getNameofFragmentState(state)

Parameters:
Name Type Description
state number
Source:
Returns: