Package com.ericsson.otp.erlang

## Class OtpPeer

- java.lang.Object
- - com.ericsson.otp.erlang.AbstractNode
  - - com.ericsson.otp.erlang.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 Summary

    Constructors
    Constructor | Description
    --- | ---
    `OtpPeer​(java.lang.String node)` | Create a peer node.
    `OtpPeer​(java.lang.String node, OtpTransportFactory transportFactory)` | Create a peer node with custom transport factory.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `OtpConnection` | `connect​(OtpSelf self)` | Deprecated. Use the corresponding method in `OtpSelf` instead.

    - ### Methods inherited from class com.ericsson.otp.erlang.AbstractNode

      `alive, cookie, createServerTransport, createServerTransport, createTransport, createTransport, createTransport, host, node, setCookie, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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.