182183184185186187188189190
* if a CAS is not available within the timeout period. */ protected CAS getCasFromPool(int aTimeout) throws ResourceServiceException { CAS cas = getCasPool().getCas(aTimeout); if (cas == null) { throw new ResourceServiceException(ResourceServiceException.RESOURCE_UNAVAILABLE, null); } return cas; }
176177178179180181182183
vinciSaxParser.parse(resultFrame); AnalysisEngineMetaData metadata = (AnalysisEngineMetaData) saxDeser.getObject(); return metadata; } catch (Exception e) { throw new ResourceServiceException(e); } }
216217218219220221222223
AnalysisEngineManagementImpl mbean = (AnalysisEngineManagementImpl) mOwner .getManagementInterface(); mbean.reportAnalysisTime(annotationTime); } } catch (Exception e) { throw new ResourceServiceException(e); } }
232233234235236237238239
// Add Vinci Command, so that the receiving service knows what to do queryFrame.fadd("vinci:COMMAND", Constants.BATCH_PROCESS_COMPLETE); mVinciClient.send(queryFrame); // oneway call } catch (Exception e) { throw new ResourceServiceException(e); } }
249250251252253254255256
queryFrame.fadd("vinci:COMMAND", Constants.COLLECTION_PROCESS_COMPLETE); // make RPC call (return val ignored) mVinciClient.rpc(queryFrame, mTimeout); } catch (Exception e) { throw new ResourceServiceException(e); } }
172173174175176177178179
vinciSaxParser.parse(resultFrame); ProcessingResourceMetaData metadata = (ProcessingResourceMetaData) saxDeser.getObject(); return metadata; } catch (Exception e) { throw new ResourceServiceException(e); } }
224225226227228229230231
AnalysisEngineManagementImpl mbean = (AnalysisEngineManagementImpl) mOwner .getUimaContextAdmin().getManagementInterface(); mbean.reportAnalysisTime(annotationTime); } } catch (Exception e) { throw new ResourceServiceException(e); } }
247248249250251252253254
264265266267268269270271
queryFrame.fadd("vinci:COMMAND", Constants.COLLECTION_PROCESS_COMPLETE); // make RPC call (no return val) mVinciClient.rpc(queryFrame, mTimeout); } catch (Exception e) { throw new ResourceServiceException(e); } }
283284285286287288289290
// make RPC call VinciFrame resultFrame = mVinciClient.rpc(queryFrame); boolean result = resultFrame.fgetBoolean("Result"); return result; } catch (Exception e) { throw new ResourceServiceException(e); } }