Class OtpPeer

  • All Implemented Interfaces:
    OtpTransportFactory

    public class OtpPeer
    extends AbstractNode
    Represents a remote OTP node. It acts only as a container for the nodename and other node-specific information that is needed by the OtpConnection class.
    • Constructor Detail

      • OtpPeer

        public OtpPeer​(java.lang.String node)
        Create a peer node.
        Parameters:
        node - the name of the node.
      • OtpPeer

        public OtpPeer​(java.lang.String node,
                       OtpTransportFactory transportFactory)
        Create a peer node with custom transport factory.
        Parameters:
        node - the name of the node.
        transportFactory - custom transport factory
    • Method Detail

      • connect

        @Deprecated
        public OtpConnection connect​(OtpSelf self)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     OtpAuthException
        Deprecated.
        Use the corresponding method in OtpSelf instead.
        Create a connection to a remote node.
        Parameters:
        self - the local node from which you wish to connect.
        Returns:
        a connection to the remote node.
        Throws:
        java.net.UnknownHostException - if the remote host could not be found.
        java.io.IOException - if it was not possible to connect to the remote node.
        OtpAuthException - if the connection was refused by the remote node.