public class CasObjectNetworkCasProcessorImpl extends java.lang.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(java.net.URL aURL)
Connects to a service endpoint defined in the given URL
|
java.net.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
aCasProcessorType
- -
Cas Process configuration from the CPE descriptorResourceConfigurationException
public java.net.URL getEndpoint()
public void connect(java.net.URL aURL) throws ResourceInitializationException
aURL
- -
contains service endpoint info (hots and port)ResourceInitializationException
public void processCas(CAS aCAS) throws ResourceProcessException
processCas
in interface CasObjectProcessor
aCAS
- -
CAS to be analyzedResourceInitializationException
ResourceProcessException
- if processing failspublic void processCas(CAS[] aCASes) throws ResourceProcessException
processCas
in interface CasObjectProcessor
aCASes[]
- -
CASes to be analyzedResourceInitializationException
ResourceProcessException
- 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
ResourceInitializationException
public 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, java.io.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 processingjava.io.IOException
- if an I/O failure occurspublic void collectionProcessComplete(ProcessTrace aTrace) throws ResourceProcessException, java.io.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 processingjava.io.IOException
- if an I/O failure occursCopyright © 2012. All Rights Reserved.