PHP Class AppserverIo\Appserver\MessageQueue\QueueManager

Author: Tim Wagner ([email protected])
Author: Markus Stockbauer ([email protected])
Author: Bernhard Wick ([email protected])
Inheritance: extends AppserverIo\Appserver\Core\AbstractManager, implements AppserverIo\Psr\Pms\QueueContextInterface
Afficher le fichier Open project: appserver-io/appserver Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

createSenderForQueue() public méthode

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
Résultat AppserverIo\Messaging\QueueSender The sender instance

getIdentifier() public méthode

Initializes the manager instance.
See also: AppserverIo\Psr\Application\ManagerInterface::initialize()
public getIdentifier ( ) : string
Résultat string

getManagerSettings() public méthode

Return's the queue settings.
public getManagerSettings ( ) : AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface
Résultat AppserverIo\Appserver\MessageQueue\QueueManagerSettingsInterface The queue settings

getQueues() public méthode

Returns the array with queue names and the MessageListener class names as values.
public getQueues ( ) : array
Résultat array The registered queues

getResourceLocator() public méthode

Return the resource locator instance.
public getResourceLocator ( ) : AppserverIo\Psr\Pms\ResourceLocatorInterface
Résultat AppserverIo\Psr\Pms\ResourceLocatorInterface The resource locator instance

hasQueue() public méthode

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
Résultat boolean TRUE if the application is related, else FALSE

initialize() public méthode

Has been automatically invoked by the container after the application instance has been created.
See also: AppserverIo\Psr\Application\ManagerInterface::initialize()
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Résultat void

injectManagerSettings() public méthode

Injects the queue settings.
public injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void
$managerSettings AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface The queue settings
Résultat void

injectMessages() public méthode

Injects the storage for the messages.
public injectMessages ( AppserverIo\Storage\GenericStackable $messages ) : void
$messages AppserverIo\Storage\GenericStackable An storage for the messages
Résultat void

injectQueues() public méthode

Injects the storage for the queues.
public injectQueues ( AppserverIo\Storage\GenericStackable $queues ) : void
$queues AppserverIo\Storage\GenericStackable An storage for the queues
Résultat void

injectResourceLocator() public méthode

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
Résultat void

injectWorkers() public méthode

Injects the storage for the workers.
public injectWorkers ( AppserverIo\Storage\GenericStackable $workers ) : void
$workers AppserverIo\Storage\GenericStackable An storage for the workers
Résultat void

locate() public méthode

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
Résultat AppserverIo\Psr\Pms\QueueInterface The requested queue instance

lookup() public méthode

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
Résultat AppserverIo\Psr\Pms\QueueInterface The requested queue instance

registeMessageQueue() protected méthode

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
Résultat void

registerMessageQueues() protected méthode

Deploys the message queues.
protected registerMessageQueues ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Résultat void

stop() public méthode

Shutdown the session manager instance.
public stop ( ) : void
Résultat void \AppserverIo\Psr\Application\ManagerInterface::stop()

updateMonitor() public méthode

Updates the message monitor.
public updateMonitor ( AppserverIo\Psr\Pms\MessageInterface $message ) : void
$message AppserverIo\Psr\Pms\MessageInterface The message to update the monitor for
Résultat void