com.ibm.net.rdma.jverbs.endpoints

Class RdmaServerEndpoint<C extends RdmaEndpoint>

  • java.lang.Object
    • com.ibm.net.rdma.jverbs.endpoints.RdmaServerEndpoint<C>


  • public class RdmaServerEndpoint<C extends RdmaEndpoint>
    extends java.lang.Object
    Represent a server endpoint. Conceptually it is similar to a server socket. RdmaServerEndpoint need to bind and listen for any incoming connection requests and accept.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      C accept()
      Initiates the accept and waits for connect request.
      RdmaServerEndpoint<C> bind(java.net.SocketAddress srcAddress, int backlog)
      Bind this server endpoint to a specific IP address / port.
      void close()
      Close this endpoint.
      ConnectionId getConnectionId()
      Gets the ConnectionId for this endpoint.
      java.net.SocketAddress getSourceAddress()
      Gets the local address information of this endpoint.
      int getSourcePort()
      Gets the local port information of this endpoint.
      boolean isBound()
      Checks if is this endpoint is bound to a address.
      boolean isClosed()
      Checks if is this endpoint is closed.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • accept

        public C accept()
                 throws java.io.IOException,
                        java.lang.InterruptedException
        Initiates the accept and waits for connect request.
        Returns:
        accepted RdmaEndpoint
        Throws:
        java.io.IOException - If an I/O error occurs
        java.lang.InterruptedException - If accept is interrupted
      • bind

        public RdmaServerEndpoint<C> bind(java.net.SocketAddress srcAddress,
                                          int backlog)
                                   throws java.io.IOException
        Bind this server endpoint to a specific IP address / port.
        Parameters:
        srcAddress - the source
        backlog - the backlog
        Returns:
        the rdma server endpoint
        Throws:
        java.io.IOException - If binding to local address failed.
      • close

        public void close()
                   throws java.io.IOException
        Close this endpoint. Destroy the Queue Pair (QP).
        Throws:
        java.io.IOException - If an I/O error occurs
      • getConnectionId

        public ConnectionId getConnectionId()
        Gets the ConnectionId for this endpoint.
        Returns:
        the ConnectionId.
      • getSourceAddress

        public java.net.SocketAddress getSourceAddress()
                                                throws java.io.IOException
        Gets the local address information of this endpoint.
        Returns:
        the local socket address.
        Throws:
        java.io.IOException - If an I/O error occurs
      • getSourcePort

        public int getSourcePort()
                          throws java.io.IOException
        Gets the local port information of this endpoint.
        Returns:
        the local port.
        Throws:
        java.io.IOException - If an I/O error occurs
      • isBound

        public boolean isBound()
        Checks if is this endpoint is bound to a address.
        Returns:
        true, if is bound
      • isClosed

        public boolean isClosed()
        Checks if is this endpoint is closed.
        Returns:
        true, if is closed