ESP OpenBCI - An EEG Signal Processing Library for OpenBCI Hardware

com.github.mrstampy.esp.openbci.subscription
Class OpenBCISocketConnector

java.lang.Object
  extended by com.github.mrstampy.esp.multiconnectionsocket.AbstractSocketConnector<OpenBCIEventType>
      extended by com.github.mrstampy.esp.openbci.subscription.OpenBCISocketConnector

public class OpenBCISocketConnector
extends AbstractSocketConnector<OpenBCIEventType>

The Class OpenBCISocketConnector.


Field Summary
 
Fields inherited from class com.github.mrstampy.esp.multiconnectionsocket.AbstractSocketConnector
BROADCASTER_PORT, connector, SOCKET_BROADCASTER_KEY
 
Constructor Summary
OpenBCISocketConnector(java.lang.String socketBroadcasterHost)
          Instantiates a new open bci socket connector.
 
Method Summary
 void addListener(OpenBCIEventListener l)
          Adds the listener.
 void clearListeners()
          Clear listeners.
protected  void processEvent(AbstractMultiConnectionEvent<OpenBCIEventType> message)
          Process event.
 void removeListener(OpenBCIEventListener l)
          Removes the listener.
 boolean subscribe()
          Subscribe.
 boolean subscribeAll()
          Subscribes to all EventTypes, barring EventType#signalProcessed.
 
Methods inherited from class com.github.mrstampy.esp.multiconnectionsocket.AbstractSocketConnector
connect, disconnect, isConnected, subscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenBCISocketConnector

public OpenBCISocketConnector(java.lang.String socketBroadcasterHost)
Instantiates a new open bci socket connector.

Parameters:
socketBroadcasterHost - the socket broadcaster host
Method Detail

addListener

public void addListener(OpenBCIEventListener l)
Adds the listener.

Parameters:
l - the l

removeListener

public void removeListener(OpenBCIEventListener l)
Removes the listener.

Parameters:
l - the l

clearListeners

public void clearListeners()
Clear listeners.


subscribe

public boolean subscribe()
Subscribe.

Returns:
true, if successful

subscribeAll

public boolean subscribeAll()
Description copied from class: AbstractSocketConnector
Subscribes to all EventTypes, barring EventType#signalProcessed.

Specified by:
subscribeAll in class AbstractSocketConnector<OpenBCIEventType>
Returns:
true, if successful

processEvent

protected void processEvent(AbstractMultiConnectionEvent<OpenBCIEventType> message)
Description copied from class: AbstractSocketConnector
Process event.

Specified by:
processEvent in class AbstractSocketConnector<OpenBCIEventType>
Parameters:
message - the message

brought to you by Mr. Stampy