Package nl.tue.id.oocsi.client.behavior

# Class OOCSIGather<T>

java.lang.Object
nl.tue.id.oocsi.client.behavior.OOCSISystemCommunicator<T>
nl.tue.id.oocsi.client.behavior.OOCSIGather<T>

    public class OOCSIGather<T>
    extends OOCSISystemCommunicator<T>

OOCSIGather is a system-level primitive that allows for easy collection of all values that different OOCSI clients contribute for the same channel. The distribution will be about a single key or data item. This realizes an overview on data.

Author:
  matsfunk

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class nl.tue.id.oocsi.client.behavior.OOCSISystemCommunicator

  `OOCSISystemCommunicator.SystemFilter<K>`

- ## Field Summary

  ### Fields inherited from class nl.tue.id.oocsi.client.behavior.OOCSISystemCommunicator

  `channelName, client, HANDLE`

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `OOCSIGather​(OOCSIClient client, java.lang.String channelName, java.lang.String key, int timeoutMS)` | create a new gathering process
  `OOCSIGather​(OOCSIClient client, java.lang.String channelName, java.lang.String key, int timeoutMS, Handler handler)` | create a new gathering process with a callback that will be called when the process is done

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.util.Map<T,​java.lang.Integer>` | `get()` | returns the current set of options mapped to their frequency
  `void` | `set​(T myVote)` | set my vote for the gathering process
  `void` | `stop()` | stop participating in this gathering process

  ### Methods inherited from class nl.tue.id.oocsi.client.behavior.OOCSISystemCommunicator

  `addFilter, getHandle, message, message, message, subscribe, triggerHandler, updateFilter`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### OOCSIGather

    public OOCSIGather​(OOCSIClient client, java.lang.String channelName, java.lang.String key, int timeoutMS)
    create a new gathering process
    Parameters:
      `client` -
      `channelName` -
      `key` -
      `timeoutMS` -

  - ### OOCSIGather

    public OOCSIGather​(OOCSIClient client, java.lang.String channelName, java.lang.String key, int timeoutMS, Handler handler)
    create a new gathering process with a callback that will be called when the process is done
    Parameters:
      `client` -
      `channelName` -
      `key` -
      `timeoutMS` -
      `handler` -

- ## Method Details

  - ### stop

    public void stop()
    stop participating in this gathering process

  - ### set

    public void set​(T myVote)
    set my vote for the gathering process
    Parameters:
      `myVote` -

  - ### get

    public java.util.Map<T,​java.lang.Integer> get()
    returns the current set of options mapped to their frequency
    Returns: