|
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.Objectorg.apache.mina.core.service.IoHandlerAdapter
com.github.mrstampy.esp.multiconnectionsocket.AbstractSubscriptionHandlerAdapter<E,AMCS,MCSR>
E - enum representing the event typeAMCS - the AbstractMultiConnectionSocket implementationMCSR - the MultiConnectionSubscriptionRequestpublic abstract class AbstractSubscriptionHandlerAdapter<E extends java.lang.Enum<E>,AMCS extends AbstractMultiConnectionSocket<?>,MCSR extends MultiConnectionSubscriptionRequest<E>>
Abstract IoHandler implementation to receive subscriptions and
publish AbstractMultiConnectionEvents on a socket.
| Constructor Summary | |
|---|---|
protected |
AbstractSubscriptionHandlerAdapter(AMCS socket)
Instantiates a new abstract subscription handler adapter. |
| Method Summary | |
|---|---|
protected HostPort |
createHostPort(org.apache.mina.core.session.IoSession session)
Creates the host port. |
AMCS |
getSocket()
Gets the socket. |
abstract void |
messageReceived(org.apache.mina.core.session.IoSession session,
java.lang.Object message)
Implement to deal with subscription requests & any other message types the subclass must deal with. |
void |
sendMultiConnectionEvent(AbstractMultiConnectionEvent<E> event)
Sends the specified AbstractMultiConnectionEvent to all interested
subscribers. |
void |
sessionClosed(org.apache.mina.core.session.IoSession session)
|
protected void |
setSocket(AMCS socket)
Sets the socket. |
protected void |
subscribe(org.apache.mina.core.session.IoSession session,
MCSR message)
Subscribe. |
| Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter |
|---|
exceptionCaught, messageSent, sessionCreated, sessionIdle, sessionOpened |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractSubscriptionHandlerAdapter(AMCS socket)
socket - the socket| Method Detail |
|---|
public abstract void messageReceived(org.apache.mina.core.session.IoSession session,
java.lang.Object message)
throws java.lang.Exception
messageReceived in interface org.apache.mina.core.service.IoHandlermessageReceived in class org.apache.mina.core.service.IoHandlerAdaptersession - the sessionmessage - the message
java.lang.Exception - the exceptionsubscribe(IoSession,
MultiConnectionSubscriptionRequest)
public void sessionClosed(org.apache.mina.core.session.IoSession session)
throws java.lang.Exception
sessionClosed in interface org.apache.mina.core.service.IoHandlersessionClosed in class org.apache.mina.core.service.IoHandlerAdapterjava.lang.Exceptionpublic void sendMultiConnectionEvent(AbstractMultiConnectionEvent<E> event)
AbstractMultiConnectionEvent to all interested
subscribers.
event - the eventAbstractMultiConnectionSocket,
AbstractSocketConnector
protected void subscribe(org.apache.mina.core.session.IoSession session,
MCSR message)
session - the sessionmessage - the messagepublic AMCS getSocket()
protected void setSocket(AMCS socket)
socket - the new socketprotected HostPort createHostPort(org.apache.mina.core.session.IoSession session)
session - the session
|
brought to you by Mr. Stampy | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||