public class OtpEpmd extends Object
Nodes wishing to contact other nodes must first request information from Epmd
before a connection can be set up, however this is done automatically by
OtpSelf.connect() when necessary.
The methods publishPort() and
unPublishPort() will fail if an Epmd
process is not running on the localhost. Additionally
lookupPort() will fail if there is no Epmd
process running on the host where the specified node is running. See the
Erlang documentation for information about starting Epmd.
This class contains only static methods, there are no constructors.
| Modifier and Type | Method and Description |
|---|---|
static String[] |
lookupNames() |
static String[] |
lookupNames(InetAddress address) |
static String[] |
lookupNames(InetAddress address,
OtpTransportFactory transportFactory) |
static String[] |
lookupNames(OtpTransportFactory transportFactory) |
static int |
lookupPort(AbstractNode node)
Determine what port a node listens for incoming connections on.
|
static boolean |
publishPort(OtpLocalNode node)
Register with Epmd, so that other nodes are able to find and connect to
it.
|
static void |
unPublishPort(OtpLocalNode node)
Unregister from Epmd.
|
static void |
useEpmdPort(int port)
Set the port number to be used to contact the epmd process.
|
public static void useEpmdPort(int port)
public static int lookupPort(AbstractNode node) throws IOException
IOException - if there was no response from the name server.public static boolean publishPort(OtpLocalNode node) throws IOException
node - the server node that should be registered with Epmd.IOException - if there was no response from the name server.public static void unPublishPort(OtpLocalNode node)
This method does not report any failures.
public static String[] lookupNames() throws IOException
IOExceptionpublic static String[] lookupNames(OtpTransportFactory transportFactory) throws IOException
IOExceptionpublic static String[] lookupNames(InetAddress address) throws IOException
IOExceptionpublic static String[] lookupNames(InetAddress address, OtpTransportFactory transportFactory) throws IOException
IOExceptionCopyright © 2020. All rights reserved.