Package org.epics.ca.impl
Class TransportRegistry
- java.lang.Object
-
- org.epics.ca.impl.TransportRegistry
-
public class TransportRegistry extends java.lang.ObjectClass to cache CA transports (connections to other hosts).
-
-
Constructor Summary
Constructors Constructor Description TransportRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear cache.Transport[]get(java.net.InetSocketAddress address)Lookup for a transport for given address (all priorities).Transportget(java.net.InetSocketAddress address, int priority)Lookup for a transport for given address.intnumberOfActiveTransports()Get number of active (cached) transports.voidput(java.net.InetSocketAddress address, Transport transport)Cache new (address, transport) pair.Transportremove(java.net.InetSocketAddress address, int priority)Remove (address, transport) pair from cache.Transport[]toArray()Get array of all active (cached) transports.
-
-
-
Method Detail
-
put
public void put(java.net.InetSocketAddress address, Transport transport)Cache new (address, transport) pair.- Parameters:
address- address of the host computer.transport- tranport to the host computer.
-
get
public Transport get(java.net.InetSocketAddress address, int priority)
Lookup for a transport for given address.- Parameters:
address- address of the host computer.priority- priority of the transport.- Returns:
- corresponding transport,
nullif none found.
-
get
public Transport[] get(java.net.InetSocketAddress address)
Lookup for a transport for given address (all priorities).- Parameters:
address- address of the host computer.- Returns:
- array of corresponding transports,
nullif none found.
-
remove
public Transport remove(java.net.InetSocketAddress address, int priority)
Remove (address, transport) pair from cache.- Parameters:
address- address of the host computer.priority- priority of the transport to be removed.- Returns:
- removed transport,
nullif none found.
-
clear
public void clear()
Clear cache.
-
numberOfActiveTransports
public int numberOfActiveTransports()
Get number of active (cached) transports.- Returns:
- number of active (cached) transports.
-
toArray
public Transport[] toArray()
Get array of all active (cached) transports.- Returns:
- array of all active (cached) transports.
-
-