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 ofOtpServerTransport
abstract OtpServerTransport
createServerTransport(OtpLocalNode node)
Create an instance of a server-sideOtpServerTransport
abstract OtpTransport
createTransport(OtpPeer peer)
Create an instance of a client-sideOtpTransport
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 ofOtpTransport
-
-
-
Method Detail
-
createTransport
public abstract OtpTransport createTransport(OtpPeer peer) throws java.io.IOException
Create an instance of a client-sideOtpTransport
- 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-sideOtpServerTransport
- 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 interfaceOtpTransportFactory
- Parameters:
addr
- host name or IP address stringport
- 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 ofOtpTransport
- Specified by:
createTransport
in interfaceOtpTransportFactory
- Parameters:
addr
- peer addressport
- 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 ofOtpServerTransport
- Specified by:
createServerTransport
in interfaceOtpTransportFactory
- Parameters:
port
- port number to listen on- Returns:
- new socket object
- Throws:
java.io.IOException
-
-