Class MessageSender.MetaClient

  • All Implemented Interfaces:
    Client
    Enclosing class:
    MessageSender

    private static class MessageSender.MetaClient
    extends java.lang.Object
    implements Client
    Client implementation which may know about metadata.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String id_  
      private Metadata meta_  
    • Constructor Summary

      Constructors 
      Constructor Description
      MetaClient​(java.lang.String id, HubConnection connection)
      Constructor which attempts to acquire metadata from a given hub connection.
      MetaClient​(java.lang.String id, Metadata meta)
      Constructor which uses supplied metadata.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getId()
      Returns the public identifier for this client.
      Metadata getMetadata()
      Returns the currently declared metadata for this client, if any.
      Subscriptions getSubscriptions()
      Returns the currently declared subscriptions for this client, if any.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • id_

        private final java.lang.String id_
    • Constructor Detail

      • MetaClient

        public MetaClient​(java.lang.String id,
                          HubConnection connection)
                   throws SampException
        Constructor which attempts to acquire metadata from a given hub connection.
        Parameters:
        client - id
        connection - hub connection
        Throws:
        SampException
      • MetaClient

        public MetaClient​(java.lang.String id,
                          Metadata meta)
        Constructor which uses supplied metadata.
        Parameters:
        id - client id
        meta - metadata (may be null)
    • Method Detail

      • getId

        public java.lang.String getId()
        Description copied from interface: Client
        Returns the public identifier for this client.
        Specified by:
        getId in interface Client
        Returns:
        public id
      • getMetadata

        public Metadata getMetadata()
        Description copied from interface: Client
        Returns the currently declared metadata for this client, if any.
        Specified by:
        getMetadata in interface Client
        Returns:
        metadata object; may be null
      • getSubscriptions

        public Subscriptions getSubscriptions()
        Description copied from interface: Client
        Returns the currently declared subscriptions for this client, if any.
        Specified by:
        getSubscriptions in interface Client
        Returns:
        subscriptions object; may be null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object