org.apache.uima.collection.impl.cpm.container.deployer.socket
Class OFSocketTransportImpl

java.lang.Object
  extended by org.apache.uima.collection.impl.cpm.container.deployer.socket.OFSocketTransportImpl
All Implemented Interfaces:
SocketTransport

public class OFSocketTransportImpl
extends java.lang.Object
implements SocketTransport


Constructor Summary
OFSocketTransportImpl()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OFSocketTransportImpl

public OFSocketTransportImpl()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: SocketTransport
Returns transport identifier

Specified by:
getName in interface SocketTransport
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 interface SocketTransport
Returns:
- Socket bound to a given endpoint
Throws:
java.net.SocketException

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 interface SocketTransport
Returns:
- CAS - CAS returned from the fenced CasProcessor
Throws:
java.net.SocketTimeoutException
java.net.SocketException

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 interface SocketTransport
Parameters:
aSocket - - socket to the fenced CasProcessor
Returns:
- metadata
Throws:
java.net.SocketException


Copyright © 2012. All Rights Reserved.