Interface SocketTransport
- All Known Implementing Classes:
OFSocketTransportImpl
public interface SocketTransport
The Interface SocketTransport.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a socket connection to a given endpoint.getName()Returns transport identifier.getProcessingResourceMetaData(Socket aSocket) Returns metadata associated with the fenced CasProcessor.Invokes fenced CasProcessor.
-
Method Details
-
getName
String getName()Returns transport identifier.- Returns:
- - String uniquely identifying the transport.
-
connect
Creates a socket connection to a given endpoint. This method blocks until all Connections are resolved or an error occurs.- Parameters:
aURI- URI containing service endpoint info: host & portaTimeout- max time in millis to wait for response- Returns:
- Socket bound to a given endpoint
- Throws:
SocketException- Failed to connect
-
process
CAS process(Socket aSocket, CAS aCas) throws SocketTimeoutException, SocketException, AnalysisEngineProcessException Invokes fenced CasProcessor.- Parameters:
aSocket- - Socket bound to fenced CasProcessoraCas- - CAS to be sent to the CasProcessor for analysis- Returns:
- - CAS - CAS returned from the fenced CasProcessor
- Throws:
SocketTimeoutException- the socket timeout exceptionSocketException- the socket exceptionAnalysisEngineProcessException- the analysis engine process exception
-
getProcessingResourceMetaData
ProcessingResourceMetaData getProcessingResourceMetaData(Socket aSocket) throws SocketException, AnalysisEngineProcessException Returns metadata associated with the fenced CasProcessor.- Parameters:
aSocket- - socket to the fenced CasProcessor- Returns:
- - metadata
- Throws:
SocketException- passthruAnalysisEngineProcessException- passthru
-