Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OFSocketTransportImpl

        public OFSocketTransportImpl()
        Instantiates a new OF socket transport impl.
    • 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
        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

        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
        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
      • 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 - passthru