|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectioio.lib.api.IOIOFactory
public class IOIOFactory
Factory class for creating instances of the IOIO interface.
This class acts as the single entry-point to the IOIO API. It creates the bootstrapping between a specific implementation of the IOIO interface and any dependencies it might have, such as the underlying connection logic.
Typical usage:
IOIO ioio = IOIOFactory.create(); try { ioio.waitForConnect(); ... ioio.disconnect(); } catch (ConnectionLostException e) { } finally { ioio.waitForDisconnect(); }
Field Summary | |
---|---|
static int |
IOIO_PORT
The TCP port used for communicating with the IOIO board. |
Constructor Summary | |
---|---|
IOIOFactory()
|
Method Summary | |
---|---|
static IOIO |
create()
Create a IOIO instance. |
static IOIO |
create(IOIOConnection connection)
|
static IOIO |
create(java.lang.String connectionClassName,
java.lang.Object... args)
Create a IOIO instance with a user-provided underlying connection class. |
static IOIOConnection |
createConnectionDynamically(java.lang.String connectionClassName,
java.lang.Object... args)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int IOIO_PORT
Constructor Detail |
---|
public IOIOFactory()
Method Detail |
---|
public static IOIO create()
public static IOIO create(java.lang.String connectionClassName, java.lang.Object... args) throws java.lang.ClassNotFoundException
connectionClassName
- The name of the connection class. Must have a public default
constructor.
java.lang.ClassNotFoundException
- The given class name was not found.public static IOIO create(IOIOConnection connection)
public static IOIOConnection createConnectionDynamically(java.lang.String connectionClassName, java.lang.Object... args) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |