本文整理匯總了Java中org.md2k.datakitapi.status.Status.ERROR_BOUND屬性的典型用法代碼示例。如果您正苦於以下問題:Java Status.ERROR_BOUND屬性的具體用法?Java Status.ERROR_BOUND怎麽用?Java Status.ERROR_BOUND使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.md2k.datakitapi.status.Status
的用法示例。
在下文中一共展示了Status.ERROR_BOUND屬性的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: find
public synchronized ArrayList<DataSourceClient> find(DataSourceBuilder dataSourceBuilder) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceBuilder == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
ArrayList<DataSourceClient> dataSourceClients = dataKitAPIExecute.find(dataSourceBuilder).await();
if (dataSourceClients == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
else return dataSourceClients;
}
示例2: insert
public synchronized void insert(DataSourceClient dataSourceClient, DataType dataType) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null || dataType == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
else {
DataType[] dataTypes=new DataType[]{dataType};
dataKitAPIExecute.insert(dataSourceClient, dataTypes);
}
}
示例3: setSummary
public synchronized void setSummary(DataSourceClient dataSourceClient, DataType dataType) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null || dataType == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
else {
dataKitAPIExecute.setSummary(dataSourceClient, dataType);
}
}
示例4: insertHighFrequency
public synchronized void insertHighFrequency(final DataSourceClient dataSourceClient, final DataTypeDoubleArray[] dataType) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null || dataType == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
else {
for (DataTypeDoubleArray aDataType : dataType)
addToBuffer(dataSourceClient.getDs_id(), aDataType);
}
}
示例5: register
public synchronized DataSourceClient register(final DataSourceBuilder dataSourceBuilder) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceBuilder == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
DataSourceClient dataSourceClient = dataKitAPIExecute.register(dataSourceBuilder).await();
if (dataSourceClient == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
else return dataSourceClient;
}
示例6: unregister
public synchronized Status unregister(final DataSourceClient dataSourceClient) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
Status status = dataKitAPIExecute.unregister(dataSourceClient).await();
if (status == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
else return status;
}
示例7: query
public synchronized ArrayList<DataType> query(final DataSourceClient dataSourceClient, final int last_n_sample) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null || last_n_sample == 0)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
ArrayList<DataType> dataTypes = dataKitAPIExecute.query(dataSourceClient, last_n_sample).await();
if (dataTypes == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
else return dataTypes;
}
示例8: queryFromPrimaryKey
public synchronized ArrayList<RowObject> queryFromPrimaryKey(DataSourceClient dataSourceClient, long lastSyncedKey, int limit) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
ArrayList<RowObject> rowObjects = dataKitAPIExecute.queryFromPrimaryKey(dataSourceClient, lastSyncedKey, limit).await();
if (rowObjects == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
else return rowObjects;
}
示例9: querySize
public synchronized DataTypeLong querySize() throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
DataTypeLong dataTypeLong = dataKitAPIExecute.querySize().await();
if (dataTypeLong == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
else return dataTypeLong;
}
示例10: subscribe
public synchronized void subscribe(DataSourceClient dataSourceClient, OnReceiveListener onReceiveListener) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null || onReceiveListener == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
Status status = dataKitAPIExecute.subscribe(dataSourceClient, onReceiveListener);
if (status == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
}
示例11: unsubscribe
public synchronized Status unsubscribe(DataSourceClient dataSourceClient) throws DataKitException {
if (!dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
if (dataSourceClient == null)
throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
Status status = dataKitAPIExecute.unsubscribe(dataSourceClient.getDs_id()).await();
if (status == null || !dataKitAPIExecute.isConnected())
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
else return status;
}
示例12: startRemoteService
private void startRemoteService() throws DataKitNotFoundException {
Intent intent = new Intent();
intent.setClassName(Constants.PACKAGE_NAME, Constants.SERVICE_NAME);
this.connection = new RemoteServiceConnection();
intent.putExtra("name", context.getPackageName());
intent.putExtra("messenger", this.replyMessenger);
if (!context.bindService(intent, this.connection, Context.BIND_AUTO_CREATE)) {
disconnect();
throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
}
}