Package org.javacord.core.entity.channel
Class ServerVoiceChannelImpl
- java.lang.Object
-
- org.javacord.core.entity.channel.ServerChannelImpl
-
- org.javacord.core.entity.channel.ServerVoiceChannelImpl
-
- All Implemented Interfaces:
Comparable<T>
,Formattable
,Categorizable
,Channel
,ChannelSpecialization
,ServerChannel
,ServerVoiceChannel
,VoiceChannel
,DiscordEntity
,Nameable
,Updatable<T>
,UpdatableFromCache
,ChannelAttachableListenerManager
,ServerChannelAttachableListenerManager
,ServerVoiceChannelAttachableListenerManager
,VoiceChannelAttachableListenerManager
,Specializable<T>
,InternalChannelAttachableListenerManager
,InternalVoiceChannelAttachableListenerManager
,InternalServerChannelAttachableListenerManager
,InternalServerVoiceChannelAttachableListenerManager
public class ServerVoiceChannelImpl extends ServerChannelImpl implements ServerVoiceChannel, InternalServerVoiceChannelAttachableListenerManager
The implementation ofServerVoiceChannel
.
-
-
Constructor Summary
Constructors Constructor Description ServerVoiceChannelImpl(DiscordApiImpl api, ServerImpl server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new server voice channel object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnectedUser(long userId)
Adds the user with the given id to the list of connected users.boolean
equals(Object o)
int
getBitrate()
Optional<ChannelCategory>
getCategory()
Collection<Long>
getConnectedUserIds()
Collection<User>
getConnectedUsers()
Optional<Integer>
getUserLimit()
int
hashCode()
boolean
isConnected(long userId)
void
removeConnectedUser(long userId)
Removes the user with the given id from the list of connected users.void
setBitrate(int bitrate)
Sets the bitrate of the channel.void
setParentId(long parentId)
Sets the parent id of the channel.void
setUserLimit(int userLimit)
Sets the user limit of the channel.String
toString()
-
Methods inherited from interface org.javacord.api.entity.channel.Channel
asCategorizable, asChannelCategory, asGroupChannel, asPrivateChannel, asServerChannel, asServerTextChannel, asServerVoiceChannel, asTextChannel, asVoiceChannel, canSee, canYouSee
-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.core.listener.channel.InternalChannelAttachableListenerManager
addChannelAttachableListener, getChannelAttachableListeners, removeChannelAttachableListener, removeListener
-
Methods inherited from interface org.javacord.core.listener.channel.server.InternalServerChannelAttachableListenerManager
addServerChannelAttachableListener, addServerChannelChangeNameListener, addServerChannelChangeOverwrittenPermissionsListener, addServerChannelChangePositionListener, addServerChannelDeleteListener, getServerChannelAttachableListeners, getServerChannelChangeNameListeners, getServerChannelChangeOverwrittenPermissionsListeners, getServerChannelChangePositionListeners, getServerChannelDeleteListeners, removeListener, removeServerChannelAttachableListener
-
Methods inherited from interface org.javacord.core.listener.channel.server.voice.InternalServerVoiceChannelAttachableListenerManager
addServerVoiceChannelAttachableListener, addServerVoiceChannelChangeBitrateListener, addServerVoiceChannelChangeUserLimitListener, addServerVoiceChannelMemberJoinListener, addServerVoiceChannelMemberLeaveListener, getApi, getId, getServerVoiceChannelAttachableListeners, getServerVoiceChannelChangeBitrateListeners, getServerVoiceChannelChangeUserLimitListeners, getServerVoiceChannelMemberJoinListeners, getServerVoiceChannelMemberLeaveListeners, removeListener, removeServerVoiceChannelAttachableListener
-
Methods inherited from interface org.javacord.core.listener.channel.InternalVoiceChannelAttachableListenerManager
addVoiceChannelAttachableListener, getVoiceChannelAttachableListeners, removeListener, removeVoiceChannelAttachableListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javacord.api.entity.channel.ServerChannel
canCreateInstantInvite, canYouCreateInstantInvite, compareTo, createInviteBuilder, delete, delete, getEffectiveAllowedPermissions, getEffectiveDeniedPermissions, getEffectiveOverwrittenPermissions, getEffectivePermissions, getInvites, getOverwrittenPermissions, getOverwrittenPermissions, getOverwrittenRolePermissions, getOverwrittenUserPermissions, getPosition, getRawPosition, getServer, hasAnyPermission, hasPermission, hasPermissions, updateName, updateRawPosition
-
Methods inherited from class org.javacord.core.entity.channel.ServerChannelImpl
delete, getApi, getEffectiveOverwrittenPermissions, getId, getInternalOverwrittenRolePermissions, getInternalOverwrittenUserPermissions, getInvites, getName, getOverwrittenPermissions, getOverwrittenRolePermissions, getOverwrittenUserPermissions, getRawPosition, getServer, setName, setPosition
-
Methods inherited from interface org.javacord.api.entity.channel.ServerVoiceChannel
createUpdater, getCurrentCachedInstance, getLatestInstance, getType, isConnected, removeCategory, removeUserLimit, updateBitrate, updateCategory, updateUserLimit
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
Methods inherited from interface org.javacord.api.entity.channel.VoiceChannel
canConnect, canMuteUsers, canYouConnect, canYouMuteUsers
-
-
-
-
Constructor Detail
-
ServerVoiceChannelImpl
public ServerVoiceChannelImpl(DiscordApiImpl api, ServerImpl server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new server voice channel object.- Parameters:
api
- The discord api instance.server
- The server of the channel.data
- The json data of the channel.
-
-
Method Detail
-
setBitrate
public void setBitrate(int bitrate)
Sets the bitrate of the channel.- Parameters:
bitrate
- The new bitrate of the channel.
-
setUserLimit
public void setUserLimit(int userLimit)
Sets the user limit of the channel.- Parameters:
userLimit
- The user limit to set.
-
setParentId
public void setParentId(long parentId)
Sets the parent id of the channel.- Parameters:
parentId
- The parent id to set.
-
addConnectedUser
public void addConnectedUser(long userId)
Adds the user with the given id to the list of connected users.- Parameters:
userId
- The id of the user to add.
-
removeConnectedUser
public void removeConnectedUser(long userId)
Removes the user with the given id from the list of connected users.- Parameters:
userId
- The id of the user to remove.
-
getCategory
public Optional<ChannelCategory> getCategory()
- Specified by:
getCategory
in interfaceCategorizable
-
getBitrate
public int getBitrate()
- Specified by:
getBitrate
in interfaceServerVoiceChannel
-
getUserLimit
public Optional<Integer> getUserLimit()
- Specified by:
getUserLimit
in interfaceServerVoiceChannel
-
getConnectedUserIds
public Collection<Long> getConnectedUserIds()
- Specified by:
getConnectedUserIds
in interfaceServerVoiceChannel
-
getConnectedUsers
public Collection<User> getConnectedUsers()
- Specified by:
getConnectedUsers
in interfaceServerVoiceChannel
-
isConnected
public boolean isConnected(long userId)
- Specified by:
isConnected
in interfaceServerVoiceChannel
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classServerChannelImpl
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classServerChannelImpl
-
toString
public String toString()
- Overrides:
toString
in classServerChannelImpl
-
-