PHP Класс AppserverIo\Appserver\MessageQueue\QueueManager

Автор: Tim Wagner ([email protected])
Автор: Markus Stockbauer ([email protected])
Автор: Bernhard Wick ([email protected])
Наследование: extends AppserverIo\Appserver\Core\AbstractManager, implements AppserverIo\Psr\Pms\QueueContextInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
createSenderForQueue ( string $lookupName, string $sessionId = null ) : AppserverIo\Messaging\QueueSender Return a new sender for the message queue with the passed lookup name.
getIdentifier ( ) : string Initializes the manager instance.
getManagerSettings ( ) : AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface Return's the queue settings.
getQueues ( ) : array Returns the array with queue names and the MessageListener class names as values.
getResourceLocator ( ) : AppserverIo\Psr\Pms\ResourceLocatorInterface Return the resource locator instance.
hasQueue ( AppserverIo\Psr\Pms\QueueInterface $queue ) : boolean Returns TRUE if the application is related with the passed queue instance.
initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Has been automatically invoked by the container after the application instance has been created.
injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void Injects the queue settings.
injectMessages ( AppserverIo\Storage\GenericStackable $messages ) : void Injects the storage for the messages.
injectQueues ( AppserverIo\Storage\GenericStackable $queues ) : void Injects the storage for the queues.
injectResourceLocator ( AppserverIo\Psr\Pms\ResourceLocatorInterface $resourceLocator ) : void Injects the resource locator that locates the requested queue.
injectWorkers ( AppserverIo\Storage\GenericStackable $workers ) : void Injects the storage for the workers.
locate ( AppserverIo\Psr\Pms\QueueInterface $queue ) : AppserverIo\Psr\Pms\QueueInterface Tries to locate the queue that handles the request and returns the instance if one can be found.
lookup ( string $lookupName, string $sessionId = null, array $args = [] ) : AppserverIo\Psr\Pms\QueueInterface Runs a lookup for the message queue with the passed lookup name and session ID.
stop ( ) : void Shutdown the session manager instance.
updateMonitor ( AppserverIo\Psr\Pms\MessageInterface $message ) : void Updates the message monitor.

Защищенные методы

Метод Описание
registeMessageQueue ( AppserverIo\Appserver\Core\Api\Node\MessageQueueNodeInterface $messageQueueNode ) : void Deploys the message queue described by the passed node.
registerMessageQueues ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Deploys the message queues.

Описание методов

createSenderForQueue() публичный метод

Return a new sender for the message queue with the passed lookup name.
public createSenderForQueue ( string $lookupName, string $sessionId = null ) : AppserverIo\Messaging\QueueSender
$lookupName string The lookup name of the queue to return a sender for
$sessionId string The session-ID to be passed to the queue session
Результат AppserverIo\Messaging\QueueSender The sender instance

getIdentifier() публичный метод

Initializes the manager instance.
См. также: AppserverIo\Psr\Application\ManagerInterface::initialize()
public getIdentifier ( ) : string
Результат string

getManagerSettings() публичный метод

Return's the queue settings.
public getManagerSettings ( ) : AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface
Результат AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface The queue settings

getQueues() публичный метод

Returns the array with queue names and the MessageListener class names as values.
public getQueues ( ) : array
Результат array The registered queues

getResourceLocator() публичный метод

Return the resource locator instance.
public getResourceLocator ( ) : AppserverIo\Psr\Pms\ResourceLocatorInterface
Результат AppserverIo\Psr\Pms\ResourceLocatorInterface The resource locator instance

hasQueue() публичный метод

Returns TRUE if the application is related with the passed queue instance.
public hasQueue ( AppserverIo\Psr\Pms\QueueInterface $queue ) : boolean
$queue AppserverIo\Psr\Pms\QueueInterface The queue the application has to be related to
Результат boolean TRUE if the application is related, else FALSE

initialize() публичный метод

Has been automatically invoked by the container after the application instance has been created.
См. также: AppserverIo\Psr\Application\ManagerInterface::initialize()
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Результат void

injectManagerSettings() публичный метод

Injects the queue settings.
public injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void
$managerSettings AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface The queue settings
Результат void

injectMessages() публичный метод

Injects the storage for the messages.
public injectMessages ( AppserverIo\Storage\GenericStackable $messages ) : void
$messages AppserverIo\Storage\GenericStackable An storage for the messages
Результат void

injectQueues() публичный метод

Injects the storage for the queues.
public injectQueues ( AppserverIo\Storage\GenericStackable $queues ) : void
$queues AppserverIo\Storage\GenericStackable An storage for the queues
Результат void

injectResourceLocator() публичный метод

Injects the resource locator that locates the requested queue.
public injectResourceLocator ( AppserverIo\Psr\Pms\ResourceLocatorInterface $resourceLocator ) : void
$resourceLocator AppserverIo\Psr\Pms\ResourceLocatorInterface The resource locator
Результат void

injectWorkers() публичный метод

Injects the storage for the workers.
public injectWorkers ( AppserverIo\Storage\GenericStackable $workers ) : void
$workers AppserverIo\Storage\GenericStackable An storage for the workers
Результат void

locate() публичный метод

Tries to locate the queue that handles the request and returns the instance if one can be found.
public locate ( AppserverIo\Psr\Pms\QueueInterface $queue ) : AppserverIo\Psr\Pms\QueueInterface
$queue AppserverIo\Psr\Pms\QueueInterface The queue request
Результат AppserverIo\Psr\Pms\QueueInterface The requested queue instance

lookup() публичный метод

Runs a lookup for the message queue with the passed lookup name and session ID.
public lookup ( string $lookupName, string $sessionId = null, array $args = [] ) : AppserverIo\Psr\Pms\QueueInterface
$lookupName string The queue lookup name
$sessionId string The session ID
$args array The arguments passed to the queue
Результат AppserverIo\Psr\Pms\QueueInterface The requested queue instance

registeMessageQueue() защищенный метод

Deploys the message queue described by the passed node.
protected registeMessageQueue ( AppserverIo\Appserver\Core\Api\Node\MessageQueueNodeInterface $messageQueueNode ) : void
$messageQueueNode AppserverIo\Appserver\Core\Api\Node\MessageQueueNodeInterface The node that describes the message queue
Результат void

registerMessageQueues() защищенный метод

Deploys the message queues.
protected registerMessageQueues ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Результат void

stop() публичный метод

Shutdown the session manager instance.
public stop ( ) : void
Результат void \AppserverIo\Psr\Application\ManagerInterface::stop()

updateMonitor() публичный метод

Updates the message monitor.
public updateMonitor ( AppserverIo\Psr\Pms\MessageInterface $message ) : void
$message AppserverIo\Psr\Pms\MessageInterface The message to update the monitor for
Результат void