public class IOIOConnectionRegistry
extends java.lang.Object
For advanced usage only!
This class facilitates dynamic linkage and instantiation of different IOIO
connection types. IOIOConnectionBootstrap classes enable creation of
IOIOConnectionFactory instances, from which concrete
IOIOConnections are created. The binding to
IOIOConnectionBootstrap is dynamic, thus enabling linkage to succeed
with or without those bootstraps. Likewise, during runtime, the absence of
bootstraps is handled gracefully.
A typical usage will call addBootstraps(String[]) with a list of
class names to be sought from a static initializer block. It may then call
getBootstraps() to obtain any bootstrap classes that are available
in runtime, in case the bootstrap classes themselves need some runtime
handling. Last, the getConnectionFactories() will return a
collection of IOIOConnectionFactory, each representing one possible
communication channel to a IOIO.
| Constructor and Description |
|---|
IOIOConnectionRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addBootstraps(java.lang.String[] classNames)
For advanced usage only! Add platform-specific connection bootstrap
classes.
|
static java.util.Collection<IOIOConnectionBootstrap> |
getBootstraps()
For advanced usage only! Used for special runtime handling of bootstrap
classes.
|
static java.util.Collection<IOIOConnectionFactory> |
getConnectionFactories()
Get all available connection specifications.
|
public static java.util.Collection<IOIOConnectionFactory> getConnectionFactories()
IOIOFactory.create(IOIOConnection), possibly after filtering
based on the specification's properties.public static java.util.Collection<IOIOConnectionBootstrap> getBootstraps()
public static void addBootstraps(java.lang.String[] classNames)
getConnectionFactories().