Method | Description | |
---|---|---|
attach ( stdClass $jobWrapper ) : void | Attaches a job for the passed wrapper to the worker instance. | |
bootstrap ( ) : void | This method will be invoked before the while() loop starts and can be used to implement some bootstrap functionality. | |
getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface | Returns the application instance the worker is bound to. | |
getManagerSettings ( ) : AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface | Return's the queue manager settings. | |
getQueueTimeout ( ) : integer | Returns the default timeout. | |
injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | Inject the application instance the worker is bound to. | |
injectJobsToExecute ( AppserverIo\Storage\GenericStackable $jobsToExecute ) : void | Inject the storage for the jobs to be executed. | |
injectManagerSettings ( AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface $managerSettings ) : void | Injects the queue manager settings. | |
injectMessages ( AppserverIo\Storage\GenericStackable $messages ) : void | Inject the storage for the messages. | |
injectPriorityKey ( AppserverIo\Psr\Pms\PriorityKeyInterface $priorityKey ) : void | Injects the priority of the queue worker. | |
log ( mixed $level, string $message, array $context = [] ) : void | This is a very basic method to log some stuff by using the error_log() method of PHP. | |
run ( ) : void | We process the messages/jobs here. |
public getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface | ||
return | AppserverIo\Psr\Application\ApplicationInterface | The application instance |
public getManagerSettings ( ) : AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface | ||
return | AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface | The queue manager settings |
public getQueueTimeout ( ) : integer | ||
return | integer | The default timeout in microseconds |
public injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | ||
$application | AppserverIo\Psr\Application\ApplicationInterface | The application instance |
return | void |
public injectJobsToExecute ( AppserverIo\Storage\GenericStackable $jobsToExecute ) : void | ||
$jobsToExecute | AppserverIo\Storage\GenericStackable | The storage for the jobs to be executed |
return | void |
public injectManagerSettings ( AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface $managerSettings ) : void | ||
$managerSettings | AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface | The queue manager settings |
return | void |
public injectMessages ( AppserverIo\Storage\GenericStackable $messages ) : void | ||
$messages | AppserverIo\Storage\GenericStackable | The storage for the messages |
return | void |
public injectPriorityKey ( AppserverIo\Psr\Pms\PriorityKeyInterface $priorityKey ) : void | ||
$priorityKey | AppserverIo\Psr\Pms\PriorityKeyInterface | The priority of this queue worker |
return | void |