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 standardizedDataFormwith form typehttp://jabber.org/protocol/muc#request, which can be used to request voice in a MUC room.Usage
To wrap an existingDataFormto 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 classRequestVoice.BuilderA 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.Builderbuilder()Creates the builder to build a form.DataFormgetDataForm()Gets the underlying data form.StringgetFormType()Gets the form type of the data form.JidgetJid()Gets the JID.RolegetRole()Gets the requested role.StringgetRoomNick()Gets the room nick.booleanisRequestAllowed()Indicates, whether the request is approved.RequestVoice.BuildertoBuilder()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:StandardizedDataFormGets the form type of the data form.- Specified by:
getFormTypein interfaceStandardizedDataForm- Returns:
- The form type.
-
getDataForm
public final DataForm getDataForm()
Gets the underlying data form.- Specified by:
getDataFormin 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.
-
-