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 Socket
connect(URL aURI, long aTimeout)
Creates a socket connection to a given endpoint.String
getName()
Returns transport identifierProcessingResourceMetaData
getProcessingResourceMetaData(Socket aSocket)
Returns metadata associated with the fenced CasProcessorCAS
process(Socket aSocket, CAS aCas)
Invokes fenced CasProcessor.
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:SocketTransport
Returns transport identifier- Specified by:
getName
in interfaceSocketTransport
- Returns:
- - String uniquely identifying the transport.
-
connect
public Socket connect(URL aURI, long aTimeout) throws SocketException
Description copied from interface:SocketTransport
Creates a socket connection to a given endpoint. This method blocks until all Connections are resolved or an error occurs.- Specified by:
connect
in 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:SocketTransport
Invokes fenced CasProcessor.- Specified by:
process
in 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:SocketTransport
Returns metadata associated with the fenced CasProcessor- Specified by:
getProcessingResourceMetaData
in interfaceSocketTransport
- Parameters:
aSocket
- - socket to the fenced CasProcessor- Returns:
- - metadata
- Throws:
SocketException
- passthru
-
-