Search in sources :

Example 1 with Client

use of com.tencent.wstt.gt.manager.Client in project GT by Tencent.

the class GTAUTFragment method unregisterOutpara.

private void unregisterOutpara(int type) {
    OpUIManager.list_change = true;
    cb_status[type] = false;
    if (AUTManager.pIds != null) {
        for (int i = 0; i < AUTManager.pIds.length; i++) {
            // 出参的前缀
            String preOpName;
            if (type == AUTManager.SEQ_NET) {
                preOpName = cb_key[type] + ":";
            } else {
                preOpName = cb_key[type] + i + ":";
            }
            Client autClient = ClientManager.getInstance().getAUTClient();
            autClient.unregisterOutPara(preOpName + AUTManager.pNames[i]);
        }
        AUTManager.registOpTable.remove(cb_alias[type]);
    }
}
Also used : CommonString(com.tencent.wstt.gt.utils.CommonString) Client(com.tencent.wstt.gt.manager.Client)

Example 2 with Client

use of com.tencent.wstt.gt.manager.Client in project GT by Tencent.

the class GTBinder method setOutPara.

@Override
public void setOutPara(String key, String value) throws RemoteException {
    Client client = ClientManager.getInstance().getClient(getCallingUid());
    OutPara para = client.getOutPara(key);
    if (null != para) {
        para.setValue(value);
        // add on 20130923 为了出参支持历史曲线
        if (para.isMonitor()) {
            try {
                long lValue = Long.parseLong(value);
                OpPerfBridge.addHistory(para, value, lValue);
            } catch (Exception e) {
                // 非数字,直接重置
                para.setMonitor(false);
                OpPerfBridge.removeProfilerData(key);
            }
        }
    }
}
Also used : Client(com.tencent.wstt.gt.manager.Client) RemoteException(android.os.RemoteException)

Example 3 with Client

use of com.tencent.wstt.gt.manager.Client in project GT by Tencent.

the class GTBinder method registerOutPara.

@Override
public void registerOutPara(OutPara para) throws RemoteException {
    Client client = ClientManager.getInstance().getClient(getCallingUid());
    client.register(para);
}
Also used : Client(com.tencent.wstt.gt.manager.Client)

Example 4 with Client

use of com.tencent.wstt.gt.manager.Client in project GT by Tencent.

the class GTBinder method getOutPara.

@Override
public String getOutPara(String key) throws RemoteException {
    Client client = ClientManager.getInstance().getClient(getCallingUid());
    OutPara para = client.getOutPara(key);
    if (para != null) {
        return para.getValue();
    }
    return "";
}
Also used : Client(com.tencent.wstt.gt.manager.Client)

Example 5 with Client

use of com.tencent.wstt.gt.manager.Client in project GT by Tencent.

the class GTBinder method getGlobalOutPara.

@Override
public String getGlobalOutPara(String key) throws RemoteException {
    Client client = ClientManager.getInstance().getClient(ClientManager.GLOBAL_CLIENT);
    OutPara para = client.getOutPara(key);
    if (para != null) {
        return para.getValue();
    }
    return "";
}
Also used : Client(com.tencent.wstt.gt.manager.Client)

Aggregations

Client (com.tencent.wstt.gt.manager.Client)20 OutPara (com.tencent.wstt.gt.OutPara)4 RemoteException (android.os.RemoteException)3 CommonString (com.tencent.wstt.gt.utils.CommonString)2 ArrayList (java.util.ArrayList)2 Context (android.content.Context)1 Message (android.os.Message)1 CpuUtils (com.tencent.wstt.gt.api.utils.CpuUtils)1 NetUtils (com.tencent.wstt.gt.api.utils.NetUtils)1 ClientFactory (com.tencent.wstt.gt.manager.ClientFactory)1 ConnectedClientFactory (com.tencent.wstt.gt.manager.ConnectedClientFactory)1 TagTimeEntry (com.tencent.wstt.gt.ui.model.TagTimeEntry)1 TimeEntry (com.tencent.wstt.gt.ui.model.TimeEntry)1