Cloud/QueueService/Adapter/AbstractAdapter.php

Show: PublicProtectedPrivateinherited
Table of Contents
LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Cloud  
Subpackage
QueueService  

\Zend_Cloud_QueueService_Adapter_AbstractAdapter

Package: Zend\Cloud\QueueService
Abstract queue adapter

Provides functionality around setting message and message set classes.

Implements
\Zend_Cloud_QueueService_Adapter
Children
\Zend_Cloud_QueueService_Adapter_WindowsAzure
\Zend_Cloud_QueueService_Adapter_Sqs
\Zend_Cloud_QueueService_Adapter_ZendQueue
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  MESSAGE_CLASS = 'message_class'
>VConstant  MESSAGESET_CLASS = 'messageset_class'
>VConstant  HTTP_ADAPTER = 'http_adapter'
inherited
Ctor HTTP adapter option
Inherited from: \Zend_Cloud_QueueService_Adapter::HTTP_ADAPTER
>VConstant  VISIBILITY_TIMEOUT = 'visibility_timeout'
inherited
Message visibility timeout option
Inherited from: \Zend_Cloud_QueueService_Adapter::VISIBILITY_TIMEOUT
>VConstant  DEFAULT_TIMEOUT = 30
inherited
Default visibility timeout
Inherited from: \Zend_Cloud_QueueService_Adapter::DEFAULT_TIMEOUT

Properties

>VPropertyprotectedstring $_messageClass = 'Zend_Cloud_QueueService_Message'

Class to use for queue messages

Default value'Zend_Cloud_QueueService_Message'Details
Type
string
>VPropertyprotectedstring $_messageSetClass = 'Zend_Cloud_QueueService_MessageSet'

Class to use for collections of queue messages

Default value'Zend_Cloud_QueueService_MessageSet'Details
Type
string

Methods

methodpubliccreateQueue(string $name, array $options = null) : string
inherited

Create a queue.

Inherited from: \Zend_Cloud_QueueService_Adapter::createQueue()

Returns the ID of the created queue (typically the URL). It may take some time to create the queue. Check your vendor's documentation for details.

Name constraints: Maximum 80 characters Only alphanumeric characters, hyphens (-), and underscores (_)

Parameters
NameTypeDescription
$namestring
$optionsarray
Returns
TypeDescription
stringQueue ID (typically URL)
methodpublicdeleteMessage(string $queueId, \Zend_Cloud_QueueService_Message $message, array $options = null) : void
inherited

Delete the specified message from the specified queue.

Inherited from: \Zend_Cloud_QueueService_Adapter::deleteMessage()
Parameters
NameTypeDescription
$queueIdstring
$message\Zend_Cloud_QueueService_Message

Message to delete

$optionsarray
methodpublicdeleteQueue(string $queueId, array $options = null) : boolean
inherited

Delete a queue.

Inherited from: \Zend_Cloud_QueueService_Adapter::deleteQueue()

All messages in the queue will also be deleted.

Parameters
NameTypeDescription
$queueIdstring
$optionsarray
Returns
TypeDescription
booleantrue if successful, false otherwise
methodpublicfetchQueueMetadata(string $queueId, array $options = null) : array
inherited

Get a key/value array of metadata for the given queue.

Inherited from: \Zend_Cloud_QueueService_Adapter::fetchQueueMetadata()
Parameters
NameTypeDescription
$queueIdstring
$optionsarray
Returns
TypeDescription
array
methodpublicgetClient() : void
inherited

Get the concrete adapter.

Inherited from: \Zend_Cloud_QueueService_Adapter::getClient()
methodpublicgetMessageClass() : string

Get class to use for message objects

Returns
TypeDescription
string
methodpublicgetMessageSetClass() : string

Get class to use for message collection objects

Returns
TypeDescription
string
methodpubliclistQueues(array $options = null) : array
inherited

List all queues.

Inherited from: \Zend_Cloud_QueueService_Adapter::listQueues()
Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
arrayQueue IDs
methodpublicpeekMessages(string $queueId, int $num = 1, array $options = null) : \array[Zend_Cloud_QueueService_Message]
inherited

Peek at the messages from the specified queue without removing them.

Inherited from: \Zend_Cloud_QueueService_Adapter::peekMessages()
Parameters
NameTypeDescription
$queueIdstring
$numint

How many messages

$optionsarray
Returns
TypeDescription
\array[Zend_Cloud_QueueService_Message]
methodpublicreceiveMessages(string $queueId, int $max = 1, array $options = null) : \array[Zend_Cloud_QueueService_Message]
inherited

Recieve at most $max messages from the specified queue and return the message IDs for messages recieved.

Inherited from: \Zend_Cloud_QueueService_Adapter::receiveMessages()
Parameters
NameTypeDescription
$queueIdstring
$maxint
$optionsarray
Returns
TypeDescription
\array[Zend_Cloud_QueueService_Message]Array of messages
methodpublicsendMessage(string $queueId, string $message, array $options = null) : string
inherited

Send a message to the specified queue.

Inherited from: \Zend_Cloud_QueueService_Adapter::sendMessage()
Parameters
NameTypeDescription
$queueIdstring
$messagestring
$optionsarray
Returns
TypeDescription
stringMessage ID
methodpublicsetMessageClass(string $class) : \Zend_Cloud_QueueService_Adapter_AbstractAdapter

Set class to use for message objects

Parameters
NameTypeDescription
$classstring
Returns
TypeDescription
\Zend_Cloud_QueueService_Adapter_AbstractAdapter
methodpublicsetMessageSetClass(string $class) : \Zend_Cloud_QueueService_Adapter_AbstractAdapter

Set class to use for message collection objects

Parameters
NameTypeDescription
$classstring
Returns
TypeDescription
\Zend_Cloud_QueueService_Adapter_AbstractAdapter
methodpublicstoreQueueMetadata(string $queueId, array $metadata, array $options = null) : void
inherited

Store a key/value array of metadata for the specified queue.

Inherited from: \Zend_Cloud_QueueService_Adapter::storeQueueMetadata()

WARNING: This operation overwrites any metadata that is located at $destinationPath. Some adapters may not support this method.

Parameters
NameTypeDescription
$queueIdstring
$metadataarray
$optionsarray
Documentation was generated by phpDocumentor 2.0.0a12.