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 descriptorResourceConfigurationException
public 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 CasObjectProcessor
aCAS
- -
CAS to be analyzedResourceInitializationException
- wraps Exception, SocketExceptionResourceProcessException
- if processing failspublic void processCas(CAS[] aCASes) throws ResourceProcessException
processCas
in interface CasObjectProcessor
aCASes
- - an array of CASes to be analyzedResourceInitializationException
- wraps SocketException, SocketTimeoutExceptionResourceProcessException
- if processing fails for any of the CASespublic 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 CasObjectProcessor
aTypeSystem
- the type system to useResourceInitializationException
- if the type system is not compatible with this Cas Consumerpublic boolean isStateless()
CasProcessor
isStateless
in interface CasProcessor
public boolean isReadOnly()
CasProcessor
isReadOnly
in interface CasProcessor
public ProcessingResourceMetaData getProcessingResourceMetaData()
ProcessingResourceMetaData
object returned from the remote CasProcessor.getProcessingResourceMetaData
in interface CasProcessor
public void batchProcessComplete(ProcessTrace aTrace) throws ResourceProcessException, IOException
CasProcessor
batchProcessComplete
in interface CasProcessor
aTrace
- 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 CasProcessor
aTrace
- 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 © 2006–2024 The Apache Software Foundation. All rights reserved.