Interface SocketTransport
-
- All Known Implementing Classes:
OFSocketTransportImpl
public interface SocketTransport
The Interface SocketTransport.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.Socket
connect(java.net.URL aURI, long aTimeout)
Creates a socket connection to a given endpoint.java.lang.String
getName()
Returns transport identifier.ProcessingResourceMetaData
getProcessingResourceMetaData(java.net.Socket aSocket)
Returns metadata associated with the fenced CasProcessor.CAS
process(java.net.Socket aSocket, CAS aCas)
Invokes fenced CasProcessor.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns transport identifier.- Returns:
- - String uniquely identifying the transport.
-
connect
java.net.Socket connect(java.net.URL aURI, long aTimeout) throws java.net.SocketException
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:
java.net.SocketException
- Failed to connect
-
process
CAS process(java.net.Socket aSocket, CAS aCas) throws java.net.SocketTimeoutException, java.net.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:
java.net.SocketTimeoutException
- the socket timeout exceptionjava.net.SocketException
- the socket exceptionAnalysisEngineProcessException
- the analysis engine process exception
-
getProcessingResourceMetaData
ProcessingResourceMetaData getProcessingResourceMetaData(java.net.Socket aSocket) throws java.net.SocketException, AnalysisEngineProcessException
Returns metadata associated with the fenced CasProcessor.- Parameters:
aSocket
- - socket to the fenced CasProcessor- Returns:
- - metadata
- Throws:
java.net.SocketException
- passthruAnalysisEngineProcessException
- passthru
-
-