Class OFSocketTransportImpl
- java.lang.Object
-
- org.apache.uima.collection.impl.cpm.container.deployer.socket.OFSocketTransportImpl
-
- All Implemented Interfaces:
SocketTransport
public class OFSocketTransportImpl extends java.lang.Object implements SocketTransport
The Class OFSocketTransportImpl.
-
-
Constructor Summary
Constructors Constructor Description OFSocketTransportImpl()
Instantiates a new OF socket transport impl.
-
Method Summary
All Methods Instance Methods Concrete 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
public java.lang.String getName()
Description copied from interface:SocketTransport
Returns transport identifier.- Specified by:
getName
in interfaceSocketTransport
- Returns:
- - String uniquely identifying the transport.
-
connect
public java.net.Socket connect(java.net.URL aURI, long aTimeout) throws java.net.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:
java.net.SocketException
- Failed to connect
-
process
public CAS process(java.net.Socket aSocket, CAS aCas) throws java.net.SocketTimeoutException, java.net.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:
java.net.SocketTimeoutException
- the socket timeout exceptionjava.net.SocketException
- the socket exception
-
getProcessingResourceMetaData
public ProcessingResourceMetaData getProcessingResourceMetaData(java.net.Socket aSocket) throws java.net.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:
java.net.SocketException
- passthru
-
-