public class TransportRegistry
extends java.lang.Object
| Constructor and Description |
|---|
TransportRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear cache.
|
Transport[] |
get(java.net.InetSocketAddress address)
Lookup for a transport for given address (all priorities).
|
Transport |
get(java.net.InetSocketAddress address,
int priority)
Lookup for a transport for given address.
|
int |
numberOfActiveTransports()
Get number of active (cached) transports.
|
void |
put(java.net.InetSocketAddress address,
Transport transport)
Cache new (address, transport) pair.
|
Transport |
remove(java.net.InetSocketAddress address,
int priority)
Remove (address, transport) pair from cache.
|
Transport[] |
toArray()
Get array of all active (cached) transports.
|
public void put(java.net.InetSocketAddress address,
Transport transport)
address - address of the host computer.transport - tranport to the host computer.public Transport get(java.net.InetSocketAddress address, int priority)
address - address of the host computer.priority - priority of the transport.null if none found.public Transport[] get(java.net.InetSocketAddress address)
address - address of the host computer.null if none found.public Transport remove(java.net.InetSocketAddress address, int priority)
address - address of the host computer.priority - priority of the transport to be removed.null if none found.public void clear()
public int numberOfActiveTransports()
public Transport[] toArray()