\CGMessageQueueMessageBase

An abstract class for creating a message.

Summary

Methods
Properties
Constants
__construct()
get_name()
set_name()
get_queue()
set_queue()
get_module()
set_module()
get_expiry()
set_expiry()
is_valid()
handle()
send()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() 

Constructor

get_name()

get_name() : string

Get the name of this message object.

By default it returns the class name.

Returns

string

set_name()

set_name(string  $str) 

Set the name of this message object.

Parameters

string $str

get_queue()

get_queue() : \CGMessageQueue\string.

Get the name of the queue that this message object is to be placed in.

There is no default value for the queue name, but one is required before sending the message.

Returns

\CGMessageQueue\string.

set_queue()

set_queue(string  $str) 

Set the queue name.

Parameters

string $str

get_module()

get_module() : \CGMessageQueue\strung

Get the name of the module that is sending this message.

There is no default value for the module name, however one must be set before sending the message.

Returns

\CGMessageQueue\strung

set_module()

set_module(string  $str) 

Set the module name for this message.

Parameters

string $str

get_expiry()

get_expiry() 

Get the expiry time (in minutes) for this message.

return int

set_expiry()

set_expiry(integer|null  $val) 

Set the expiry time (in minutes) for this message.

Parameters

integer|null $val

An integer value, or null may be specified.

is_valid()

is_valid() : boolean

Test if this message is minimally valid, and can be sent.

Returns

boolean

handle()

handle() : void

An abstract method to handle this message once it is popped off of the queue.

All processing should be done from within this method.

This method is called by the asynchronous process handler.

send()

send() : void

Place this message intot he queue for asynchrnous processing.

This method throws an exception if the message is not valid.