Package com.ericsson.otp.erlang

## Class OtpGenericTransportFactory

- java.lang.Object
- - com.ericsson.otp.erlang.OtpGenericTransportFactory

- All Implemented Interfaces:
    `OtpTransportFactory`

      public abstract class OtpGenericTransportFactory
      extends java.lang.Object
      implements OtpTransportFactory

  Transport factory abstract class used to create client-side and server-side transport instances defined using generic peers and local nodes (instead of a host + port combination as expected in the base OtpTransportFactory). It allows the creation of a transport using Unix Domain Sockets for example. OtpGenericTransportFactory is created as a subclass of OtpTransportFactory to keep backwards compatibility and ease the integration within existing Jinterface code, but in practice it doesn't support the 3 original methods.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OtpGenericTransportFactory()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `OtpServerTransport` | `createServerTransport​(int port)` | Create instance of `OtpServerTransport`
    `abstract OtpServerTransport` | `createServerTransport​(OtpLocalNode node)` | Create an instance of a server-side `OtpServerTransport`
    `abstract OtpTransport` | `createTransport​(OtpPeer peer)` | Create an instance of a client-side `OtpTransport`
    `OtpTransport` | `createTransport​(java.lang.String addr, int port)` | Implement the 3 original methods by throwing an exception as the usage of a port is not supported by this subclass of OtpTransportFactory.
    `OtpTransport` | `createTransport​(java.net.InetAddress addr, int port)` | Create instance of `OtpTransport`

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

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

- - ### Constructor Detail

    - #### OtpGenericTransportFactory

          public OtpGenericTransportFactory()

  - ### Method Detail

    - #### createTransport

          public abstract OtpTransport createTransport​(OtpPeer peer)
                                                throws java.io.IOException

      Create an instance of a client-side `OtpTransport`
      Parameters:
        `peer` - the peer identifying the server to connect to
      Returns:
        a new transport object
      Throws:
        `java.io.IOException`

    - #### createServerTransport

          public abstract OtpServerTransport createServerTransport​(OtpLocalNode node)
                                                            throws java.io.IOException

      Create an instance of a server-side `OtpServerTransport`
      Parameters:
        `node` - the local node identifying the transport to create server-side
      Returns:
        a new transport object
      Throws:
        `java.io.IOException`

    - #### createTransport

          public OtpTransport createTransport​(java.lang.String addr,
                                              int port)
                                       throws java.io.IOException

      Implement the 3 original methods by throwing an exception as the usage of a port is not supported by this subclass of OtpTransportFactory.
      Specified by:
        `createTransport` in interface `OtpTransportFactory`
      Parameters:
        `addr` - host name or IP address string
        `port` - port number
      Returns:
        new socket object
      Throws:
        `java.io.IOException`

    - #### createTransport

          public OtpTransport createTransport​(java.net.InetAddress addr,
                                              int port)
                                       throws java.io.IOException

      Description copied from interface: `OtpTransportFactory`
      Create instance of `OtpTransport`
      Specified by:
        `createTransport` in interface `OtpTransportFactory`
      Parameters:
        `addr` - peer address
        `port` - port number
      Returns:
        new socket object
      Throws:
        `java.io.IOException`

    - #### createServerTransport

          public OtpServerTransport createServerTransport​(int port)
                                                   throws java.io.IOException

      Description copied from interface: `OtpTransportFactory`
      Create instance of `OtpServerTransport`
      Specified by:
        `createServerTransport` in interface `OtpTransportFactory`
      Parameters:
        `port` - port number to listen on
      Returns:
        new socket object
      Throws:
        `java.io.IOException`