public abstract class OtpGenericTransportFactory extends java.lang.Object implements OtpTransportFactory
Constructor and Description |
---|
OtpGenericTransportFactory() |
Modifier and Type | Method and Description |
---|---|
OtpServerTransport |
createServerTransport(int port)
Create instance of
OtpServerTransport |
abstract OtpServerTransport |
createServerTransport(OtpLocalNode node)
Create an instance of a server-side
OtpServerTransport |
OtpTransport |
createTransport(java.net.InetAddress addr,
int port)
Create instance of
OtpTransport |
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.
|
public abstract OtpTransport createTransport(OtpPeer peer) throws java.io.IOException
OtpTransport
peer
- the peer identifying the server to connect tojava.io.IOException
public abstract OtpServerTransport createServerTransport(OtpLocalNode node) throws java.io.IOException
OtpServerTransport
node
- the local node identifying the transport to create server-sidejava.io.IOException
public OtpTransport createTransport(java.lang.String addr, int port) throws java.io.IOException
createTransport
in interface OtpTransportFactory
addr
- host name or IP address stringport
- port numberjava.io.IOException
public OtpTransport createTransport(java.net.InetAddress addr, int port) throws java.io.IOException
OtpTransportFactory
OtpTransport
createTransport
in interface OtpTransportFactory
addr
- peer addressport
- port numberjava.io.IOException
public OtpServerTransport createServerTransport(int port) throws java.io.IOException
OtpTransportFactory
OtpServerTransport
createServerTransport
in interface OtpTransportFactory
port
- port number to listen onjava.io.IOException