Home Reference Source
public class | source

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
Private Members
private
private
private

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 constructor(serviceName: string) source

Constructor

Params:

NameTypeAttributeDescription
serviceName string

The name of the service

Public Members

public get afterReceiveName: string source

public get afterSendName: string source

public get beforeReceiveName: string source

public get beforeSendName: string source

public get handlerName: string source

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.

Params:

NameTypeAttributeDescription
protocol function

The protocol class

afterHooks Object

The hooks executed after a message is sent/received

Return:

void

public buildBeforeHooks(protocol: function, beforeHooks: Object): void source

Build the before hooks for this service.

Params:

NameTypeAttributeDescription
protocol function

The protocol class

beforeHooks Object

The hooks executed before a message is sent/received

Return:

void

public buildHandler(protocol: function, handler: function): void source

Build the service handler

Params:

NameTypeAttributeDescription
protocol function

The protocol class

handler function

The callback used when a message is received for this service

Return:

void

public buildService(protocol: function): void source

Build the service method used to send messages.

Params:

NameTypeAttributeDescription
protocol function

The protocol class

Return:

void