Interface SocketTransport
-
- All Known Implementing Classes:
OFSocketTransportImpl
public interface SocketTransport
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.Socketconnect(java.net.URL aURI, long aTimeout)Creates a socket connection to a given endpoint.java.lang.StringgetName()Returns transport identifierProcessingResourceMetaDatagetProcessingResourceMetaData(java.net.Socket aSocket)Returns metadata associated with the fenced CasProcessorCASprocess(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.SocketExceptionCreates 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- - Socket timesout before receiving response from the fenced CasProcessorjava.net.SocketException- - connection brokenAnalysisEngineProcessException
-
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
-
-