public abstract class BaseFileServiceUIGuard<CALLBACK extends android.os.Binder,INTERFACE extends android.os.IInterface> extends java.lang.Object implements IFileDownloadServiceProxy, android.content.ServiceConnection
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
runServiceForeground |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseFileServiceUIGuard(java.lang.Class<?> serviceClass) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract INTERFACE |
asInterface(android.os.IBinder service) |
void |
bindStartByContext(android.content.Context context) |
void |
bindStartByContext(android.content.Context context,
java.lang.Runnable connectedRunnable) |
protected abstract CALLBACK |
createCallback() |
protected CALLBACK |
getCallback() |
protected INTERFACE |
getService() |
boolean |
isConnected() |
boolean |
isRunServiceForeground() |
void |
onServiceConnected(android.content.ComponentName name,
android.os.IBinder service) |
void |
onServiceDisconnected(android.content.ComponentName name) |
protected java.lang.Object |
popCache(java.lang.String key) |
protected java.lang.String |
putCache(java.lang.Object object) |
protected abstract void |
registerCallback(INTERFACE service,
CALLBACK callback) |
void |
unbindByContext(android.content.Context context) |
protected abstract void |
unregisterCallback(INTERFACE service,
CALLBACK callback) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearAllTaskData, clearTaskData, getSofar, getStatus, getTotal, isDownloading, isIdle, pause, pauseAllTasks, setMaxNetworkThreadCount, start, startForeground, stopForegroundprotected BaseFileServiceUIGuard(java.lang.Class<?> serviceClass)
protected CALLBACK getCallback()
protected INTERFACE getService()
protected abstract CALLBACK createCallback()
public void onServiceConnected(android.content.ComponentName name,
android.os.IBinder service)
onServiceConnected in interface android.content.ServiceConnectionpublic void onServiceDisconnected(android.content.ComponentName name)
onServiceDisconnected in interface android.content.ServiceConnectionpublic void bindStartByContext(android.content.Context context)
bindStartByContext in interface IFileDownloadServiceProxypublic void bindStartByContext(android.content.Context context,
java.lang.Runnable connectedRunnable)
bindStartByContext in interface IFileDownloadServiceProxypublic void unbindByContext(android.content.Context context)
unbindByContext in interface IFileDownloadServiceProxypublic boolean isRunServiceForeground()
isRunServiceForeground in interface IFileDownloadServiceProxyprotected abstract INTERFACE asInterface(android.os.IBinder service)
protected abstract void registerCallback(INTERFACE service, CALLBACK callback) throws android.os.RemoteException
android.os.RemoteExceptionprotected abstract void unregisterCallback(INTERFACE service, CALLBACK callback) throws android.os.RemoteException
android.os.RemoteExceptionprotected java.lang.Object popCache(java.lang.String key)
protected java.lang.String putCache(java.lang.Object object)
public boolean isConnected()
isConnected in interface IFileDownloadServiceProxy