Package nl.tue.id.oocsi

# Class OOCSI

java.lang.Object
nl.tue.id.oocsi.OOCSI

    public class OOCSI
    extends java.lang.Object

central OOCSI connector for Processing

Author:
  matsfunk

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `OOCSI​(java.lang.Object parent)` | create a new OOCSI network connection
  `OOCSI​(java.lang.Object parent, java.lang.String name)` | create a new OOCSI network connection
  `OOCSI​(java.lang.Object parent, java.lang.String name, boolean reconnect)` | create a new OOCSI network connection
  `OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname)` | create a new OOCSI network connection
  `OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname, boolean reconnect)` | create a new OOCSI network connection
  `OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname, int port)` | create a new OOCSI network connection
  `OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname, int port, boolean reconnect)` | create a new OOCSI network connection

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `OOCSICall` | `call​(java.lang.String callName)` | create a call for service method "callName"
  `OOCSICall` | `call​(java.lang.String callName, int timeoutMS)` | create a call for service method "callName" with a specific timeout
  `OOCSICall` | `call​(java.lang.String callName, int timeoutMS, int maxResponses)` | create a call for service method "callName" with a specific timeout
  `OOCSICall` | `call​(java.lang.String channelName, java.lang.String callName)` | create a call for service method "callName" on channel "channelName"
  `OOCSICall` | `call​(java.lang.String channelName, java.lang.String callName, int timeoutMS)` | create a call for service method "callName" with a specific timeout on channel "channelName"
  `OOCSICall` | `call​(java.lang.String channelName, java.lang.String callName, int timeoutMS, int maxResponses)` | create a call for service method "callName" with a specific timeout on channel "channelName"
  `OOCSIMessage` | `channel​(java.lang.String channelName)` | send data through a channel given by the channelName
  `void` | `disconnect()` | disconnect this client from the OOCSI network
  `java.lang.String` | `getChannels()` | retrieve the list of channels on the server
  `java.lang.String` | `getChannels​(java.lang.String channelName)` | retrieve the list of sub-channel of the channel with the given name on the server
  `java.lang.String` | `getClients()` | retrieve the list of clients on the server
  `java.lang.String` | `getName()` | return client handle
  `OOCSIDevice` | `heyOOCSI()` | create an OOCSI device instance with the client's name that can be configured and then submitted to the OOCSI server
  `OOCSIDevice` | `heyOOCSI​(java.lang.String deviceName)` | create a named OOCSI device that can be configured and then submitted to the OOCSI server
  `boolean` | `isConnected()` | returns whether the OOCSI client was able to connect to a server (already)
  `static OOCSI` | `localInstance​(java.lang.Object parent)` | create a local instance of OOCSI, without a connection
  `void` | `register​(java.lang.String responderName)` | register a responder; requires a method with the given responderName with parameters (OOCSIEvent, OOCSIData)
  `void` | `register​(java.lang.String responderName, java.lang.String responderFunctionName)` | register a responder "responderName"; requires a method with the given name "responderName" with parameters (OOCSIEvent, OOCSIData)
  `void` | `registerChannel​(java.lang.String channelName, java.lang.String responderName)` | register a responder "responderName" on channel "channelName"; requires a method with the responder name "responderName" with parameters (OOCSIEvent, OOCSIData)
  `void` | `registerChannel​(java.lang.String channelName, java.lang.String responderName, java.lang.String responderFunctionName)` | register a responder "responderName" on channel "channelName"; requires a method with the given name "responderName" with parameters (OOCSIEvent, OOCSIData)
  `void` | `sendRaw​(java.lang.String channel, java.lang.String data)` | send raw data to given channel
  `void` | `subscribe​(java.lang.String channelName)` | subscribe to a channel
  `void` | `subscribe​(java.lang.String channelName, java.lang.String handlerName)` | subscribe to a channel with a given handler method name "handlerName"
  `void` | `subscribe​(java.lang.String channelName, java.lang.String handlerName, int rate, int seconds)` | subscribe to a channel with a given handler method name "handlerName"; limits the rate of incoming events to "rate" events per "seconds" secs
  `void` | `subscribe​(java.lang.String channelName, java.lang.String handlerName, int rate, int seconds, boolean ratePerSender)` | subscribe to a channel with a given handler method name "handlerName"; limits the rate of incoming events to "rate" events per "seconds" secs; "ratePerSender" controls whether we limit the rate of incoming event per sender or for all events coming in from all senders

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

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

- ## Constructor Details

  - ### OOCSI

    public OOCSI​(java.lang.Object parent)
    create a new OOCSI network connection
    Parameters:
      `parent` -

  - ### OOCSI

    public OOCSI​(java.lang.Object parent, java.lang.String name)
    create a new OOCSI network connection
    Parameters:
      `parent` -
      `name` -

  - ### OOCSI

    public OOCSI​(java.lang.Object parent, java.lang.String name, boolean reconnect)
    create a new OOCSI network connection
    Parameters:
      `parent` -
      `name` -
      `reconnect` -

  - ### OOCSI

    public OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname)
    create a new OOCSI network connection
    Parameters:
      `parent` -
      `name` -
      `hostname` -

  - ### OOCSI

    public OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname, boolean reconnect)
    create a new OOCSI network connection
    Parameters:
      `parent` -
      `name` -
      `hostname` -
      `reconnect` -

  - ### OOCSI

    public OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname, int port)
    create a new OOCSI network connection
    Parameters:
      `parent` -
      `name` -
      `hostname` -
      `port` -

  - ### OOCSI

    public OOCSI​(java.lang.Object parent, java.lang.String name, java.lang.String hostname, int port, boolean reconnect)
    create a new OOCSI network connection
    Parameters:
      `parent` -
      `name` -
      `hostname` -
      `port` -
      `reconnect` -

