Class OFSocketTransportImpl
- java.lang.Object
-
- org.apache.uima.collection.impl.cpm.container.deployer.socket.OFSocketTransportImpl
-
- All Implemented Interfaces:
SocketTransport
public class OFSocketTransportImpl extends Object implements SocketTransport
-
-
Constructor Summary
Constructors Constructor Description OFSocketTransportImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Socketconnect(URL aURI, long aTimeout)Creates a socket connection to a given endpoint.StringgetName()Returns transport identifierProcessingResourceMetaDatagetProcessingResourceMetaData(Socket aSocket)Returns metadata associated with the fenced CasProcessorCASprocess(Socket aSocket, CAS aCas)Invokes fenced CasProcessor.
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:SocketTransportReturns transport identifier- Specified by:
getNamein interfaceSocketTransport- Returns:
- - String uniquely identifying the transport.
-
connect
public Socket connect(URL aURI, long aTimeout) throws SocketException
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
public CAS process(Socket aSocket, CAS aCas) throws SocketTimeoutException, SocketException
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
-
-