Interface SocketTransport
- All Known Implementing Classes:
OFSocketTransportImpl
public interface SocketTransport
-
Method Summary
Modifier and TypeMethodDescriptionCreates a socket connection to a given endpoint.getName()
Returns transport identifiergetProcessingResourceMetaData
(Socket aSocket) Returns metadata associated with the fenced CasProcessorInvokes 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: hostinvalid input: '&port'aTimeout
- - max time in millis to wait for response- Returns:
- - Socket bound to a given endpoint
- Throws:
SocketException
-
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
SocketException
AnalysisEngineProcessException
-
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
-