Package org.jivesoftware.smackx.muc
Class MucEnterConfiguration.Builder
- java.lang.Object
-
- org.jivesoftware.smackx.muc.MucEnterConfiguration.Builder
-
- Enclosing class:
- MucEnterConfiguration
public static final class MucEnterConfiguration.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MucEnterConfiguration
build()
Build a newMucEnterConfiguration
with the current builder.MucEnterConfiguration.Builder
requestHistorySince(int seconds)
Sets the number of seconds to use to filter the messages received during that time.MucEnterConfiguration.Builder
requestHistorySince(Date since)
Sets the since date to use to filter the messages received during that time.MucEnterConfiguration.Builder
requestMaxCharsHistory(int maxChars)
Sets the total number of characters to receive in the history.MucEnterConfiguration.Builder
requestMaxStanzasHistory(int maxStanzas)
Sets the total number of messages to receive in the history.MucEnterConfiguration.Builder
requestNoHistory()
Request that that MUC is going to sent us no history when joining.MucEnterConfiguration.Builder
timeoutAfter(long timeout)
Set the timeout used when joining the MUC room.MucEnterConfiguration.Builder
withPassword(String password)
Use the given password to join the MUC room.MucEnterConfiguration.Builder
withPresence(Presence presence)
Deprecated.usewithPresence(Consumer)
instead.MucEnterConfiguration.Builder
withPresence(Consumer<? super PresenceBuilder> presenceBuilderConsumer)
Set the presence used to join the MUC room.
-
-
-
Method Detail
-
withPresence
@Deprecated public MucEnterConfiguration.Builder withPresence(Presence presence)
Deprecated.usewithPresence(Consumer)
instead.Set the presence used to join the MUC room.The 'to' value of the given presence will be overridden and the given presence must be of type 'available', otherwise an
IllegalArgumentException
will be thrown.- Parameters:
presence
- TODO javadoc me please- Returns:
- a reference to this builder.
-
withPresence
public MucEnterConfiguration.Builder withPresence(Consumer<? super PresenceBuilder> presenceBuilderConsumer)
Set the presence used to join the MUC room.The consumer must not modify the presence type, otherwise an
IllegalArgumentException
will be thrown.- Parameters:
presenceBuilderConsumer
- a consumer which will be passed the presence build.- Returns:
- a reference to this builder.
- Since:
- 4.4.0
-
withPassword
public MucEnterConfiguration.Builder withPassword(String password)
Use the given password to join the MUC room.- Parameters:
password
- the password used to join.- Returns:
- a reference to this builder.
-
timeoutAfter
public MucEnterConfiguration.Builder timeoutAfter(long timeout)
Set the timeout used when joining the MUC room.- Parameters:
timeout
- the timeout to use when joining.- Returns:
- a reference to this builder.
-
requestNoHistory
public MucEnterConfiguration.Builder requestNoHistory()
Request that that MUC is going to sent us no history when joining.- Returns:
- a reference to this builder.
-
requestMaxCharsHistory
public MucEnterConfiguration.Builder requestMaxCharsHistory(int maxChars)
Sets the total number of characters to receive in the history.- Parameters:
maxChars
- the total number of characters to receive in the history.- Returns:
- a reference to this builder.
-
requestMaxStanzasHistory
public MucEnterConfiguration.Builder requestMaxStanzasHistory(int maxStanzas)
Sets the total number of messages to receive in the history.- Parameters:
maxStanzas
- the total number of messages to receive in the history.- Returns:
- a reference to this builder.
-
requestHistorySince
public MucEnterConfiguration.Builder requestHistorySince(int seconds)
Sets the number of seconds to use to filter the messages received during that time. In other words, only the messages received in the last "X" seconds will be included in the history.- Parameters:
seconds
- the number of seconds to use to filter the messages received during that time.- Returns:
- a reference to this builder.
-
requestHistorySince
public MucEnterConfiguration.Builder requestHistorySince(Date since)
Sets the since date to use to filter the messages received during that time. In other words, only the messages received since the datetime specified will be included in the history.- Parameters:
since
- the since date to use to filter the messages received during that time.- Returns:
- a reference to this builder.
-
build
public MucEnterConfiguration build()
Build a newMucEnterConfiguration
with the current builder.- Returns:
- a new
MucEnterConfiguration
.
-
-