Package nl.tue.id.oocsi.client.protocol
Class MultiHandler
java.lang.Object
nl.tue.id.oocsi.client.protocol.Handler
nl.tue.id.oocsi.client.protocol.MultiHandler
public class MultiHandler extends Handler
Handler that internally maintains a list of sub-handlers which will be called in FIFO order once this handler is
called; this is very helpful for multiple subscriptions to a channel
- Author:
- matsfunk
-
Constructor Summary
Constructors Constructor Description MultiHandler()
MultiHandler(Handler handler)
-
Method Summary
Modifier and Type Method Description void
add(Handler handler)
boolean
isEmpty()
void
receive(java.lang.String sender, java.util.Map<java.lang.String,java.lang.Object> data, long timestamp, java.lang.String channel, java.lang.String recipient)
abstract method to be implemented in anonymous classes that are instantiated by subscribing and registering for eventsvoid
remove(Handler handler)
Methods inherited from class nl.tue.id.oocsi.client.protocol.Handler
parseData, parseTimestamp, send
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MultiHandler
public MultiHandler() -
MultiHandler
-
-
Method Details
-
add
-
remove
-
isEmpty
public boolean isEmpty() -
receive
public void receive(java.lang.String sender, java.util.Map<java.lang.String,java.lang.Object> data, long timestamp, java.lang.String channel, java.lang.String recipient)Description copied from class:Handler
abstract method to be implemented in anonymous classes that are instantiated by subscribing and registering for events
-