public class TransportRegistry extends Object
Constructor and Description |
---|
TransportRegistry() |
Modifier and Type | Method and Description |
---|---|
static TransportRegistry |
getDefaultInstance()
Returns a default instance of this class with the globally available
transports.
|
TransportFactory |
getFactory(String name)
Returns the transport factory for a transport with the specified name.
|
boolean |
hasTransport(String name)
Indicates whether a transport with the given name is available.
|
void |
registerTransport(String name,
TransportFactory factory)
Registers a transport factory for a transport with the given name.
|
Set<String> |
transportNames()
Returns the names of all known transports.
|
public static TransportRegistry getDefaultInstance()
public boolean hasTransport(String name)
name
- the name of the transporttrue
if a transport with the name exists, else
false
public TransportFactory getFactory(String name)
name
- name of the transportNoSuchElementException
- there is no transport with the given namepublic void registerTransport(String name, TransportFactory factory)
name
- name of the transportfactory
- factory instanceIllegalArgumentException
- There is already a transport with the given name or the name
is null
or empty.Copyright © 2018 CoR-Lab. All rights reserved.