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.Socketconnect(java.net.URL aURI, long aTimeout)Creates a socket connection to a given endpoint.java.lang.StringgetName()Returns transport identifier.ProcessingResourceMetaDatagetProcessingResourceMetaData(java.net.Socket aSocket)Returns metadata associated with the fenced CasProcessor.CASprocess(java.net.Socket aSocket, CAS aCas)Invokes fenced CasProcessor.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:SocketTransportReturns transport identifier.- Specified by:
getNamein interfaceSocketTransport- Returns:
- - String uniquely identifying the transport.
-
connect
public java.net.Socket connect(java.net.URL aURI, long aTimeout) throws java.net.SocketExceptionDescription 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:
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: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:
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:SocketTransportReturns metadata associated with the fenced CasProcessor.- Specified by:
getProcessingResourceMetaDatain interfaceSocketTransport- Parameters:
aSocket- - socket to the fenced CasProcessor- Returns:
- - metadata
- Throws:
java.net.SocketException- passthru
-
-