Class SubscribedEventID

    • Constructor Detail

      • SubscribedEventID

        public SubscribedEventID​(java.lang.String name,
                                 @Nullable
                                 java.lang.String id)
        Create a new SubscribedEventID
        Parameters:
        name - the event name
        id - an ID string, may be null
      • SubscribedEventID

        public SubscribedEventID​(java.io.DataInput in)
                          throws java.io.IOException
        Constructs a new SubscribedEventID object by deserializing data from a stream that was written by toStream(java.io.DataOutput).
        Parameters:
        in - input stream.
        Throws:
        java.io.IOException
    • Method Detail

      • toStream

        public void toStream​(java.io.DataOutput out)
                      throws java.io.IOException
        Serializes this object to a stream in a form suitable for reading by SubscribedEventID(java.io.DataInput).
        Parameters:
        out - the stream to write to
        Throws:
        java.io.IOException - if an I/O error occurs
      • getName

        public java.lang.String getName()
        Returns Subscribed event name.
        Returns:
        the event name.
      • getID

        @Nullable
        public java.lang.String getID()
        Returns the Subscribed event ID.
        Returns:
        an ID string, may be null
      • getTemplatePackageName

        public java.lang.String getTemplatePackageName()
        Return the name of this event's template-package, if any. For example, the event "dialog.winfo" has the template-package "winfo".
        Returns:
        the template-package name, which is the string after the last "." character in the event name, or null if this event is not from a template-package.
        See Also:
        RFC 6665 §5.2.
      • isRefer

        public boolean isRefer()
        Returns true if the event is a refer.
        Returns:
        true if the event name equals "refer", otherwise returns false.
      • isUnqualifiedRefer

        public boolean isUnqualifiedRefer()
        Returns true if the event is an unqualified refer.
        Returns:
        true true if the event name equals "refer" and the ID is null, otherwise returns false.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

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