import AbstractMethodBuilder from 'foglet-core/src/fprotocol/builders/abstract-method-builder.js'AbstractMethodBuilder
An AbstractBuilder defines an abstract class capable of builiding a service method. It defines, in the prototype of a protocol subclass:
- The service method, used to send messages.
- The service handler, used to handle reception of messages for this service.
- The service hooks, executed before/after a message is sent/recevied.
Constructor Summary
| Public Constructor | ||
| public |
constructor(serviceName: string) Constructor |
|
Member Summary
| Public Members | ||
| public get |
|
|
| public get |
|
|
| public get |
|
|
| public get |
|
|
| public get |
|
|
| public get |
methodName: * |
|
| Private Members | ||
| private |
|
|
| private |
|
|
| private |
_serviceName: * |
|
Method Summary
| Public Methods | ||
| public |
buildAfterHooks(protocol: function, afterHooks: Object): void Build the after hooks for this service. |
|
| public |
buildBeforeHooks(protocol: function, beforeHooks: Object): void Build the before hooks for this service. |
|
| public |
buildHandler(protocol: function, handler: function): void Build the service handler |
|
| public |
buildService(protocol: function): void Build the service method used to send messages. |
|
Public Constructors
Public Members
public get methodName: * source
Private Members
private _camelCasedName: * source
private _capitalizedCamelCase: * source
private _serviceName: * source
Public Methods
public buildAfterHooks(protocol: function, afterHooks: Object): void source
Build the after hooks for this service.
Return:
| void |
public buildBeforeHooks(protocol: function, beforeHooks: Object): void source
Build the before hooks for this service.
Return:
| void |