- ## Method Details

  - ### getName

    public java.lang.String getName()
    return client handle
    Returns:

  - ### localInstance

    public static OOCSI localInstance​(java.lang.Object parent)
    create a local instance of OOCSI, without a connection
    Parameters:
      `parent` -
    Returns:

  - ### isConnected

    public boolean isConnected()
    returns whether the OOCSI client was able to connect to a server (already)
    Returns:

  - ### disconnect

    public void disconnect()
    disconnect this client from the OOCSI network

  - ### channel

    public OOCSIMessage channel​(java.lang.String channelName)
    send data through a channel given by the channelName
    Parameters:
      `channelName` -
    Returns:

  - ### call

    public OOCSICall call​(java.lang.String callName)
    create a call for service method "callName"
    Parameters:
      `callName` -
    Returns:

  - ### call

    public OOCSICall call​(java.lang.String channelName, java.lang.String callName)
    create a call for service method "callName" on channel "channelName"
    Parameters:
      `channelName` -
      `callName` -
    Returns:

  - ### call

    public OOCSICall call​(java.lang.String callName, int timeoutMS)
    create a call for service method "callName" with a specific timeout
    Parameters:
      `callName` -
      `timeoutMS` -
    Returns:

  - ### call

    public OOCSICall call​(java.lang.String channelName, java.lang.String callName, int timeoutMS)
    create a call for service method "callName" with a specific timeout on channel "channelName"
    Parameters:
      `channelName` -
      `callName` -
      `timeoutMS` -
    Returns:

  - ### call

    public OOCSICall call​(java.lang.String callName, int timeoutMS, int maxResponses)
    create a call for service method "callName" with a specific timeout
    Parameters:
      `callName` -
      `timeoutMS` -
      `maxResponses` -
    Returns:

  - ### call

    public OOCSICall call​(java.lang.String channelName, java.lang.String callName, int timeoutMS, int maxResponses)
    create a call for service method "callName" with a specific timeout on channel "channelName"
    Parameters:
      `channelName` -
      `callName` -
      `timeoutMS` -
      `maxResponses` -
    Returns:

  - ### sendRaw

    public void sendRaw​(java.lang.String channel, java.lang.String data)
    send raw data to given channel
    Parameters:
      `channel` -
      `data` -

  - ### subscribe

    public void subscribe​(java.lang.String channelName)
    subscribe to a channel
    Parameters:
      `channelName` -

  - ### subscribe

    public void subscribe​(java.lang.String channelName, java.lang.String handlerName)
    subscribe to a channel with a given handler method name "handlerName"
    Parameters:
      `channelName` -
      `handlerName` -

  - ### subscribe

    public void subscribe​(java.lang.String channelName, java.lang.String handlerName, int rate, int seconds)
    subscribe to a channel with a given handler method name "handlerName"; limits the rate of incoming events to "rate" events per "seconds" secs
    Parameters:
      `channelName` -
      `handlerName` -
      `rate` -
      `seconds` -

  - ### subscribe

    public void subscribe​(java.lang.String channelName, java.lang.String handlerName, int rate, int seconds, boolean ratePerSender)
    subscribe to a channel with a given handler method name "handlerName"; limits the rate of incoming events to "rate" events per "seconds" secs; "ratePerSender" controls whether we limit the rate of incoming event per sender or for all events coming in from all senders
    Parameters:
      `channelName` -
      `handlerName` -
      `rate` -
      `seconds` -
      `ratePerSender` -

  - ### register

    public void register​(java.lang.String responderName)
    register a responder; requires a method with the given responderName with parameters (OOCSIEvent, OOCSIData)
    Parameters:
      `responderName` -

  - ### register

    public void register​(java.lang.String responderName, java.lang.String responderFunctionName)
    register a responder "responderName"; requires a method with the given name "responderName" with parameters (OOCSIEvent, OOCSIData)
    Parameters:
      `responderName` -
      `responderFunctionName` -

  - ### registerChannel

    public void registerChannel​(java.lang.String channelName, java.lang.String responderName)
    register a responder "responderName" on channel "channelName"; requires a method with the responder name "responderName" with parameters (OOCSIEvent, OOCSIData)
    Parameters:
      `channelName` -
      `responderName` -

  - ### registerChannel

    public void registerChannel​(java.lang.String channelName, java.lang.String responderName, java.lang.String responderFunctionName)
    register a responder "responderName" on channel "channelName"; requires a method with the given name "responderName" with parameters (OOCSIEvent, OOCSIData)
    Parameters:
      `channelName` -
      `responderName` -
      `responderFunctionName` -

  - ### heyOOCSI

    public OOCSIDevice heyOOCSI()
    create an OOCSI device instance with the client's name that can be configured and then submitted to the OOCSI server
    Returns:

  - ### heyOOCSI

    public OOCSIDevice heyOOCSI​(java.lang.String deviceName)
    create a named OOCSI device that can be configured and then submitted to the OOCSI server
    Parameters:
      `deviceName` -
    Returns:

  - ### getClients

    public java.lang.String getClients()
    retrieve the list of clients on the server
    Returns:

  - ### getChannels

    public java.lang.String getChannels()
    retrieve the list of channels on the server
    Returns:

  - ### getChannels

    public java.lang.String getChannels​(java.lang.String channelName)
    retrieve the list of sub-channel of the channel with the given name on the server
    Parameters:
      `channelName` -
    Returns: