Package com.ericsson.otp.erlang

# Class OtpGenericTransportFactory

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

All Implemented Interfaces:
  `OtpTransportFactory`

public abstract class OtpGenericTransportFactory extends 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

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(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(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 Details

### OtpGenericTransportFactory

public OtpGenericTransportFactory()

## Method Details

### createTransport

public abstract OtpTransport createTransport(OtpPeer peer) throws 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:
  `IOException`

### createServerTransport

public abstract OtpServerTransport createServerTransport(OtpLocalNode node) throws 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:
  `IOException`

### createTransport

public OtpTransport createTransport(String addr, int port) throws 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:
  `IOException`

### createTransport

public OtpTransport createTransport(InetAddress addr, int port) throws 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:
  `IOException`

### createServerTransport

public OtpServerTransport createServerTransport(int port) throws 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:
  `IOException`