Skip to content

Right way, if any, to break/shortcircuit a chain handler and return earlier. #431

@twss

Description

@twss

Given I have a chain handler:

chainHandler1.chain(chainHandler2).chain(memoryHandler)

and the normal flow would be:

chainHandler1.beforeSearch
  chainHandler2.beforeSearch
    MemoryHandler.search
  chainHandler2.afterSearch
chainHandler1.afterSearch

What would be the correct way to terminate early and only do:

chainHandler1.beforeSearch
chainHandler1.afterSearch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions