Class SubscriptionHandler


  • public class SubscriptionHandler
    extends Object
    Data collection that can be listed and has subscription to change events.

    Copyright (c) 2020-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2020-02-13 11:08:16 +0100 (Thu, 13 Feb 2020) $, @version $Revision: 6383 $, by $Author: pknoppers $,

    Author:
    Alexander Verbraeck, Peter Knoppers
    • Method Detail

      • listRequestMetaData

        public MetaData listRequestMetaData()
        Report what payload is required to retrieve a list of all elements, or data and what format a result would have.
        Returns:
        MetaData; description of the payload required to retrieve a list of all elements, or data and what format a result would have
      • listResultMetaData

        public MetaData listResultMetaData()
        Report what the payload format of the result of the list transceiver.
        Returns:
        MetaData; the payload format of the result of the list transceiver
      • getListTransceiver

        public TransceiverInterface getListTransceiver()
        Retrieve the list transceiver (only for testing).
        Returns:
        TransceiverInterface; the list transceiver
      • subscriptionOptions

        public final EnumSet<SubscriptionHandler.Command> subscriptionOptions()
        Return the set of supported commands.
        Returns:
        EnumSet<Command>; the set of supported commands.
      • getId

        public final String getId()
        Retrieve the id of this SubscriptionHandler.
        Returns:
        String; the id of this SubscriptionHandler
      • lookupCommand

        public static SubscriptionHandler.Command lookupCommand​(String commandString)
        Convert a String representing a Command into that Command.
        Parameters:
        commandString - String; the string
        Returns:
        Command; the corresponding Command, or null if the commandString is not a valid Command