Class OFSocketTransportImpl
java.lang.Object
org.apache.uima.collection.impl.cpm.container.deployer.socket.OFSocketTransportImpl
- All Implemented Interfaces:
SocketTransport
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
OFSocketTransportImpl
public OFSocketTransportImpl()
-
-
Method Details
-
getName
Description copied from interface:SocketTransportReturns transport identifier- Specified by:
getNamein interfaceSocketTransport- Returns:
- - String uniquely identifying the transport.
-
connect
Description copied from interface:SocketTransportCreates a socket connection to a given endpoint. This method blocks until all Connections are resolved or an error occurs.- Specified by:
connectin interfaceSocketTransport- 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
Description copied from interface:SocketTransportInvokes fenced CasProcessor.- Specified by:
processin interfaceSocketTransport- 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- - Socket timesout before receiving response from the fenced CasProcessorSocketException- - connection broken
-
getProcessingResourceMetaData
public ProcessingResourceMetaData getProcessingResourceMetaData(Socket aSocket) throws SocketException Description copied from interface:SocketTransportReturns metadata associated with the fenced CasProcessor- Specified by:
getProcessingResourceMetaDatain interfaceSocketTransport- Parameters:
aSocket- - socket to the fenced CasProcessor- Returns:
- - metadata
- Throws:
SocketException- passthru
-