Package rocks.xmpp.extensions.muc.model
Class RequestVoice
- java.lang.Object
-
- rocks.xmpp.extensions.muc.model.RequestVoice
-
- All Implemented Interfaces:
StandardizedDataForm
public final class RequestVoice extends Object implements StandardizedDataForm
Represents a standardizedDataForm
with form typehttp://jabber.org/protocol/muc#request
, which can be used to request voice in a MUC room.Usage
To wrap an existingDataForm
to retrieve standard data from it, use:
To build a form:RequestVoice requestVoice = new RequestVoice(dataForm);
RequestVoice requestVoice = RequestVoice.builder() .jid(Jid.of("hag66@shakespeare.lit/pda")) .role(Role.PARTICIPANT) .roomNick("thirdwitch") .allowRequest(true) .build();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RequestVoice.Builder
A builder to build a request voice form.
-
Constructor Summary
Constructors Constructor Description RequestVoice(DataForm dataForm)
Creates the request voice form.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RequestVoice.Builder
builder()
Creates the builder to build a form.DataForm
getDataForm()
Gets the underlying data form.String
getFormType()
Gets the form type of the data form.Jid
getJid()
Gets the JID.Role
getRole()
Gets the requested role.String
getRoomNick()
Gets the room nick.boolean
isRequestAllowed()
Indicates, whether the request is approved.RequestVoice.Builder
toBuilder()
Converts this (immutable) data form to a builder, so that a modified form can be created.
-
-
-
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.
-
getFormType
public final String getFormType()
Description copied from interface:StandardizedDataForm
Gets the form type of the data form.- Specified by:
getFormType
in interfaceStandardizedDataForm
- Returns:
- The form type.
-
getDataForm
public final DataForm getDataForm()
Gets the underlying data form.- Specified by:
getDataForm
in interfaceStandardizedDataForm
- Returns:
- The underlying data form.
-
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.
-
-