public class Queue extends InstanceResource<TwilioRestClient>
Queue represents a queue resource.| Constructor and Description |
|---|
Queue(TwilioRestClient client,
Map<String,Object> params)
Creates a
Queue instance. |
Queue(TwilioRestClient client,
String sid)
Creates a
Queue instance. |
| Modifier and Type | Method and Description |
|---|---|
Member |
dequeueHeadOfQueue(String url,
String method)
|
int |
getAverageWaitTime()
Returns the average wait time in the
Queue |
int |
getCurrentSize()
Retrieves the current size of the
Queue |
String |
getFriendlyName()
Retrieves the friendly name of this Queue.
|
int |
getMaxSize()
Returns the max size of the
Queue |
Member |
getMember(String callSid)
Return a single Member instance
|
MemberList |
getMembers()
Retrieves the
MemberList for this Queue |
String |
getSid()
Retrieves the queue sid of this
Queue |
void |
setFriendlyName(String friendlyName)
Sets the friendly name of this
Queue. |
void |
setMaxSize(int maxSize)
Sets the max size of this
Queue. |
getCastedObject, getObject, getProperty, getPropertyAsInteger, toJSON, update, updatesetRequestAccountSidpublic Queue(TwilioRestClient client, String sid)
Queue instance.client - the TwilioRestClient to usesid - the queue sidpublic Queue(TwilioRestClient client, Map<String,Object> params)
Queue instance.client - the TwilioRestClient to useparams - the map of properties to read frompublic String getFriendlyName()
public int getCurrentSize()
QueueIllegalStateException - if the current size is not setpublic int getMaxSize()
QueueQueuepublic int getAverageWaitTime()
Queuepublic MemberList getMembers()
MemberList for this QueueMemberListpublic Member dequeueHeadOfQueue(String url, String method) throws TwilioRestException
Queue, returning the Member or null if the Queue is empty.
Control is transferred to the url and method passed in.url - the url to transfer control tomethod - the method to use.TwilioRestExceptionpublic void setFriendlyName(String friendlyName) throws TwilioRestException
Queue.friendlyName - the new friendly nameTwilioRestException - if setting the friendly name failspublic void setMaxSize(int maxSize)
throws TwilioRestException
Queue.maxSize - the new max size of the queueTwilioRestException - if setting the max size failsCopyright © 2011 Twilio, Inc. All Rights Reserved.