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 methods
    Responder​(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 events
    abstract void respond​(OOCSIEvent event, OOCSIData response)
    interface for responding to a call, needs to be implemented client-side
    void setCallName​(java.lang.String callName)
    set call name for responses
    void setOocsi​(OOCSIClient oocsi)
    set oocsi client for responses

    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

    • Responder

      public Responder()
      constructor for easy client-side instantiation with service methods
    • Responder

      public Responder​(OOCSIClient oocsi)
      constructor for instantiation without service methods
      Parameters:
      oocsi -
  • Method Details

    • setOocsi

      public void setOocsi​(OOCSIClient oocsi)
      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
      Specified by:
      receive in class Handler
    • respond

      public abstract void respond​(OOCSIEvent event, OOCSIData response)
      interface for responding to a call, needs to be implemented client-side
      Parameters:
      event -
      response -