Class RequestVoice

  • All Implemented Interfaces:
    StandardizedDataForm

    public final class RequestVoice
    extends Object
    implements StandardizedDataForm
    Represents a standardized DataForm with form type http://jabber.org/protocol/muc#request, which can be used to request voice in a MUC room.

    Usage

    To wrap an existing DataForm to retrieve standard data from it, use:
    
     RequestVoice requestVoice = new RequestVoice(dataForm);
     
    To build a form:
    
     RequestVoice requestVoice = RequestVoice.builder()
         .jid(Jid.of("hag66@shakespeare.lit/pda"))
         .role(Role.PARTICIPANT)
         .roomNick("thirdwitch")
         .allowRequest(true)
         .build();
     
    See Also:
    7.13 Requesting Voice, 15.5.2 muc#request FORM_TYPE
    • Constructor Detail

      • RequestVoice

        public RequestVoice​(DataForm dataForm)
        Creates the request voice form.
        Parameters:
        dataForm - The underlying data form.
    • Method Detail

      • builder

        public static RequestVoice.Builder builder()
        Creates the builder to build a form.
        Returns:
        The builder.
      • getJid

        public Jid getJid()
        Gets the JID.
        Returns:
        The JID.
      • getRoomNick

        public String getRoomNick()
        Gets the room nick.
        Returns:
        The room nick.
      • getRole

        public Role getRole()
        Gets the requested role.
        Returns:
        The requested role.
      • isRequestAllowed

        public boolean isRequestAllowed()
        Indicates, whether the request is approved.
        Returns:
        True, if the request is approved.
      • toBuilder

        public final RequestVoice.Builder toBuilder()
        Converts this (immutable) data form to a builder, so that a modified form can be created.
        Returns:
        The builder.