SOCKET - the generic typepublic abstract class AbstractRawEspConnection<SOCKET extends MultiConnectionSocket> extends java.lang.Object implements RawEspConnection
| Constructor and Description |
|---|
AbstractRawEspConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
Adds the connection event listener.
|
void |
bindBroadcaster()
Binds the broadcaster to the local host and the broadcaster port in
AbstractSocketConnector. |
boolean |
canBroadcast()
Returns true if this instance has been configured for broadcasting.
|
void |
clearConnectionEventListeners()
Clear connection event listeners.
|
EspChannel |
getChannel(int channelNumber)
Returns the
EspChannel representation specified by the channel
number. |
java.util.List<EspChannel> |
getChannels()
Returns the
EspChannel representations processed by the
implementation. |
Lab |
getDefaultLab()
Returns a
DefaultLab instance set to use this connection. |
int |
getNumChannels()
Returns the number of channels.
|
abstract SOCKET |
getSocket()
Gets the socket.
|
EspWindowFunction |
getWindowFunction()
Return the window function.
|
boolean |
isBound()
Returns true if the broadcaster is bound.
|
boolean |
isConnected()
Returns true if connected to the
AbstractMultiConnectionSocket
socket. |
void |
removeConnectionEventListener(ConnectionEventListener listener)
Removes the connection event listener.
|
void |
setWindowFunction(EspWindowFunction function)
Set the window function.
|
void |
start()
Connects to the socket.
|
void |
stop()
Closes the connection to the
AbstractMultiConnectionSocket socket. |
void |
unbindBroadcaster()
Unbinds the broadcaster.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrent, getCurrent, getCurrentFor, getCurrentFor, getDSPValues, getName, getUtilitiespublic void addConnectionEventListener(ConnectionEventListener listener)
MultiConnectionSocketaddConnectionEventListener in interface MultiConnectionSocketlistener - the listenerpublic void removeConnectionEventListener(ConnectionEventListener listener)
MultiConnectionSocketremoveConnectionEventListener in interface MultiConnectionSocketlistener - the listenerpublic void clearConnectionEventListeners()
MultiConnectionSocketclearConnectionEventListeners in interface MultiConnectionSocketpublic void start()
throws MultiConnectionSocketException
MultiConnectionSocketstart in interface MultiConnectionSocketMultiConnectionSocketException - if already connected or an unexpected error occurspublic void stop()
MultiConnectionSocketAbstractMultiConnectionSocket socket.stop in interface MultiConnectionSocketpublic boolean isConnected()
MultiConnectionSocketAbstractMultiConnectionSocket
socket.isConnected in interface MultiConnectionSocketpublic void bindBroadcaster()
throws java.io.IOException
MultiConnectionSocketAbstractSocketConnector.bindBroadcaster in interface MultiConnectionSocketjava.io.IOException - Signals that an I/O exception has occurred.AbstractSocketConnectorpublic void unbindBroadcaster()
MultiConnectionSocketunbindBroadcaster in interface MultiConnectionSocketAbstractSocketConnectorpublic boolean isBound()
MultiConnectionSocketisBound in interface MultiConnectionSocketAbstractSocketConnectorpublic boolean canBroadcast()
MultiConnectionSocketcanBroadcast in interface MultiConnectionSocketpublic EspWindowFunction getWindowFunction()
RawEspConnectiongetWindowFunction in interface RawEspConnectionEspSignalUtilities.setWindow(ddf.minim.analysis.WindowFunction)public void setWindowFunction(EspWindowFunction function)
RawEspConnectionsetWindowFunction in interface RawEspConnectionfunction - the new window functionEspSignalUtilities.setWindow(ddf.minim.analysis.WindowFunction)public int getNumChannels()
MultiConnectionSocketgetNumChannels in interface MultiConnectionSocketpublic java.util.List<EspChannel> getChannels()
MultiConnectionSocketEspChannel representations processed by the
implementation.getChannels in interface MultiConnectionSocketpublic EspChannel getChannel(int channelNumber)
MultiConnectionSocketEspChannel representation specified by the channel
number.getChannel in interface MultiConnectionSocketchannelNumber - the channel numberpublic Lab getDefaultLab()
DefaultLab instance set to use this connection. Can be
overridden in subclasses for custom Lab implementations.getDefaultLab in interface RawEspConnectionpublic abstract SOCKET getSocket()