Contains implementation of Command design patterns, which can be used to implement various remote procedure calls (RPCs). RPCs replace unique calls with universal "message transfer" calls, in which the message itself contains the called method's signature, as well as the parameters to pass for execution.
When designing calls of methods/commands using the Command design pattern, uniform interfaces can be used, which, in turn, allow any amount of concrete methods to be called.
Command design patterns can be used for intercepting messages and for various logging implementations.
These design patterns allow us to create Commandable Interfaces, which are completely universal. If an object extends ICommandable and returns a CommandSet, then we can implement, with minimal code, a commandable client for this object, using various technologies.
Commandable Interfaces – part of the command design pattern, used to make classes with certain logic, which are capable of receiving and processing commands in this universal form.
Command interceptors – modify the message execution pipeline. Command interceptors are used to intercept calls, perform a set of actions, and, optionally, cancel the command's actual execution by simply returning a result. This logic is used in aspect-oriented programming. Aspect-oriented programming contains perpendicular logic (aspects, for example: logging, caching, blocking), which can be removed from the business logic and added to these perpendicular calls. When using interceptors, a command can pass through an execution chain, consisting of interceptors, which can:
Intercepted commands are used as pattern decorators in the command design pattern. They are represented as regular commands, but run their own logic before calling the actual command.
Generated using TypeDoc