Package com.ericsson.otp.erlang
Class OtpGenericTransportFactory
java.lang.Object
com.ericsson.otp.erlang.OtpGenericTransportFactory
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptioncreateServerTransport(int port) Create instance ofOtpServerTransportabstract OtpServerTransportCreate an instance of a server-sideOtpServerTransportabstract OtpTransportcreateTransport(OtpPeer peer) Create an instance of a client-sideOtpTransportcreateTransport(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.createTransport(InetAddress addr, int port) Create instance ofOtpTransport
-
Constructor Details
-
OtpGenericTransportFactory
public OtpGenericTransportFactory()
-
-
Method Details
-
createTransport
Create an instance of a client-sideOtpTransport- Parameters:
peer- the peer identifying the server to connect to- Returns:
- a new transport object
- Throws:
IOException
-
createServerTransport
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:
IOException
-
createTransport
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:
createTransportin interfaceOtpTransportFactory- Parameters:
addr- host name or IP address stringport- port number- Returns:
- new socket object
- Throws:
IOException
-
createTransport
Description copied from interface:OtpTransportFactoryCreate instance ofOtpTransport- Specified by:
createTransportin interfaceOtpTransportFactory- Parameters:
addr- peer addressport- port number- Returns:
- new socket object
- Throws:
IOException
-
createServerTransport
Description copied from interface:OtpTransportFactoryCreate instance ofOtpServerTransport- Specified by:
createServerTransportin interfaceOtpTransportFactory- Parameters:
port- port number to listen on- Returns:
- new socket object
- Throws:
IOException
-