|
ESP OpenBCI - An EEG Signal Processing Library for OpenBCI Hardware | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.mrstampy.esp.multiconnectionsocket.AbstractSocketConnector<E>
E - the element typepublic abstract class AbstractSocketConnector<E extends java.lang.Enum<E>>
This class connects to the AbstractMultiConnectionSocket and receives
AbstractMultiConnectionEvent updates. Many instances of this class
running in separate processes can connect to the single instance of
AbstractMultiConnectionSocket, allowing separately running programs
to deal with Neurosky output simultaneously.
| Field Summary | |
|---|---|
static int |
BROADCASTER_PORT
The broadcaster port. |
protected org.apache.mina.transport.socket.nio.NioSocketConnector |
connector
The connector. |
static java.lang.String |
SOCKET_BROADCASTER_KEY
Set the system property 'socket.broadcaster.port' on startup to change the broadcaster port from the default '12345' ie. |
| Constructor Summary | |
|---|---|
AbstractSocketConnector(java.lang.String socketBroadcasterHost)
Instantiate with the name of the host that the AbstractMultiConnectionSocket is running on. |
|
| Method Summary | |
|---|---|
void |
connect()
Connects to the AbstractMultiConnectionSocket instance. |
void |
disconnect()
Disconnects from the AbstractMultiConnectionSocket instance. |
boolean |
isConnected()
Returns true if connected to a AbstractMultiConnectionSocket
instance. |
protected abstract void |
processEvent(AbstractMultiConnectionEvent<E> message)
Process event. |
protected boolean |
subscribe(MultiConnectionSubscriptionRequest<?> request)
Subscribes to the specified event types, all registered listeners will receive updates for these event types. |
abstract boolean |
subscribeAll()
Subscribes to all EventTypes, barring
EventType#signalProcessed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SOCKET_BROADCASTER_KEY
public static int BROADCASTER_PORT
protected org.apache.mina.transport.socket.nio.NioSocketConnector connector
| Constructor Detail |
|---|
public AbstractSocketConnector(java.lang.String socketBroadcasterHost)
AbstractMultiConnectionSocket is running on.
socketBroadcasterHost - the socket broadcaster host| Method Detail |
|---|
public boolean isConnected()
AbstractMultiConnectionSocket
instance.
public void connect()
throws MultiConnectionSocketException
AbstractMultiConnectionSocket instance. The
listeners will not be notified of events until
#subscribe(EventType...) or subscribeAll() has been
called.
MultiConnectionSocketException - if unable to connect to a AbstractMultiConnectionSocketpublic void disconnect()
AbstractMultiConnectionSocket instance.
protected boolean subscribe(MultiConnectionSubscriptionRequest<?> request)
request - the request
public abstract boolean subscribeAll()
EventTypes, barring
EventType#signalProcessed.
protected abstract void processEvent(AbstractMultiConnectionEvent<E> message)
message - the message
|
brought to you by Mr. Stampy | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||