Package org.apache.uima.adapter.vinci
Class VinciAnalysisEngineServiceStub
- java.lang.Object
-
- org.apache.uima.adapter.vinci.VinciAnalysisEngineServiceStub
-
- All Implemented Interfaces:
AnalysisEngineServiceStub,ResourceServiceStub
public class VinciAnalysisEngineServiceStub extends java.lang.Object implements AnalysisEngineServiceStub
The Class VinciAnalysisEngineServiceStub.
-
-
Field Summary
Fields Modifier and Type Field Description private static booleandebugThe Constant debug.private intmGetMetaDataTimeoutTimeout to use for getMetaData calls.private ResourcemOwnerThe m owner.private intmTimeoutTimeout to use for process and collectionProcessComplete calls.private VinciClientmVinciClientThe m vinci client.private static java.util.ListSUPPORT_XCAS_V1Value to return from callGetSupportedXCasVersions method for older services that don't actually implement this method.
-
Constructor Summary
Constructors Constructor Description VinciAnalysisEngineServiceStub(java.lang.String endpointURI, java.lang.Integer timeout, Resource owner, Parameter[] parameters)Instantiates a new vinci analysis engine service stub.VinciAnalysisEngineServiceStub(java.lang.String endpointURI, Resource owner)Instantiates a new vinci analysis engine service stub.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcallBatchProcessComplete()Call batch process complete.voidcallCollectionProcessComplete()Call collection process complete.ResourceMetaDatacallGetMetaData()Call get meta data.java.util.ListcallGetSupportedXCasVersions()Call get supported X cas versions.booleancallIsReadOnly()Call is read only.booleancallIsStateless()Call is stateless.voidcallProcess(CAS aCAS)Call process.voidcallProcessCas(CAS aCAS)Call process cas.voiddestroy()Destroy.private voiddoProcess(CAS aCAS)The actual process call.protected booleanisSocketKeepAliveEnabled()Gets whether socket keepAlive is enabled, by consulting the PerformanceTuningSettings.
-
-
-
Field Detail
-
mVinciClient
private VinciClient mVinciClient
The m vinci client.
-
mOwner
private Resource mOwner
The m owner.
-
mTimeout
private int mTimeout
Timeout to use for process and collectionProcessComplete calls.
-
mGetMetaDataTimeout
private int mGetMetaDataTimeout
Timeout to use for getMetaData calls.
-
debug
private static final boolean debug
The Constant debug.
-
SUPPORT_XCAS_V1
private static final java.util.List SUPPORT_XCAS_V1
Value to return from callGetSupportedXCasVersions method for older services that don't actually implement this method.
-
-
Constructor Detail
-
VinciAnalysisEngineServiceStub
public VinciAnalysisEngineServiceStub(java.lang.String endpointURI, Resource owner) throws ResourceInitializationExceptionInstantiates a new vinci analysis engine service stub.- Parameters:
endpointURI- the endpoint URIowner- the owner- Throws:
ResourceInitializationException- the resource initialization exception
-
VinciAnalysisEngineServiceStub
public VinciAnalysisEngineServiceStub(java.lang.String endpointURI, java.lang.Integer timeout, Resource owner, Parameter[] parameters) throws ResourceInitializationExceptionInstantiates a new vinci analysis engine service stub.- Parameters:
endpointURI- the endpoint URItimeout- the timeoutowner- the ownerparameters- the parameters- Throws:
ResourceInitializationException- the resource initialization exception
-
-
Method Detail
-
callGetMetaData
public ResourceMetaData callGetMetaData() throws ResourceServiceException
Call get meta data.- Specified by:
callGetMetaDatain interfaceResourceServiceStub- Returns:
- the resource meta data
- Throws:
ResourceServiceException- the resource service exception- See Also:
ResourceServiceStub.callGetMetaData()
-
callProcess
public void callProcess(CAS aCAS) throws ResourceServiceException
Call process.- Specified by:
callProcessin interfaceAnalysisEngineServiceStub- Parameters:
aCAS- the a CAS- Throws:
ResourceServiceException- the resource service exception- See Also:
AnalysisEngineServiceStub.callProcess(CAS)
-
callProcessCas
public void callProcessCas(CAS aCAS) throws ResourceServiceException
Call process cas.- Parameters:
aCAS- the a CAS- Throws:
ResourceServiceException- the resource service exception- See Also:
CasObjectProcessor.processCas(CAS)
-
doProcess
private void doProcess(CAS aCAS) throws ResourceServiceException
The actual process call.- Parameters:
aCAS- the a CAS- Throws:
ResourceServiceException- the resource service exception
-
destroy
public void destroy()
Destroy.- Specified by:
destroyin interfaceResourceServiceStub- See Also:
ResourceServiceStub.destroy()
-
callBatchProcessComplete
public void callBatchProcessComplete() throws ResourceServiceExceptionCall batch process complete.- Specified by:
callBatchProcessCompletein interfaceAnalysisEngineServiceStub- Throws:
ResourceServiceException- the resource service exception- See Also:
CasProcessor.batchProcessComplete(org.apache.uima.util.ProcessTrace)
-
callCollectionProcessComplete
public void callCollectionProcessComplete() throws ResourceServiceExceptionCall collection process complete.- Specified by:
callCollectionProcessCompletein interfaceAnalysisEngineServiceStub- Throws:
ResourceServiceException- the resource service exception- See Also:
CasProcessor.collectionProcessComplete(org.apache.uima.util.ProcessTrace)
-
callIsReadOnly
public boolean callIsReadOnly() throws ResourceServiceExceptionCall is read only.- Returns:
- true, if successful
- Throws:
ResourceServiceException- the resource service exception- See Also:
CasProcessor.isReadOnly()
-
callIsStateless
public boolean callIsStateless() throws ResourceServiceExceptionCall is stateless.- Returns:
- true, if successful
- Throws:
ResourceServiceException- the resource service exception- See Also:
CasProcessor.isStateless()
-
callGetSupportedXCasVersions
public java.util.List callGetSupportedXCasVersions() throws ResourceServiceExceptionCall get supported X cas versions.- Returns:
- the list
- Throws:
ResourceServiceException- the resource service exception
-
isSocketKeepAliveEnabled
protected boolean isSocketKeepAliveEnabled()
Gets whether socket keepAlive is enabled, by consulting the PerformanceTuningSettings. (If no setting specified, defaults to true.)- Returns:
- if socketKeepAlive is enabled
-
-