public final class InetTransport
extends java.lang.Object
implements org.opendof.core.transport.Transport, org.opendof.core.oal.DOFImmutable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV4
The default address for DOF on IPv4 for multicast traffic using UDP.
|
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV6_ADMIN |
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV6_GLOBAL |
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV6_LINK |
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV6_NODE
The default address for DOF on IPv6 for multicast traffic using UDP.
|
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV6_ORG |
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV6_SITE |
static java.lang.String |
DEFAULT_MULTICAST_ADDRESS_IPV6_SUBNET |
static int |
DEFAULT_MULTICAST_PORT
The default port for the DOF protocol stack multicast/secure transport.
|
static int |
DEFAULT_SECURE_TUNNEL_PORT
The default port for the DOF secure tunnel.
|
static int |
DEFAULT_UNICAST_PORT
The default port for the DOF protocol stack unicast.
|
static int |
DEFAULT_UNSECURE_TUNNEL_PORT
The default port for the DOF tunneling protocol.
|
| Constructor and Description |
|---|
InetTransport() |
| Modifier and Type | Method and Description |
|---|---|
static org.opendof.core.oal.DOFAddress |
createAddress(java.net.InetAddress addr,
int port)
Create an address based on an InetSocketAddress.
|
static org.opendof.core.oal.DOFAddress |
createAddress(java.net.InetSocketAddress addr)
Create an address based on an InetSocketAddress.
|
static org.opendof.core.oal.DOFAddress |
createAddress(java.lang.String address)
Create an address from a string representation of an Inet transport address.
|
static org.opendof.core.oal.DOFAddress |
createAddress(java.lang.String host,
int port)
Create an address based on a host and port.
|
static org.opendof.core.oal.DOFAddress |
createAddress(java.lang.String host,
int port,
java.net.InetAddress inf)
Create an address bound to a specific network interface.
|
static org.opendof.core.oal.DOFAddress |
createAddress(java.lang.String host,
int port,
java.lang.String inf)
Create an address bound to a specific network interface.
|
void |
destroy() |
org.opendof.core.oal.DOFAddress.Type |
getAddressType(org.opendof.core.oal.DOFAddress addr) |
int |
getMaxSize(org.opendof.core.oal.DOFConnection.Type type) |
int |
getMinSize(org.opendof.core.oal.DOFConnection.Type type) |
org.opendof.core.transport.Connection |
open(org.opendof.core.transport.ConnectionConfig config,
org.opendof.core.oal.DOFAddress peer,
org.opendof.core.transport.TransportHandler handler,
org.opendof.core.oal.DOFConnection.Type type,
org.opendof.core.transport.ConnectionCallback context) |
org.opendof.core.transport.Server |
start(org.opendof.core.transport.ServerConfig config,
org.opendof.core.oal.DOFAddress address,
org.opendof.core.transport.TransportHandler handler,
org.opendof.core.oal.DOFServer.Type type,
org.opendof.core.transport.Server relatedServer,
org.opendof.core.transport.ServerCallback context) |
public static final int DEFAULT_MULTICAST_PORT
public static final int DEFAULT_UNICAST_PORT
public static final int DEFAULT_SECURE_TUNNEL_PORT
public static final int DEFAULT_UNSECURE_TUNNEL_PORT
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV4
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV6_NODE
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV6_LINK
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV6_SUBNET
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV6_ADMIN
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV6_SITE
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV6_ORG
public static final java.lang.String DEFAULT_MULTICAST_ADDRESS_IPV6_GLOBAL
public void destroy()
destroy in interface org.opendof.core.transport.Transportpublic static org.opendof.core.oal.DOFAddress createAddress(java.lang.String address)
address:port OR host:port OR host/address:port.Examples:
"localhost:3567" "localhost/127.0.0.1:3567" "::1:3567"Where 'address' is a hostname or InetAddress string representation. Where 'port' is a decimal number from 0 to 65535.
An attempt will be made to resolve the hostname into an InetSocketAddress.
address - The string representation of the address.InetSocketAddresspublic static org.opendof.core.oal.DOFAddress createAddress(java.lang.String host,
int port)
host - The host, which can either be a host name or a standard
string representation of the address (like A.B.C.D). Null is not allowed.port - The port number.public static org.opendof.core.oal.DOFAddress createAddress(java.net.InetSocketAddress addr)
addr - The address. Null is not allowed.public static org.opendof.core.oal.DOFAddress createAddress(java.net.InetAddress addr,
int port)
addr - The address. Null is not allowed.port - The port.public static org.opendof.core.oal.DOFAddress createAddress(java.lang.String host,
int port,
java.net.InetAddress inf)
host - The host, which can either be a host name or a standard
string representation of the address (like A.B.C.D). Null is not allowed.port - The port number.inf - The network interface to use for this address. Null is not allowed.public static org.opendof.core.oal.DOFAddress createAddress(java.lang.String host,
int port,
java.lang.String inf)
host - The host, which can either be a host name or a standard
string representation of the address (like A.B.C.D). Null is not allowed.port - The port number.inf - The network interface to use for this address. Null is not allowed.public org.opendof.core.transport.Connection open(org.opendof.core.transport.ConnectionConfig config,
org.opendof.core.oal.DOFAddress peer,
org.opendof.core.transport.TransportHandler handler,
org.opendof.core.oal.DOFConnection.Type type,
org.opendof.core.transport.ConnectionCallback context)
throws java.lang.Exception
open in interface org.opendof.core.transport.Transportjava.lang.Exceptionpublic org.opendof.core.transport.Server start(org.opendof.core.transport.ServerConfig config,
org.opendof.core.oal.DOFAddress address,
org.opendof.core.transport.TransportHandler handler,
org.opendof.core.oal.DOFServer.Type type,
org.opendof.core.transport.Server relatedServer,
org.opendof.core.transport.ServerCallback context)
throws java.lang.Exception
start in interface org.opendof.core.transport.Transportjava.lang.Exceptionpublic int getMaxSize(org.opendof.core.oal.DOFConnection.Type type)
getMaxSize in interface org.opendof.core.transport.Transportpublic int getMinSize(org.opendof.core.oal.DOFConnection.Type type)
getMinSize in interface org.opendof.core.transport.Transportpublic org.opendof.core.oal.DOFAddress.Type getAddressType(org.opendof.core.oal.DOFAddress addr)
getAddressType in interface org.opendof.core.transport.Transport