public class

QueueTicket

extends Object
java.lang.Object
   ↳ com.glia.androidsdk.queuing.QueueTicket

Class Overview

A ticket for Visitor's spot in the Queue.

This ticket can be received from Glia event QUEUE_TICKET. See on(Glia.OmnicoreEvent, Consumer) for more information on events.

Here is an example of how to cancel Visitor Queue Ticket:

 
 Glia.on(Glia.Events.QUEUE_TICKET, queueTicket -> {
     queueTicket.cancel(exception -> {
          if (exception == null) {
              // handle success
          } else {
             // handle error
          }
     });
 });
 

See Also

Summary

Public Methods
void cancel()
Cancel Visitor's spot in the Queue.
void cancel(Consumer<GliaException> callback)
Cancel Visitor's spot in the Queue.
String getId()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void cancel ()

Cancel Visitor's spot in the Queue.

Has the same behavior as cancel(Consumer) but doesn't notify of request result or errors.

public void cancel (Consumer<GliaException> callback)

Cancel Visitor's spot in the Queue.

Behaves the same as if cancelQueueTicket(String, Consumer) was called with this Queue ID value.

Parameters
callback Called with null if request succeeds or with GliaException if failed. Exception may have one of following causes:
NETWORK_TIMEOUT - when request times out due to connection issues
INTERNAL_ERROR - when internal error occurs

public String getId ()