Method | Description | |
---|---|---|
attach ( AppserverIo\Psr\Pms\MessageInterface $message ) : void | Attach a new message to the queue. | |
bootstrap ( ) : void | This method will be invoked before the while() loop starts and can be used to implement some bootstrap functionality. | |
cleanUp ( ) : void | This method will be invoked, after the while() loop has been finished and can be used to implement clean up 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. | |
getMessages ( ) : AppserverIo\Storage\GenericStackable | Returns the storage for the messages. | |
getName ( ) : string | Returns the queue name. | |
getType ( ) : string | Returns the message bean type to handle the messages. | |
getWorkers ( ) : AppserverIo\Storage\GenericStackable | Returns the storage for the workers. | |
injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | Inject the application instance the worker is bound to. | |
injectManagerSettings ( AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface $managerSettings ) : void | Injects the queue manager settings. | |
injectMessages ( AppserverIo\Storage\GenericStackable $messages ) : void | Injects the storage for the messages. | |
injectName ( string $name ) : void | Initializes the queue with the name to use. | |
injectType ( string $type ) : void | Initializes the queue with the message bean type that has to handle the messages. | |
injectWorkers ( AppserverIo\Storage\GenericStackable $workers ) : void | Injects the storage for the workers. | |
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. |
Method | Description | |
---|---|---|
uniqueWorkerName ( AppserverIo\Psr\Pms\PriorityKeyInterface $priorityKey ) : string | Creates a unique name to register the worker with the passed priority. |
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 getMessages ( ) : AppserverIo\Storage\GenericStackable | ||
return | AppserverIo\Storage\GenericStackable | The storage for the messages |
public getWorkers ( ) : AppserverIo\Storage\GenericStackable | ||
return | AppserverIo\Storage\GenericStackable | The storage for the workers |
public injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void | ||
$application | AppserverIo\Psr\Application\ApplicationInterface | The application instance |
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 | An storage for the messages |
return | void |
public injectName ( string $name ) : void | ||
$name | string | Holds the queue name to use |
return | void |
public injectType ( string $type ) : void | ||
$type | string | The message bean type to handle the messages |
return | void |
public injectWorkers ( AppserverIo\Storage\GenericStackable $workers ) : void | ||
$workers | AppserverIo\Storage\GenericStackable | An storage for the workers |
return | void |
protected uniqueWorkerName ( AppserverIo\Psr\Pms\PriorityKeyInterface $priorityKey ) : string | ||
$priorityKey | AppserverIo\Psr\Pms\PriorityKeyInterface | The priority key to create a unique name for |
return | string | The unique name |