ESP OpenBCI - An EEG Signal Processing Library for OpenBCI Hardware

com.github.mrstampy.esp.multiconnectionsocket.event
Class AbstractMultiConnectionEvent<E extends java.lang.Enum<E>>

java.lang.Object
  extended by com.github.mrstampy.esp.multiconnectionsocket.event.AbstractMultiConnectionEvent<E>
Type Parameters:
E - the element type
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
OpenBCIEvent

public abstract class AbstractMultiConnectionEvent<E extends java.lang.Enum<E>>
extends java.lang.Object
implements java.io.Serializable

The Class AbstractMultiConnectionEvent.

See Also:
Serialized Form

Constructor Summary
protected AbstractMultiConnectionEvent(E type)
          Instantiates a new abstract multi connection event.
 
Method Summary
 long getCreateTimestamp()
          Returns the time this event was created, use in lieu of received time as network latency may skew any time-based calculations.
 E getEventType()
          Gets the event type.
 long getNanoTime()
          "This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time." Use only in comparison to other nanoTimes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMultiConnectionEvent

protected AbstractMultiConnectionEvent(E type)
Instantiates a new abstract multi connection event.

Parameters:
type - the type
Method Detail

getEventType

public E getEventType()
Gets the event type.

Returns:
the event type

getCreateTimestamp

public long getCreateTimestamp()
Returns the time this event was created, use in lieu of received time as network latency may skew any time-based calculations.

Returns:
The current timestamp this event was created

getNanoTime

public long getNanoTime()
"This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time." Use only in comparison to other nanoTimes

Returns:
The nano time this event was created
See Also:
System.nanoTime()

brought to you by Mr. Stampy