public class ReceiptRegistrationConnector extends ServiceConnector<IReceiptRegistrationService>
IReceiptRegistrationService
.
This class automatically binds and provides both synchronous and asynchronous service
method invocation.
Clients of this class may optionally call ServiceConnector.connect()
to force
pre-binding to the underlying service, and must call ServiceConnector.disconnect()
when finished interacting with the underlying service.
For all service methods, this class provides both synchronous and asynchronous call options. The synchronous methods must not be called on the UI thread.
Modifier and Type | Class and Description |
---|---|
static class |
ReceiptRegistrationConnector.ReceiptRegistrationCallback<T>
An implementation of the
ServiceConnector.Callback interface
for receiving asynchronous results from ReceiptRegistrationConnector
methods that provides default method implementations. |
ServiceConnector.Callback<T>, ServiceConnector.OnServiceConnectedListener, ServiceConnector.ServiceCallable<S,T>, ServiceConnector.ServiceRunnable<S>
mAccount, mClient, mConnected, mContext, mHandler, mService
Constructor and Description |
---|
ReceiptRegistrationConnector(Context context,
Account account,
ServiceConnector.OnServiceConnectedListener client)
Construct a new printer connector.
|
Modifier and Type | Method and Description |
---|---|
List<ReceiptRegistration> |
getRegistrations() |
void |
getRegistrations(ServiceConnector.Callback<List<ReceiptRegistration>> callback) |
protected String |
getServiceIntentAction() |
protected String |
getServiceIntentPackage()
The package which hosts the service to connect to.
|
protected int |
getServiceIntentVersion()
Connectors that are versioned include a version number in the action returned by
ServiceConnector.getServiceIntentAction() instead of using this mechanism. |
protected IReceiptRegistrationService |
getServiceInterface(IBinder iBinder) |
void |
register(Uri uri) |
void |
register(Uri uri,
ServiceConnector.Callback<Void> callback) |
void |
unregister(Uri uri) |
void |
unregister(Uri uri,
ServiceConnector.Callback<Void> callback) |
connect, disconnect, execute, execute, execute, execute, getService, getStartIntent, isConnected, isInstalled, notifyServiceConnected, notifyServiceDisconnected, onServiceConnected, onServiceDisconnected, postResults, throwOnFailure, waitForConnection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onBindingDied, onNullBinding
public ReceiptRegistrationConnector(Context context, Account account, ServiceConnector.OnServiceConnectedListener client)
context
- The Context in which this connector will bind to the underlying service.account
- The Clover account which is used when binding to the underlying service.client
- A listener, or null to receive no notifications.protected String getServiceIntentAction()
getServiceIntentAction
in class ServiceConnector<IReceiptRegistrationService>
protected String getServiceIntentPackage()
ServiceConnector
getServiceIntentPackage
in class ServiceConnector<IReceiptRegistrationService>
protected int getServiceIntentVersion()
ServiceConnector
ServiceConnector.getServiceIntentAction()
instead of using this mechanism.getServiceIntentVersion
in class ServiceConnector<IReceiptRegistrationService>
protected IReceiptRegistrationService getServiceInterface(IBinder iBinder)
getServiceInterface
in class ServiceConnector<IReceiptRegistrationService>
public void register(Uri uri, ServiceConnector.Callback<Void> callback)
public void register(Uri uri) throws RemoteException, ClientException, ServiceException, BindingException
public void unregister(Uri uri, ServiceConnector.Callback<Void> callback)
public void unregister(Uri uri) throws RemoteException, ClientException, ServiceException, BindingException
public void getRegistrations(ServiceConnector.Callback<List<ReceiptRegistration>> callback)
public List<ReceiptRegistration> getRegistrations() throws RemoteException, ClientException, ServiceException, BindingException