Package nl.tue.id.oocsi.client.services
Class Responder
java.lang.Object
nl.tue.id.oocsi.client.protocol.Handler
nl.tue.id.oocsi.client.services.Responder
public abstract class Responder extends Handler
internal event handler for synchronized events with structured data
- Author:
- matsfunk
-
Constructor Summary
Constructors Constructor Description Responder()
constructor for easy client-side instantiation with service methodsResponder(OOCSIClient oocsi)
constructor for instantiation without service methods -
Method Summary
Modifier and Type Method Description 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 eventsabstract void
respond(OOCSIEvent event, OOCSIData response)
interface for responding to a call, needs to be implemented client-sidevoid
setCallName(java.lang.String callName)
set call name for responsesvoid
setOocsi(OOCSIClient oocsi)
set oocsi client for responsesMethods 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
-
Responder
public Responder()constructor for easy client-side instantiation with service methods -
Responder
constructor for instantiation without service methods- Parameters:
oocsi
-
-
-
Method Details
-
setOocsi
set oocsi client for responses- Parameters:
oocsi
-
-
setCallName
public void setCallName(java.lang.String callName)set call name for responses- Parameters:
callName
-
-
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 -
respond
interface for responding to a call, needs to be implemented client-side- Parameters:
event
-response
-
-