FileDocCategorySizeDatePackage
BordeauxManagerService.javaAPI DocAndroid 5.1 API5170Thu Mar 12 22:22:48 GMT 2015android.bordeaux.services

BordeauxManagerService

public class BordeauxManagerService extends Object
{@hide} This is used to provide a convenience to access the actual remote running service. TODO: Eventally the remote service will be running in the system server, and this will need to be served as a stub for the remote running service. And extends from IBordeauxManager.stub

Fields Summary
private static final String
TAG
private static IBordeauxService
mService
private static ILearning_StochasticLinearRanker
mRanker
private static IAggregatorManager
mAggregatorManager
private static IPredictor
mPredictor
private static ILearning_MulticlassPA
mClassifier
private static boolean
mStarted
private static android.content.ServiceConnection
mConnection
Class for interacting with the main interface of the service.
Constructors Summary
public BordeauxManagerService()


      
    
Methods Summary
private static synchronized voidbindServices(android.content.Context context)

        if (mStarted) return;
        context.bindService(new Intent(IBordeauxService.class.getName()),
               mConnection, Context.BIND_AUTO_CREATE);
        mStarted = true;
    
public static synchronized IAggregatorManagergetAggregatorManager(android.content.Context context)

        if (mService == null) {
            bindServices(context);
            return null;
        }
        try {
            mAggregatorManager = IAggregatorManager.Stub.asInterface(
                    mService.getAggregatorManager());
        } catch (RemoteException e) {
            mAggregatorManager = null;
        }
        return mAggregatorManager;
    
public static synchronized ILearning_MulticlassPAgetClassifier(android.content.Context context, java.lang.String name)

        if (mService == null) {
            bindServices(context);
            return null;
        }
        try {
            mClassifier =
                    ILearning_MulticlassPA.Stub.asInterface(mService.getClassifier(name));
        } catch (RemoteException e) {
            mClassifier = null;
        }
        return mClassifier;
    
public static synchronized IPredictorgetPredictor(android.content.Context context, java.lang.String name)

        if (mService == null) {
            bindServices(context);
            return null;
        }
        try {
            mPredictor = IPredictor.Stub.asInterface(mService.getPredictor(name));
        } catch (RemoteException e) {
            mPredictor = null;
        }
        return mPredictor;
    
public static synchronized ILearning_StochasticLinearRankergetRanker(android.content.Context context, java.lang.String name)

        if (mService == null) {
            bindServices(context);
            return null;
        }
        try {
            mRanker =
                    ILearning_StochasticLinearRanker.Stub.asInterface(
                            mService.getRanker(name));
        } catch (RemoteException e) {
            mRanker = null;
        }
        return mRanker;
    
public static synchronized IBordeauxServicegetService(android.content.Context context)

        if (mService == null) bindServices(context);
        return mService;
    
public static synchronized voidrelease(android.content.Context context)

        if (mStarted && mConnection != null) {
            context.unbindService(mConnection);
            mService = null;
            mStarted = false;
        }