Interface SocketTransport

  • All Known Implementing Classes:
    OFSocketTransportImpl

    public interface SocketTransport
    The Interface SocketTransport.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns transport identifier.
        Returns:
        - String uniquely identifying the transport.
      • connect

        java.net.Socket connect​(java.net.URL aURI,
                                long aTimeout)
                         throws java.net.SocketException
        Creates a socket connection to a given endpoint. This method blocks until all Connections are resolved or an error occurs.
        Parameters:
        aURI - URI containing service endpoint info: host & port
        aTimeout - max time in millis to wait for response
        Returns:
        Socket bound to a given endpoint
        Throws:
        java.net.SocketException - Failed to connect
      • process

        CAS process​(java.net.Socket aSocket,
                    CAS aCas)
             throws java.net.SocketTimeoutException,
                    java.net.SocketException,
                    AnalysisEngineProcessException
        Invokes fenced CasProcessor.
        Parameters:
        aSocket - - Socket bound to fenced CasProcessor
        aCas - - CAS to be sent to the CasProcessor for analysis
        Returns:
        - CAS - CAS returned from the fenced CasProcessor
        Throws:
        java.net.SocketTimeoutException - the socket timeout exception
        java.net.SocketException - the socket exception
        AnalysisEngineProcessException - the analysis engine process exception