Package uk.ac.starlink.topcat.interop

## Class SendManager

- java.lang.Object
- - uk.ac.starlink.topcat.interop.SendManager

-     public class SendManager
      extends java.lang.Object

  Provides a ComboBoxModel allowing selection of SAMP clients subscribed to a given MType. An option corresponding to broadcast to all clients is also provided. This class is useful for implementing `Activity` subclasses using SAMP.
  Since:
    17 Sep 2008
  Author:
    Mark Taylor

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SendManager​(org.astrogrid.samp.gui.GuiHubConnector connector, java.lang.String mtype)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `call​(java.util.Map message)` | Sends a given message by call/response to the currently selected target client or clients.
    `javax.swing.ComboBoxModel` | `getComboBoxModel()` | Returns a combo box model which allows to select any of the subscribed clients, or broadcast to all.
    `void` | `notify​(java.util.Map message)` | Sends a given message by notification to the currently selected target client or clients.

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

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

- - ### Constructor Detail

    - #### SendManager

          public SendManager​(org.astrogrid.samp.gui.GuiHubConnector connector,
                             java.lang.String mtype)

      Constructor.
      Parameters:
        `connector` - hub connector
        `mtype` - MType to which all selectable clients must be subscribed

  - ### Method Detail

    - #### getComboBoxModel

          public javax.swing.ComboBoxModel getComboBoxModel()

      Returns a combo box model which allows to select any of the subscribed clients, or broadcast to all.
      Returns:
        combo box model

    - #### notify

          public void notify​(java.util.Map message)
                      throws org.astrogrid.samp.client.SampException

      Sends a given message by notification to the currently selected target client or clients. This message will presumably have the MType supplied to this object in the constructor.
      Parameters:
        `message` - `Message`-like map
      Throws:
        `org.astrogrid.samp.client.SampException`

    - #### call

          public void call​(java.util.Map message)
                    throws org.astrogrid.samp.client.SampException

      Sends a given message by call/response to the currently selected target client or clients. This message will presumably have the MType supplied to this object in the constructor. The response is logged, but nothing else is done with it.
      Parameters:
        `message` - `Message`-like map
      Throws:
        `org.astrogrid.samp.client.SampException`

Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.