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; }
151152153154155156157158159160
((ProcessingResourceMetaData)rmd).getOperationalProperties().setMultipleDeploymentAllowed(true); return rmd; } } catch (ResourceInitializationException e) { throw new ResourceServiceException(e); } throw new ResourceServiceException(new Exception("Uima AS getMetaData() call failed.")); }
172173174175176177178179
public void callProcess(CAS aCAS) throws ResourceServiceException { try { uimaEEEngine.sendAndReceiveCAS(aCAS); } catch (ResourceProcessException e) { if (!ignoreErrors) throw new ResourceServiceException(e); } }
227228229230231232233234
} } } } } catch (ResourceProcessException e) { throw new ResourceServiceException(e); } }
150151152153154155156157158159
170171172173174175176177
*/ public void callProcess(CAS aCAS) throws ResourceServiceException { try { uimaEEEngine.sendAndReceiveCAS(aCAS); } catch (ResourceProcessException e) { throw new ResourceServiceException(e); } }
228229230231232233234235
184185186187188189190191
vinciSaxParser.parse(resultFrame); ProcessingResourceMetaData metadata = (ProcessingResourceMetaData) saxDeser.getObject(); return metadata; } catch (Exception e) { throw new ResourceServiceException(e); } }
236237238239240241242243
AnalysisEngineManagementImpl mbean = (AnalysisEngineManagementImpl) mOwner .getUimaContextAdmin().getManagementInterface(); mbean.reportAnalysisTime(annotationTime); } } catch (Exception e) { throw new ResourceServiceException(e); } }
259260261262263264265266
// 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); } }