public class CasObjectNetworkCasProcessorImpl extends Object implements CasObjectProcessor
CasObjectProcessor interface used for both Local and Remote
CasObjectProcessors. This objects plugs in a transport object defined in the CPE Descriptor and
uses it to delegate analysis of CAS to a remote AE.| Constructor and Description |
|---|
CasObjectNetworkCasProcessorImpl(CpeCasProcessor aCasProcessor)
Using information from the CPE descriptor creates an instance of Transport class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
batchProcessComplete(ProcessTrace aTrace)
Completes the processing of a batch.
|
void |
collectionProcessComplete(ProcessTrace aTrace)
Closes the connection to the remote service
|
void |
connect(URL aURL)
Connects to a service endpoint defined in the given URL
|
URL |
getEndpoint()
Creates URL object containing service endpoint info ( host and port)
|
ProcessingResourceMetaData |
getProcessingResourceMetaData()
Returns
ProcessingResourceMetaData object returned from the remote CasProcessor. |
boolean |
isReadOnly()
Gets whether this is a read-only CAS Processor, which does not modify the CAS.
|
boolean |
isStateless()
Gets whether this is a stateless CAS Processor.
|
void |
processCas(CAS aCAS)
Uses configured transport to delegate given CAS to the remote service.
|
void |
processCas(CAS[] aCASes)
Uses configured transport to delegate given CASes to the remote service
|
void |
typeSystemInit(TypeSystem aTypeSystem)
Informs this CasConsumer that the CAS TypeSystem has changed.
|
public CasObjectNetworkCasProcessorImpl(CpeCasProcessor aCasProcessor) throws ResourceConfigurationException
aCasProcessor - -
Cas Process configuration from the CPE descriptorResourceConfigurationExceptionpublic URL getEndpoint()
public void connect(URL aURL) throws ResourceInitializationException
aURL - -
contains service endpoint info (hots and port)ResourceInitializationException - wraps SocketExceptionpublic void processCas(CAS aCAS) throws ResourceProcessException
processCas in interface CasObjectProcessoraCAS - CAS to be analyzedResourceProcessException - wraps Exception, SocketExceptionpublic void processCas(CAS[] aCASes) throws ResourceProcessException
processCas in interface CasObjectProcessoraCASes - - an array of CASes to be analyzedResourceProcessException - wraps SocketException, SocketTimeoutExceptionpublic void typeSystemInit(TypeSystem aTypeSystem) throws ResourceInitializationException
CasObjectProcessor
In this method, the CasConsumer should use the TypeSystem to resolve the names of Type
and Features to the actual Type and
Feature objects, which can then be used during processing.
typeSystemInit in interface CasObjectProcessoraTypeSystem - the type system to useResourceInitializationException - if the type system is not compatible with this Cas Consumerpublic boolean isStateless()
CasProcessorisStateless in interface CasProcessorpublic boolean isReadOnly()
CasProcessorisReadOnly in interface CasProcessorpublic ProcessingResourceMetaData getProcessingResourceMetaData()
ProcessingResourceMetaData object returned from the remote CasProcessor.getProcessingResourceMetaData in interface CasProcessorpublic void batchProcessComplete(ProcessTrace aTrace) throws ResourceProcessException, IOException
CasProcessorbatchProcessComplete in interface CasProcessoraTrace - an object that records information, such as timing, about this method's execution.ResourceProcessException - if an exception occurs during processingIOException - if an I/O failure occurspublic void collectionProcessComplete(ProcessTrace aTrace) throws ResourceProcessException, IOException
collectionProcessComplete in interface CasProcessoraTrace - an object that records information, such as timing, about this method's execution.ResourceProcessException - if an exception occurs during processingIOException - if an I/O failure occursCopyright © 2018. All rights reserved.