public class TS3ApiAsync extends Object
TS3Api to interact with the TS3Query.
This class is used to easily interact with a TS3Query. It constructs commands,
sends them to the TeamSpeak3 server, processes the response and returns the result.
All methods in this class are asynchronous (so they won't block) and
will return a CommandFuture of the corresponding return type in TS3Api.
If a command fails, no exception will be thrown directly. It will however be rethrown in
CommandFuture.get() and CommandFuture.get(long, TimeUnit).
Usually, the thrown exception is a TS3CommandFailedException, which will get you
access to the QueryError from which more information about the error can be obtained.
Also note that while these methods are asynchronous, the commands will still be sent through a synchronous command pipeline. That means if an asynchronous method is called immediately followed by a synchronous method, the synchronous method will first have to wait until the asynchronous method completed until it its command is sent.
You won't be able to execute most commands while you're not logged in due to missing permissions.
Make sure to either pass your login credentials to the TS3Config object when
creating the TS3Query or to call login(String, String) to log in.
After that, most commands also require you to select a virtual server.
To do so, call either selectVirtualServerByPort(int) or selectVirtualServerById(int).
The synchronous version of the API| Modifier and Type | Method and Description |
|---|---|
CommandFuture<Integer> |
addBan(String ip,
String name,
String uid,
long timeInSeconds,
String reason)
Adds a new ban entry.
|
CommandFuture<Integer> |
addBan(String ip,
String name,
String uid,
String myTSId,
long timeInSeconds,
String reason)
Adds a new ban entry.
|
CommandFuture<Void> |
addChannelClientPermission(int channelId,
int clientDBId,
String permName,
int permValue)
Adds a specified permission to a client in a specific channel.
|
CommandFuture<Integer> |
addChannelGroup(String name)
Creates a new channel group for clients using a given name and returns its ID.
|
CommandFuture<Integer> |
addChannelGroup(String name,
PermissionGroupDatabaseType type)
Creates a new channel group using a given name and returns its ID.
|
CommandFuture<Void> |
addChannelGroupPermission(int groupId,
String permName,
int permValue)
Adds a specified permission to a channel group.
|
CommandFuture<Void> |
addChannelPermission(int channelId,
String permName,
int permValue)
Adds a specified permission to a channel.
|
CommandFuture<Void> |
addClientPermission(int clientDBId,
BPermissionType permName,
boolean value,
boolean skipped)
Adds a specified permission to a client.
|
CommandFuture<Void> |
addClientPermission(int clientDBId,
IPermissionType permName,
int value,
boolean skipped)
Adds a specified permission to a client.
|
CommandFuture<Void> |
addClientPermission(int clientDBId,
String permName,
int value,
boolean skipped)
Deprecated.
This method is no longer preferred for adding permissions to a client.
Use |
CommandFuture<Void> |
addClientToServerGroup(int groupId,
int clientDatabaseId)
Adds a client to the specified server group.
|
CommandFuture<Void> |
addComplaint(int clientDBId,
String message)
Submits a complaint about the specified client.
|
CommandFuture<Void> |
addPermissionToAllServerGroups(ServerGroupType type,
String permName,
int value,
boolean negated,
boolean skipped)
Adds a specified permission to all server groups of the type specified by
type on all virtual servers. |
CommandFuture<String> |
addPrivilegeKey(PrivilegeKeyType type,
int groupId,
int channelId,
String description)
Create a new privilege key that allows one client to join a server or channel group.
|
CommandFuture<String> |
addPrivilegeKeyChannelGroup(int channelGroupId,
int channelId,
String description)
Creates a new privilege key for a channel group.
|
CommandFuture<String> |
addPrivilegeKeyServerGroup(int serverGroupId,
String description)
Creates a new privilege key for a server group.
|
CommandFuture<Integer> |
addServerGroup(String name)
Creates a new server group for clients using a given name and returns its ID.
|
CommandFuture<Integer> |
addServerGroup(String name,
PermissionGroupDatabaseType type)
Creates a new server group using a given name and returns its ID.
|
CommandFuture<Void> |
addServerGroupPermission(int groupId,
String permName,
int value,
boolean negated,
boolean skipped)
Adds a specified permission to a server group.
|
CommandFuture<CreatedQueryLogin> |
addServerQueryLogin(String loginName,
int clientDBId)
Creates a server query login with name
loginName for the client specified by clientDBId
on the currently selected virtual server and returns the password of the created login. |
void |
addTS3Listeners(TS3Listener... listeners)
Adds one or more
TS3Listeners to the event manager of the query. |
CommandFuture<int[]> |
banClient(int clientId,
long timeInSeconds)
Bans a client with a given client ID for a given time.
|
CommandFuture<int[]> |
banClient(int clientId,
long timeInSeconds,
String reason)
Bans a client with a given client ID for a given time for the specified reason.
|
CommandFuture<int[]> |
banClient(int clientId,
String reason)
Bans a client with a given client ID permanently for the specified reason.
|
CommandFuture<int[]> |
banClients(int[] clientIds,
long timeInSeconds,
String reason,
boolean continueOnError)
Bans multiple clients by their client ID for a given time for the specified reason.
|
CommandFuture<Void> |
broadcast(String message)
Sends a text message to all clients on all virtual servers.
|
CommandFuture<Void> |
copyChannelGroup(int sourceGroupId,
int targetGroupId,
PermissionGroupDatabaseType type)
Creates a copy of the channel group specified by
sourceGroupId,
overwriting any other channel group specified by targetGroupId. |
CommandFuture<Integer> |
copyChannelGroup(int sourceGroupId,
String targetName,
PermissionGroupDatabaseType type)
Creates a copy of the channel group specified by
sourceGroupId with a given name
and returns the ID of the newly created channel group. |
CommandFuture<Integer> |
copyServerGroup(int sourceGroupId,
int targetGroupId,
PermissionGroupDatabaseType type)
Creates a copy of the server group specified by
sourceGroupId,
overwriting another server group specified by targetGroupId. |
CommandFuture<Integer> |
copyServerGroup(int sourceGroupId,
String targetName,
PermissionGroupDatabaseType type)
Creates a copy of the server group specified by
sourceGroupId with a given name
and returns the ID of the newly created server group. |
CommandFuture<Integer> |
createChannel(String name,
Map<ChannelProperty,String> options)
Creates a new channel with a given name using the given properties and returns its ID.
|
CommandFuture<Void> |
createFileDirectory(String directoryPath,
int channelId)
Creates a new directory on the file repository in the specified channel.
|
CommandFuture<Void> |
createFileDirectory(String directoryPath,
int channelId,
String channelPassword)
Creates a new directory on the file repository in the specified channel.
|
CommandFuture<CreatedVirtualServer> |
createServer(String name,
Map<VirtualServerProperty,String> options)
Creates a new virtual server with the given name and returns an object containing the ID of the newly
created virtual server, the default server admin token and the virtual server's voice port.
|
CommandFuture<Snapshot> |
createServerSnapshot()
Creates a
Snapshot of the selected virtual server containing all settings,
groups and known client identities. |
CommandFuture<Void> |
deleteAllBans()
Deletes all active ban rules from the server.
|
CommandFuture<Void> |
deleteAllComplaints(int clientDBId)
Deletes all complaints about the client with specified database ID from the server.
|
CommandFuture<Void> |
deleteBan(int banId)
Deletes the ban rule with the specified ID from the server.
|
CommandFuture<Void> |
deleteChannel(int channelId)
Deletes an existing channel specified by its ID, kicking all clients out of the channel.
|
CommandFuture<Void> |
deleteChannel(int channelId,
boolean force)
Deletes an existing channel with a given ID.
|
CommandFuture<Void> |
deleteChannelClientPermission(int channelId,
int clientDBId,
String permName)
Removes a specified permission from a client in a specific channel.
|
CommandFuture<Void> |
deleteChannelGroup(int groupId)
Removes the channel group with the given ID.
|
CommandFuture<Void> |
deleteChannelGroup(int groupId,
boolean force)
Removes the channel group with the given ID.
|
CommandFuture<Void> |
deleteChannelGroupPermission(int groupId,
String permName)
Removes a permission from the channel group with the given ID.
|
CommandFuture<Void> |
deleteChannelPermission(int channelId,
String permName)
Removes a permission from the channel with the given ID.
|
CommandFuture<Void> |
deleteClientPermission(int clientDBId,
BPermissionType permName)
Removes a permission from a client.
|
CommandFuture<Void> |
deleteClientPermission(int clientDBId,
IPermissionType permName)
Removes a permission from a client.
|
CommandFuture<Void> |
deleteClientPermission(int clientDBId,
String permName)
Deprecated.
This method is no longer preferred for removing permissions from a client.
Use |
CommandFuture<Void> |
deleteComplaint(int targetClientDBId,
int fromClientDBId)
Deletes the complaint about the client with database ID
targetClientDBId submitted by
the client with database ID fromClientDBId from the server. |
CommandFuture<Void> |
deleteCustomClientProperty(int clientDBId,
String key)
Removes the
key custom client property from a client. |
CommandFuture<Void> |
deleteDatabaseClientProperties(int clientDBId)
Removes all stored database information about the specified client.
|
CommandFuture<Void> |
deleteFile(String filePath,
int channelId)
Deletes a file or directory from the file repository in the specified channel.
|
CommandFuture<Void> |
deleteFile(String filePath,
int channelId,
String channelPassword)
Deletes a file or directory from the file repository in the specified channel.
|
CommandFuture<Void> |
deleteFiles(String[] filePaths,
int channelId)
Deletes multiple files or directories from the file repository in the specified channel.
|
CommandFuture<Void> |
deleteFiles(String[] filePaths,
int channelId,
String channelPassword)
Deletes multiple files or directories from the file repository in the specified channel.
|
CommandFuture<Void> |
deleteIcon(long iconId)
Deletes an icon from the icon directory in the file repository.
|
CommandFuture<Void> |
deleteIcons(long... iconIds)
Deletes multiple icons from the icon directory in the file repository.
|
CommandFuture<Void> |
deleteOfflineMessage(int messageId)
Deletes the offline message with the specified ID.
|
CommandFuture<Void> |
deletePermissionFromAllServerGroups(ServerGroupType type,
String permName)
Removes a specified permission from all server groups of the type specified by
type on all virtual servers. |
CommandFuture<Void> |
deletePrivilegeKey(String token)
Deletes the privilege key with the given token.
|
CommandFuture<Void> |
deleteServer(int serverId)
Deletes the virtual server with the specified ID.
|
CommandFuture<Void> |
deleteServerGroup(int groupId)
Deletes the server group with the specified ID, even if the server group still contains clients.
|
CommandFuture<Void> |
deleteServerGroup(int groupId,
boolean force)
Deletes a server group with the specified ID.
|
CommandFuture<Void> |
deleteServerGroupPermission(int groupId,
String permName)
Removes a permission from the server group with the given ID.
|
CommandFuture<Void> |
deleteServerQueryLogin(int clientDBId)
Deletes the server query login with the specified client database ID.
|
CommandFuture<Void> |
deployServerSnapshot(Snapshot snapshot)
Restores the selected virtual servers configuration using the data from a
previously created server snapshot.
|
CommandFuture<Void> |
deployServerSnapshot(String snapshot)
Restores the configuration of the selected virtual server using the data from a
previously created server snapshot.
|
CommandFuture<Long> |
downloadFile(OutputStream dataOut,
String filePath,
int channelId)
Downloads a file from the file repository at a given path and channel
and writes the file's bytes to an open
OutputStream. |
CommandFuture<Long> |
downloadFile(OutputStream dataOut,
String filePath,
int channelId,
String channelPassword)
Downloads a file from the file repository at a given path and channel
and writes the file's bytes to an open
OutputStream. |
CommandFuture<byte[]> |
downloadFileDirect(String filePath,
int channelId)
Downloads a file from the file repository at a given path and channel
and returns the file's bytes as a byte array.
|
CommandFuture<byte[]> |
downloadFileDirect(String filePath,
int channelId,
String channelPassword)
Downloads a file from the file repository at a given path and channel
and returns the file's bytes as a byte array.
|
CommandFuture<Long> |
downloadIcon(OutputStream dataOut,
long iconId)
Downloads an icon from the icon directory in the file repository
and writes the file's bytes to an open
OutputStream. |
CommandFuture<byte[]> |
downloadIconDirect(long iconId)
Downloads an icon from the icon directory in the file repository
and returns the file's bytes as a byte array.
|
CommandFuture<Void> |
editChannel(int channelId,
ChannelProperty property,
String value)
Changes a single property of the given channel.
|
CommandFuture<Void> |
editChannel(int channelId,
Map<ChannelProperty,String> options)
Changes a channel's configuration using the given properties.
|
CommandFuture<Void> |
editClient(int clientId,
ClientProperty property,
String value)
Changes a single property of the given client.
|
CommandFuture<Void> |
editClient(int clientId,
Map<ClientProperty,String> options)
Changes a client's configuration using given properties.
|
CommandFuture<Void> |
editDatabaseClient(int clientDBId,
Map<ClientProperty,String> options)
Changes a client's database settings using given properties.
|
CommandFuture<Void> |
editInstance(ServerInstanceProperty property,
String value)
Changes the server instance configuration using given properties.
|
CommandFuture<Void> |
editServer(Map<VirtualServerProperty,String> options)
Changes the configuration of the selected virtual server using given properties.
|
CommandFuture<List<Ban>> |
getBans()
Gets a list of all bans on the selected virtual server.
|
CommandFuture<List<Binding>> |
getBindings()
Gets a list of IP addresses used by the server instance.
|
CommandFuture<Channel> |
getChannelByNameExact(String name,
boolean ignoreCase)
Finds and returns the channel matching the given name exactly.
|
CommandFuture<List<Permission>> |
getChannelClientPermissions(int channelId,
int clientDBId)
Displays a list of permissions defined for a client in a specific channel.
|
CommandFuture<List<ChannelGroupClient>> |
getChannelGroupClients(int channelId,
int clientDBId,
int groupId)
Gets all client / channel ID combinations currently assigned to channel groups.
|
CommandFuture<List<ChannelGroupClient>> |
getChannelGroupClientsByChannelGroupId(int groupId)
Gets all client / channel ID combinations currently assigned to the specified channel group.
|
CommandFuture<List<ChannelGroupClient>> |
getChannelGroupClientsByChannelId(int channelId)
Gets all channel group assignments in the specified channel.
|
CommandFuture<List<ChannelGroupClient>> |
getChannelGroupClientsByClientDBId(int clientDBId)
Gets all channel group assignments for the specified client.
|
CommandFuture<List<Permission>> |
getChannelGroupPermissions(int groupId)
Gets a list of all permissions assigned to the specified channel group.
|
CommandFuture<List<ChannelGroup>> |
getChannelGroups()
Gets a list of all channel groups on the selected virtual server.
|
CommandFuture<ChannelInfo> |
getChannelInfo(int channelId)
Gets detailed configuration information about the channel specified channel.
|
CommandFuture<List<Permission>> |
getChannelPermissions(int channelId)
Gets a list of all permissions assigned to the specified channel.
|
CommandFuture<List<Channel>> |
getChannels()
Gets a list of all channels on the selected virtual server.
|
CommandFuture<List<Channel>> |
getChannelsByName(String name)
Gets a list of channels whose names contain the given search string.
|
CommandFuture<Client> |
getClientByNameExact(String name,
boolean ignoreCase)
Finds and returns the client whose nickname matches the given name exactly.
|
CommandFuture<ClientInfo> |
getClientByUId(String clientUId)
Gets information about the client with the specified unique identifier.
|
CommandFuture<ClientInfo> |
getClientInfo(int clientId)
Gets information about the client with the specified client ID.
|
CommandFuture<List<Permission>> |
getClientPermissions(int clientDBId)
Gets a list of all permissions assigned to the specified client.
|
CommandFuture<List<Client>> |
getClients()
Gets a list of all clients on the selected virtual server.
|
CommandFuture<List<Client>> |
getClientsByName(String name)
Gets a list of clients whose nicknames contain the given search string.
|
CommandFuture<List<Complaint>> |
getComplaints()
Gets a list of all complaints on the selected virtual server.
|
CommandFuture<List<Complaint>> |
getComplaints(int clientDBId)
Gets a list of all complaints about the specified client.
|
CommandFuture<ConnectionInfo> |
getConnectionInfo()
Gets detailed connection information about the selected virtual server.
|
CommandFuture<Map<String,String>> |
getCustomClientProperties(int clientDBId)
Gets a map of all custom client properties and their values
assigned to the client with database ID
clientDBId. |
CommandFuture<DatabaseClientInfo> |
getDatabaseClientByUId(String clientUId)
Gets information about the client with the specified unique identifier in the server database.
|
CommandFuture<DatabaseClientInfo> |
getDatabaseClientInfo(int clientDBId)
Gets information about the client with the specified database ID in the server database.
|
CommandFuture<List<DatabaseClient>> |
getDatabaseClients()
Gets information about all clients in the server database.
|
CommandFuture<List<DatabaseClient>> |
getDatabaseClients(int offset,
int count)
Gets information about a set number of clients in the server database, starting at
offset. |
CommandFuture<List<DatabaseClientInfo>> |
getDatabaseClientsByName(String name)
Gets all clients in the database whose last nickname matches the specified name exactly.
|
CommandFuture<FileInfo> |
getFileInfo(String filePath,
int channelId)
Gets information about a file on the file repository in the specified channel.
|
CommandFuture<FileInfo> |
getFileInfo(String filePath,
int channelId,
String channelPassword)
Gets information about a file on the file repository in the specified channel.
|
CommandFuture<List<FileInfo>> |
getFileInfos(String[] filePaths,
int channelId)
Gets information about multiple files on the file repository in the specified channel.
|
CommandFuture<List<FileInfo>> |
getFileInfos(String[] filePaths,
int[] channelIds,
String[] channelPasswords)
Gets information about multiple files on the file repository in multiple channels.
|
CommandFuture<List<FileInfo>> |
getFileInfos(String[] filePaths,
int channelId,
String channelPassword)
Gets information about multiple files on the file repository in the specified channel.
|
CommandFuture<List<FileListEntry>> |
getFileList(String directoryPath,
int channelId)
Gets a list of files and directories in the specified parent directory and channel.
|
CommandFuture<List<FileListEntry>> |
getFileList(String directoryPath,
int channelId,
String channelPassword)
Gets a list of files and directories in the specified parent directory and channel.
|
CommandFuture<List<FileTransfer>> |
getFileTransfers()
Gets a list of active or recently active file transfers.
|
CommandFuture<HostInfo> |
getHostInfo()
Displays detailed configuration information about the server instance including
uptime, number of virtual servers online, traffic information, etc.
|
CommandFuture<List<IconFile>> |
getIconList()
Gets a list of all icon files on this virtual server.
|
CommandFuture<InstanceInfo> |
getInstanceInfo()
Displays the server instance configuration including database revision number,
the file transfer port, default group IDs, etc.
|
CommandFuture<List<String>> |
getInstanceLogEntries()
Fetches the last 100 log entries from the server log.
|
CommandFuture<List<String>> |
getInstanceLogEntries(int lines)
Fetches the specified amount of log entries from the server log.
|
CommandFuture<String> |
getOfflineMessage(int messageId)
Reads the message body of a message.
|
CommandFuture<String> |
getOfflineMessage(Message message)
Reads the message body of a message.
|
CommandFuture<List<Message>> |
getOfflineMessages()
Gets a list of all offline messages for the server query.
|
CommandFuture<List<PermissionAssignment>> |
getPermissionAssignments(String permName)
Displays detailed information about all assignments of the permission specified
with
permName. |
CommandFuture<Integer> |
getPermissionIdByName(String permName)
Gets the ID of the permission specified by
permName. |
CommandFuture<int[]> |
getPermissionIdsByName(String... permNames)
Gets the IDs of the permissions specified by
permNames. |
CommandFuture<List<PermissionAssignment>> |
getPermissionOverview(int channelId,
int clientDBId)
Gets a list of all assigned permissions for a client in a specified channel.
|
CommandFuture<List<PermissionInfo>> |
getPermissions()
Displays a list of all permissions, including ID, name and description.
|
CommandFuture<Integer> |
getPermissionValue(String permName)
Displays the current value of the specified permission for this server query instance.
|
CommandFuture<int[]> |
getPermissionValues(String... permNames)
Displays the current values of the specified permissions for this server query instance.
|
CommandFuture<List<PrivilegeKey>> |
getPrivilegeKeys()
Gets a list of all available tokens to join channel or server groups,
including their type and group IDs.
|
CommandFuture<List<ServerGroupClient>> |
getServerGroupClients(int serverGroupId)
Gets a list of all clients in the specified server group.
|
CommandFuture<List<ServerGroupClient>> |
getServerGroupClients(ServerGroup serverGroup)
Gets a list of all clients in the specified server group.
|
CommandFuture<List<Permission>> |
getServerGroupPermissions(int serverGroupId)
Gets a list of all permissions assigned to the specified server group.
|
CommandFuture<List<Permission>> |
getServerGroupPermissions(ServerGroup serverGroup)
Gets a list of all permissions assigned to the specified server group.
|
CommandFuture<List<ServerGroup>> |
getServerGroups()
Gets a list of all server groups on the virtual server.
|
CommandFuture<List<ServerGroup>> |
getServerGroupsByClient(Client client)
Gets a list of all server groups set for a client.
|
CommandFuture<List<ServerGroup>> |
getServerGroupsByClientId(int clientDatabaseId)
Gets a list of all server groups set for a client.
|
CommandFuture<Integer> |
getServerIdByPort(int port)
Gets the ID of a virtual server by its port.
|
CommandFuture<VirtualServerInfo> |
getServerInfo()
Gets detailed information about the virtual server the server query is currently in.
|
CommandFuture<List<QueryLogin>> |
getServerQueryLogins()
Gets a list of all server query logins (containing login name, virtual server ID, and client database ID).
|
CommandFuture<List<QueryLogin>> |
getServerQueryLoginsByName(String pattern)
Gets a list of all server query logins (containing login name, virtual server ID, and client database ID)
whose login name matches the specified SQL-like pattern.
|
CommandFuture<Version> |
getVersion()
Gets the version, build number and platform of the TeamSpeak3 server.
|
CommandFuture<List<String>> |
getVirtualServerLogEntries()
Fetches the last 100 log entries from the currently selected virtual server.
|
CommandFuture<List<String>> |
getVirtualServerLogEntries(int lines)
Fetches the specified amount of log entries from the currently selected virtual server.
|
CommandFuture<List<VirtualServer>> |
getVirtualServers()
Gets a list of all virtual servers including their ID, status, number of clients online, etc.
|
CommandFuture<Boolean> |
isClientOnline(int clientId)
Checks whether the client with the specified client ID is online.
|
CommandFuture<Boolean> |
isClientOnline(String clientUId)
Checks whether the client with the specified unique identifier is online.
|
CommandFuture<Void> |
kickClientFromChannel(Client... clients)
Kicks one or more clients from their current channels.
|
CommandFuture<Void> |
kickClientFromChannel(int... clientIds)
Kicks one or more clients from their current channels.
|
CommandFuture<Void> |
kickClientFromChannel(String message,
Client... clients)
Kicks one or more clients from their current channels for the specified reason.
|
CommandFuture<Void> |
kickClientFromChannel(String message,
int... clientIds)
Kicks one or more clients from their current channels for the specified reason.
|
CommandFuture<Void> |
kickClientFromServer(Client... clients)
Kicks one or more clients from the server.
|
CommandFuture<Void> |
kickClientFromServer(int... clientIds)
Kicks one or more clients from the server.
|
CommandFuture<Void> |
kickClientFromServer(String message,
Client... clients)
Kicks one or more clients from the server for the specified reason.
|
CommandFuture<Void> |
kickClientFromServer(String message,
int... clientIds)
Kicks one or more clients from the server for the specified reason.
|
CommandFuture<Void> |
login(String username,
String password)
Logs the server query in using the specified username and password.
|
CommandFuture<Void> |
logout()
Logs the server query out and deselects the current virtual server.
|
CommandFuture<Void> |
moveChannel(int channelId,
int channelTargetId)
Moves a channel to a new parent channel specified by its ID.
|
CommandFuture<Void> |
moveChannel(int channelId,
int channelTargetId,
int order)
Moves a channel to a new parent channel specified by its ID.
|
CommandFuture<Void> |
moveClient(Client client,
ChannelBase channel)
Moves a single client into a channel.
|
CommandFuture<Void> |
moveClient(Client client,
ChannelBase channel,
String channelPassword)
Moves a single client into a channel using the specified password.
|
CommandFuture<Void> |
moveClient(int clientId,
int channelId)
Moves a single client into a channel.
|
CommandFuture<Void> |
moveClient(int clientId,
int channelId,
String channelPassword)
Moves a single client into a channel using the specified password.
|
CommandFuture<Void> |
moveClients(Client[] clients,
ChannelBase channel)
Moves multiple clients into a channel.
|
CommandFuture<Void> |
moveClients(Client[] clients,
ChannelBase channel,
String channelPassword)
Moves multiple clients into a channel using the specified password.
|
CommandFuture<Void> |
moveClients(int[] clientIds,
int channelId)
Moves multiple clients into a channel.
|
CommandFuture<Void> |
moveClients(int[] clientIds,
int channelId,
String channelPassword)
Moves multiple clients into a channel using the specified password.
|
CommandFuture<Void> |
moveFile(String oldPath,
String newPath,
int channelId)
Moves and renames a file on the file repository within the same channel.
|
CommandFuture<Void> |
moveFile(String oldPath,
String newPath,
int oldChannelId,
int newChannelId)
Renames a file on the file repository and moves it to a new path in a different channel.
|
CommandFuture<Void> |
moveFile(String oldPath,
String newPath,
int channelId,
String channelPassword)
Moves and renames a file on the file repository within the same channel.
|
CommandFuture<Void> |
moveFile(String oldPath,
String newPath,
int oldChannelId,
String oldPassword,
int newChannelId,
String newPassword)
Renames a file on the file repository and moves it to a new path in a different channel.
|
CommandFuture<Void> |
moveQuery(ChannelBase channel)
Moves the server query into a channel.
|
CommandFuture<Void> |
moveQuery(ChannelBase channel,
String channelPassword)
Moves the server query into a channel using the specified password.
|
CommandFuture<Void> |
moveQuery(int channelId)
Moves the server query into a channel.
|
CommandFuture<Void> |
moveQuery(int channelId,
String channelPassword)
Moves the server query into a channel using the specified password.
|
CommandFuture<Void> |
pokeClient(int clientId,
String message)
Pokes the client with the specified client ID.
|
CommandFuture<Void> |
registerAllEvents()
Registers the server query to receive notifications about all server events.
|
CommandFuture<Void> |
registerEvent(TS3EventType eventType)
Registers the server query to receive notifications about a given event type.
|
CommandFuture<Void> |
registerEvent(TS3EventType eventType,
int channelId)
Registers the server query to receive notifications about a given event type.
|
CommandFuture<Void> |
registerEvents(TS3EventType... eventTypes)
Registers the server query to receive notifications about multiple given event types.
|
CommandFuture<Void> |
removeClientFromServerGroup(int serverGroupId,
int clientDatabaseId)
Removes the client specified by its database ID from the specified server group.
|
CommandFuture<Void> |
removeClientFromServerGroup(ServerGroup serverGroup,
Client client)
Removes the specified client from the specified server group.
|
void |
removeTS3Listeners(TS3Listener... listeners)
Removes one or more
TS3Listeners to the event manager of the query. |
CommandFuture<Void> |
renameChannelGroup(ChannelGroup channelGroup,
String name)
Renames the specified channel group.
|
CommandFuture<Void> |
renameChannelGroup(int channelGroupId,
String name)
Renames the channel group with the specified ID.
|
CommandFuture<Void> |
renameServerGroup(int serverGroupId,
String name)
Renames the server group with the specified ID.
|
CommandFuture<Void> |
renameServerGroup(ServerGroup serverGroup,
String name)
Renames the specified server group.
|
CommandFuture<String> |
resetPermissions()
Resets all permissions and deletes all server / channel groups.
|
CommandFuture<List<CustomPropertyAssignment>> |
searchCustomClientProperty(String key)
Finds all clients that have any value associated with the
key custom client property,
and returns the client's database ID and the key and value of the matching custom property. |
CommandFuture<List<CustomPropertyAssignment>> |
searchCustomClientProperty(String key,
String valuePattern)
Finds all clients whose value associated with the
key custom client property matches the
SQL-like pattern valuePattern, and returns the client's database ID and the key and value
of the matching custom property. |
CommandFuture<Void> |
selectVirtualServer(VirtualServer server)
Moves the server query into the specified virtual server.
|
CommandFuture<Void> |
selectVirtualServer(VirtualServer server,
String nickname)
Moves the server query into the specified virtual server
and sets the server query's nickname.
|
CommandFuture<Void> |
selectVirtualServerById(int id)
Moves the server query into the virtual server with the specified ID.
|
CommandFuture<Void> |
selectVirtualServerById(int id,
String nickname)
Moves the server query into the virtual server with the specified ID
and sets the server query's nickname.
|
CommandFuture<Void> |
selectVirtualServerByPort(int port)
Moves the server query into the virtual server with the specified voice port.
|
CommandFuture<Void> |
selectVirtualServerByPort(int port,
String nickname)
Moves the server query into the virtual server with the specified voice port
and sets the server query's nickname.
|
CommandFuture<Void> |
sendChannelMessage(int channelId,
String message)
Sends a text message to the channel with the specified ID.
|
CommandFuture<Void> |
sendChannelMessage(String message)
Sends a text message to the channel the server query is currently in.
|
CommandFuture<Void> |
sendOfflineMessage(String clientUId,
String subject,
String message)
Sends an offline message to the client with the given unique identifier.
|
CommandFuture<Void> |
sendPrivateMessage(int clientId,
String message)
Sends a private message to the client with the specified client ID.
|
CommandFuture<Void> |
sendServerMessage(int serverId,
String message)
Sends a text message to the virtual server with the specified ID.
|
CommandFuture<Void> |
sendServerMessage(String message)
Sends a text message to the virtual server the server query is currently in.
|
CommandFuture<Void> |
sendTextMessage(TextMessageTargetMode targetMode,
int targetId,
String message)
Sends a text message either to the whole virtual server, a channel or specific client.
|
CommandFuture<Void> |
setClientChannelGroup(int groupId,
int channelId,
int clientDBId)
Sets a channel group for a client in a specific channel.
|
CommandFuture<Void> |
setCustomClientProperties(int clientDBId,
Map<String,String> properties)
Sets the value of the multiple custom client properties for a client.
|
CommandFuture<Void> |
setCustomClientProperty(int clientDBId,
String key,
String value)
Sets the value of the
key custom client property for a client. |
CommandFuture<Void> |
setMessageRead(int messageId)
Sets the read flag to
true for a given message. |
CommandFuture<Void> |
setMessageRead(Message message)
Sets the read flag to
true for a given message. |
CommandFuture<Void> |
setMessageReadFlag(int messageId,
boolean read)
Sets the read flag for a given message.
|
CommandFuture<Void> |
setMessageReadFlag(Message message,
boolean read)
Sets the read flag for a given message.
|
CommandFuture<Void> |
setNickname(String nickname)
Sets the nickname of the server query client.
|
CommandFuture<Void> |
startServer(int serverId)
Starts the virtual server with the specified ID.
|
CommandFuture<Void> |
startServer(VirtualServer virtualServer)
Starts the specified virtual server.
|
CommandFuture<Void> |
stopServer(int serverId)
Stops the virtual server with the specified ID.
|
CommandFuture<Void> |
stopServer(int serverId,
String reason)
Stops the virtual server with the specified ID.
|
CommandFuture<Void> |
stopServer(VirtualServer virtualServer)
Stops the specified virtual server.
|
CommandFuture<Void> |
stopServer(VirtualServer virtualServer,
String reason)
Stops the specified virtual server.
|
CommandFuture<Void> |
stopServerProcess()
Stops the entire TeamSpeak 3 Server instance by shutting down the process.
|
CommandFuture<Void> |
stopServerProcess(String reason)
Stops the entire TeamSpeak 3 Server instance by shutting down the process.
|
CommandFuture<Void> |
unregisterAllEvents()
Unregisters the server query from receiving any event notifications.
|
CommandFuture<Void> |
updateClient(ClientProperty property,
String value)
Changes a single client property for this server query instance.
|
CommandFuture<Void> |
updateClient(Map<ClientProperty,String> options)
Updates several client properties for this server query instance.
|
CommandFuture<String> |
updateServerQueryLogin(String loginName)
Generates new login credentials for the currently connected server query instance, using the given name.
|
CommandFuture<Void> |
uploadFile(InputStream dataIn,
long dataLength,
String filePath,
boolean overwrite,
int channelId)
Uploads a file to the file repository at a given path and channel
by reading
dataLength bytes from an open InputStream. |
CommandFuture<Void> |
uploadFile(InputStream dataIn,
long dataLength,
String filePath,
boolean overwrite,
int channelId,
String channelPassword)
Uploads a file to the file repository at a given path and channel
by reading
dataLength bytes from an open InputStream. |
CommandFuture<Void> |
uploadFileDirect(byte[] data,
String filePath,
boolean overwrite,
int channelId)
Uploads a file that is already stored in memory to the file repository
at a given path and channel.
|
CommandFuture<Void> |
uploadFileDirect(byte[] data,
String filePath,
boolean overwrite,
int channelId,
String channelPassword)
Uploads a file that is already stored in memory to the file repository
at a given path and channel.
|
CommandFuture<Long> |
uploadIcon(InputStream dataIn,
long dataLength)
Uploads an icon to the icon directory in the file repository
by reading
dataLength bytes from an open InputStream. |
CommandFuture<Long> |
uploadIconDirect(byte[] data)
Uploads an icon that is already stored in memory to the icon directory
in the file repository.
|
CommandFuture<Void> |
usePrivilegeKey(PrivilegeKey privilegeKey)
Uses an existing privilege key to join a server or channel group.
|
CommandFuture<Void> |
usePrivilegeKey(String token)
Uses an existing privilege key to join a server or channel group.
|
CommandFuture<ServerQueryInfo> |
whoAmI()
Gets information about the current server query instance.
|
public CommandFuture<Integer> addBan(String ip, String name, String uid, long timeInSeconds, String reason)
ip, name or uid needs to be non-null.
Returns the ID of the newly created ban entry.ip - a RegEx pattern to match a client's IP against, can be nullname - a RegEx pattern to match a client's name against, can be nulluid - the unique identifier of a client, can be nulltimeInSeconds - the duration of the ban in seconds. 0 equals a permanent banreason - the reason for the ban, can be nullTS3CommandFailedException - if the execution of a command failsRegEx Pattern,
addBan(String, String, String, String, long, String),
Client.getId(),
Client.getUniqueIdentifier(),
Client.getIp()public CommandFuture<Integer> addBan(String ip, String name, String uid, String myTSId, long timeInSeconds, String reason)
ip, name, uid, or
myTSId needs to be non-null. Returns the ID of the newly created ban entry.
Note that creating a ban entry for the "empty" "myTeamSpeak" ID will ban all clients who
don't have a linked "myTeamSpeak" account.
ip - a RegEx pattern to match a client's IP against, can be nullname - a RegEx pattern to match a client's name against, can be nulluid - the unique identifier of a client, can be nullmyTSId - the "myTeamSpeak" ID of a client, the string "empty", or nulltimeInSeconds - the duration of the ban in seconds. 0 equals a permanent banreason - the reason for the ban, can be nullTS3CommandFailedException - if the execution of a command failsRegEx Pattern,
Client.getId(),
Client.getUniqueIdentifier(),
Client.getIp()public CommandFuture<Void> addChannelClientPermission(int channelId, int clientDBId, String permName, int permValue)
channelId - the ID of the channel wherein the permission should be grantedclientDBId - the database ID of the client to add a permission topermName - the name of the permission to grantpermValue - the numeric value of the permission (or for boolean permissions: 1 = true, 0 = false)TS3CommandFailedException - if the execution of a command failsChannel.getId(),
Client.getDatabaseId(),
Permissionpublic CommandFuture<Integer> addChannelGroup(String name)
To create channel group templates or ones for server queries,
use addChannelGroup(String, PermissionGroupDatabaseType).
name - the name of the new channel groupTS3CommandFailedException - if the execution of a command failsChannelGrouppublic CommandFuture<Integer> addChannelGroup(String name, PermissionGroupDatabaseType type)
name - the name of the new channel grouptype - the desired type of channel groupTS3CommandFailedException - if the execution of a command failsChannelGrouppublic CommandFuture<Void> addChannelGroupPermission(int groupId, String permName, int permValue)
groupId - the ID of the channel group to grant the permissionpermName - the name of the permission to be grantedpermValue - the numeric value of the permission (or for boolean permissions: 1 = true, 0 = false)TS3CommandFailedException - if the execution of a command failsChannelGroup.getId(),
Permissionpublic CommandFuture<Void> addChannelPermission(int channelId, String permName, int permValue)
channelId - the ID of the channel wherein the permission should be grantedpermName - the name of the permission to grantpermValue - the numeric value of the permission (or for boolean permissions: 1 = true, 0 = false)TS3CommandFailedException - if the execution of a command failsChannel.getId(),
Permission@Deprecated public CommandFuture<Void> addClientPermission(int clientDBId, String permName, int value, boolean skipped)
Use addClientPermission(int, IPermissionType, int, boolean)
or addClientPermission(int, BPermissionType, boolean, boolean) instead.
clientDBId - the database ID of the client to grant the permissionpermName - the name of the permission to grantvalue - the numeric value of the permission (or for boolean permissions: 1 = true, 0 = false)skipped - if set to true, the permission will not be overridden by channel group permissionsTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
Permissionpublic CommandFuture<Void> addClientPermission(int clientDBId, IPermissionType permName, int value, boolean skipped)
clientDBId - the database ID of the client to grant the permissionpermName - the enum of the permission to grantvalue - the numeric value of the permissionskipped - if set to true, the permission will not be overridden by channel group permissionsTS3CommandFailedException - if the execution of a command failsIPermissionType,
Client.getDatabaseId(),
Permissionpublic CommandFuture<Void> addClientPermission(int clientDBId, BPermissionType permName, boolean value, boolean skipped)
clientDBId - the database ID of the client to grant the permissionpermName - the enum of the permission to grantvalue - the boolean value of the permissionskipped - if set to true, the permission will not be overridden by channel group permissionsTS3CommandFailedException - if the execution of a command failsBPermissionType,
Client.getDatabaseId(),
Permissionpublic CommandFuture<Void> addClientToServerGroup(int groupId, int clientDatabaseId)
Please note that a client cannot be added to default groups or template groups.
groupId - the ID of the server group to add the client toclientDatabaseId - the database ID of the client to addTS3CommandFailedException - if the execution of a command failsServerGroup.getId(),
Client.getDatabaseId()public CommandFuture<Void> addComplaint(int clientDBId, String message)
clientDBId - the database ID of the clientmessage - the message of the complaint, may not contain BB codesTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
Complaint.getMessage()public CommandFuture<Void> addPermissionToAllServerGroups(ServerGroupType type, String permName, int value, boolean negated, boolean skipped)
type on all virtual servers.type - the kind of server group this permission should be added topermName - the name of the permission to be grantedvalue - the numeric value of the permission (or for boolean permissions: 1 = true, 0 = false)negated - if set to true, the lowest permission value will be selected instead of the highestskipped - if set to true, this permission will not be overridden by client or channel group permissionsTS3CommandFailedException - if the execution of a command failsServerGroupType,
Permissionpublic CommandFuture<String> addPrivilegeKey(PrivilegeKeyType type, int groupId, int channelId, String description)
type is set to SERVER_GROUP,
groupId is used as a server group ID and channelId is ignored.type is set to CHANNEL_GROUP,
groupId is used as a channel group ID and channelId is used as the channel in which the group should be set.type - the type of token that should be createdgroupId - the ID of the server or channel groupchannelId - the ID of the channel, in case the token is channel group tokendescription - the description for the token, can be nullTS3CommandFailedException - if the execution of a command failsPrivilegeKeyType,
addPrivilegeKeyServerGroup(int, String),
addPrivilegeKeyChannelGroup(int, int, String)public CommandFuture<String> addPrivilegeKeyChannelGroup(int channelGroupId, int channelId, String description)
channelGroupId - the ID of the channel groupchannelId - the ID of the channel in which the channel group should be setdescription - the description for the token, can be nullTS3CommandFailedException - if the execution of a command failsChannelGroup.getId(),
Channel.getId(),
addPrivilegeKey(PrivilegeKeyType, int, int, String),
addPrivilegeKeyServerGroup(int, String)public CommandFuture<String> addPrivilegeKeyServerGroup(int serverGroupId, String description)
serverGroupId - the ID of the server groupdescription - the description for the token, can be nullTS3CommandFailedException - if the execution of a command failsServerGroup.getId(),
addPrivilegeKey(PrivilegeKeyType, int, int, String),
addPrivilegeKeyChannelGroup(int, int, String)public CommandFuture<Integer> addServerGroup(String name)
To create server group templates or ones for server queries,
use addServerGroup(String, PermissionGroupDatabaseType).
name - the name of the new server groupTS3CommandFailedException - if the execution of a command failsServerGrouppublic CommandFuture<Integer> addServerGroup(String name, PermissionGroupDatabaseType type)
name - the name of the new server grouptype - the desired type of server groupTS3CommandFailedException - if the execution of a command failsServerGroup,
PermissionGroupDatabaseTypepublic CommandFuture<Void> addServerGroupPermission(int groupId, String permName, int value, boolean negated, boolean skipped)
groupId - the ID of the channel group to which the permission should be addedpermName - the name of the permission to addvalue - the numeric value of the permission (or for boolean permissions: 1 = true, 0 = false)negated - if set to true, the lowest permission value will be selected instead of the highestskipped - if set to true, this permission will not be overridden by client or channel group permissionsTS3CommandFailedException - if the execution of a command failsServerGroup.getId(),
Permissionpublic CommandFuture<CreatedQueryLogin> addServerQueryLogin(String loginName, int clientDBId)
loginName for the client specified by clientDBId
on the currently selected virtual server and returns the password of the created login.
If the client already had a server query login, the existing login will be deleted and replaced.
Moreover, this method can be used to create new global server query logins that are not tied to any
particular virtual server or client. To create such a server query login, make sure no virtual server is
selected (e.g. use selectVirtualServerById(0)) and call this method with clientDBId = 0.
loginName - the name of the server query login to addclientDBId - the database ID of the client for which a server query login should be createdTS3CommandFailedException - if the execution of a command failsdeleteServerQueryLogin(int),
getServerQueryLogins(),
updateServerQueryLogin(String)public void addTS3Listeners(TS3Listener... listeners)
TS3Listeners to the event manager of the query.
These listeners will be notified when the TS3 server fires an event.
Note that for the TS3 server to fire events, you must first also register the event types you want to listen to.
listeners - one or more listeners to registerregisterAllEvents(),
registerEvent(TS3EventType, int),
TS3Listener,
TS3EventTypepublic CommandFuture<int[]> banClient(int clientId, long timeInSeconds)
Please note that this will create up to three separate ban rules, one for the targeted client's IP address, one for their unique identifier, and potentially one more entry for their "myTeamSpeak" ID, if available.
Exception: If the banned client connects via a loopback address
(i.e. 127.0.0.1 or localhost), no IP ban is created.
clientId - the ID of the clienttimeInSeconds - the duration of the ban in seconds. 0 equals a permanent banTS3CommandFailedException - if the execution of a command failsClient.getId(),
addBan(String, String, String, long, String)public CommandFuture<int[]> banClient(int clientId, long timeInSeconds, String reason)
Please note that this will create up to three separate ban rules, one for the targeted client's IP address, one for their unique identifier, and potentially one more entry for their "myTeamSpeak" ID, if available.
Exception: If the banned client connects via a loopback address
(i.e. 127.0.0.1 or localhost), no IP ban is created.
clientId - the ID of the clienttimeInSeconds - the duration of the ban in seconds. 0 equals a permanent banreason - the reason for the ban, can be nullTS3CommandFailedException - if the execution of a command failsClient.getId(),
addBan(String, String, String, long, String)public CommandFuture<int[]> banClient(int clientId, String reason)
Please note that this will create up to three separate ban rules, one for the targeted client's IP address, one for their unique identifier, and potentially one more entry for their "myTeamSpeak" ID, if available.
Exception: If the banned client connects via a loopback address
(i.e. 127.0.0.1 or localhost), no IP ban is created.
clientId - the ID of the clientreason - the reason for the ban, can be nullTS3CommandFailedException - if the execution of a command failsClient.getId(),
addBan(String, String, String, long, String)public CommandFuture<int[]> banClients(int[] clientIds, long timeInSeconds, String reason, boolean continueOnError)
Please note that this will create up to three separate ban rules for each client, one for the targeted client's IP address, one for their unique identifier, and potentially one more entry for their "myTeamSpeak" ID, if available.
Exception: If the banned client connects via a loopback address
(i.e. 127.0.0.1 or localhost), no IP ban is created.
Exception: If two or more clients are connecting from the same IP address, only one IP ban entry for that IP will be created.
clientIds - the IDs of the clients to be bannedtimeInSeconds - the duration of the ban in seconds. 0 equals a permanent banreason - the reason for the ban, can be nullcontinueOnError - if true, continue to the next client if banning one client fails, else do not create any bans on errorTS3CommandFailedException - if the execution of a command failsClient.getId(),
addBan(String, String, String, long, String)public CommandFuture<Void> broadcast(String message)
message - the message to be sentTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> copyChannelGroup(int sourceGroupId, int targetGroupId, PermissionGroupDatabaseType type)
sourceGroupId,
overwriting any other channel group specified by targetGroupId.
The parameter type can be used to create server query and template groups.
sourceGroupId - the ID of the channel group to copytargetGroupId - the ID of another channel group to overwritetype - the desired type of channel groupTS3CommandFailedException - if the execution of a command failsChannelGroup.getId()public CommandFuture<Integer> copyChannelGroup(int sourceGroupId, String targetName, PermissionGroupDatabaseType type)
sourceGroupId with a given name
and returns the ID of the newly created channel group.sourceGroupId - the ID of the channel group to copytargetName - the name for the copy of the channel grouptype - the desired type of channel groupTS3CommandFailedException - if the execution of a command failsChannelGroup.getId()public CommandFuture<Integer> copyServerGroup(int sourceGroupId, int targetGroupId, PermissionGroupDatabaseType type)
sourceGroupId,
overwriting another server group specified by targetGroupId.
The parameter type can be used to create server query and template groups.
sourceGroupId - the ID of the server group to copytargetGroupId - the ID of another server group to overwritetype - the desired type of server groupTS3CommandFailedException - if the execution of a command failsServerGroup.getId()public CommandFuture<Integer> copyServerGroup(int sourceGroupId, String targetName, PermissionGroupDatabaseType type)
sourceGroupId with a given name
and returns the ID of the newly created server group.sourceGroupId - the ID of the server group to copytargetName - the name for the copy of the server grouptype - the desired type of server groupTS3CommandFailedException - if the execution of a command failsServerGroup.getId()public CommandFuture<Integer> createChannel(String name, Map<ChannelProperty,String> options)
name - the name for the new channeloptions - a map of options that should be set for the channelTS3CommandFailedException - if the execution of a command failsChannelpublic CommandFuture<Void> createFileDirectory(String directoryPath, int channelId)
directoryPath - the path to the directory that should be createdchannelId - the ID of the channel the directory should be created inTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<Void> createFileDirectory(String directoryPath, int channelId, String channelPassword)
directoryPath - the path to the directory that should be createdchannelId - the ID of the channel the directory should be created inchannelPassword - the password of that channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<CreatedVirtualServer> createServer(String name, Map<VirtualServerProperty,String> options)
If VirtualServerProperty.VIRTUALSERVER_PORT is not specified in the virtual server properties,
the server will test for the first unused UDP port.
Please also note that creating virtual servers usually requires the server query admin account and that there is a limit to how many virtual servers can be created, which is dependent on your license. Unlicensed TS3 server instances are limited to 1 virtual server with up to 32 client slots.
name - the name for the new virtual serveroptions - a map of options that should be set for the virtual serverTS3CommandFailedException - if the execution of a command failsVirtualServerpublic CommandFuture<Snapshot> createServerSnapshot()
Snapshot of the selected virtual server containing all settings,
groups and known client identities. The data from a server snapshot can be
used to restore a virtual servers configuration.TS3CommandFailedException - if the execution of a command failsdeployServerSnapshot(Snapshot)public CommandFuture<Void> deleteAllBans()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> deleteAllComplaints(int clientDBId)
clientDBId - the database ID of the clientTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
Complaintpublic CommandFuture<Void> deleteBan(int banId)
banId - the ID of the ban to deleteTS3CommandFailedException - if the execution of a command failsBan.getId()public CommandFuture<Void> deleteChannel(int channelId)
channelId - the ID of the channel to deleteTS3CommandFailedException - if the execution of a command failsChannel.getId(),
deleteChannel(int, boolean),
kickClientFromChannel(String, int...)public CommandFuture<Void> deleteChannel(int channelId, boolean force)
force is true, the channel will be deleted even if there are clients within,
else the command will fail in this situation.channelId - the ID of the channel to deleteforce - whether clients should be kicked out of the channelTS3CommandFailedException - if the execution of a command failsChannel.getId(),
kickClientFromChannel(String, int...)public CommandFuture<Void> deleteChannelClientPermission(int channelId, int clientDBId, String permName)
channelId - the ID of the channel wherein the permission should be removedclientDBId - the database ID of the clientpermName - the name of the permission to revokeTS3CommandFailedException - if the execution of a command failsChannel.getId(),
Client.getDatabaseId(),
Permission.getName()public CommandFuture<Void> deleteChannelGroup(int groupId)
groupId - the ID of the channel groupTS3CommandFailedException - if the execution of a command failsChannelGroup.getId()public CommandFuture<Void> deleteChannelGroup(int groupId, boolean force)
force is true, the channel group will be deleted even if it still contains clients,
else the command will fail in this situation.groupId - the ID of the channel groupforce - whether the channel group should be deleted even if it still contains clientsTS3CommandFailedException - if the execution of a command failsChannelGroup.getId()public CommandFuture<Void> deleteChannelGroupPermission(int groupId, String permName)
groupId - the ID of the channel grouppermName - the name of the permission to revokeTS3CommandFailedException - if the execution of a command failsChannelGroup.getId(),
Permission.getName()public CommandFuture<Void> deleteChannelPermission(int channelId, String permName)
channelId - the ID of the channelpermName - the name of the permission to revokeTS3CommandFailedException - if the execution of a command failsChannel.getId(),
Permission.getName()@Deprecated public CommandFuture<Void> deleteClientPermission(int clientDBId, String permName)
Use deleteClientPermission(int, IPermissionType)
or deleteClientPermission(int, BPermissionType) instead.
clientDBId - the database ID of the clientpermName - the name of the permission to revokeTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
Permission.getName()public CommandFuture<Void> deleteClientPermission(int clientDBId, IPermissionType permName)
clientDBId - the database ID of the clientpermName - the enum of the permission to revokeTS3CommandFailedException - if the execution of a command failsIPermissionType,
Client.getDatabaseId(),
Permission.getName()public CommandFuture<Void> deleteClientPermission(int clientDBId, BPermissionType permName)
clientDBId - the database ID of the clientpermName - the enum of the permission to revokeTS3CommandFailedException - if the execution of a command failsBPermissionType,
Client.getDatabaseId(),
Permission.getName()public CommandFuture<Void> deleteComplaint(int targetClientDBId, int fromClientDBId)
targetClientDBId submitted by
the client with database ID fromClientDBId from the server.targetClientDBId - the database ID of the client the complaint is aboutfromClientDBId - the database ID of the client who added the complaintTS3CommandFailedException - if the execution of a command failsComplaint,
Client.getDatabaseId()public CommandFuture<Void> deleteCustomClientProperty(int clientDBId, String key)
key custom client property from a client.clientDBId - the database ID of the target clientkey - the key of the custom property to delete, cannot be nullTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId()public CommandFuture<Void> deleteDatabaseClientProperties(int clientDBId)
See DatabaseClientInfo for a list of stored information about a client.
clientDBId - the database ID of the clientTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
getDatabaseClientInfo(int),
DatabaseClientInfopublic CommandFuture<Void> deleteFile(String filePath, int channelId)
filePath - the path to the file or directorychannelId - the ID of the channel the file or directory resides inTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<Void> deleteFile(String filePath, int channelId, String channelPassword)
filePath - the path to the file or directorychannelId - the ID of the channel the file or directory resides inchannelPassword - the password of that channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<Void> deleteFiles(String[] filePaths, int channelId)
filePaths - the paths to the files or directorieschannelId - the ID of the channel the file or directory resides inTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<Void> deleteFiles(String[] filePaths, int channelId, String channelPassword)
filePaths - the paths to the files or directorieschannelId - the ID of the channel the file or directory resides inchannelPassword - the password of that channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<Void> deleteIcon(long iconId)
iconId - the ID of the icon to deleteTS3CommandFailedException - if the execution of a command failsIconFile.getIconId()public CommandFuture<Void> deleteIcons(long... iconIds)
iconIds - the IDs of the icons to deleteTS3CommandFailedException - if the execution of a command failsIconFile.getIconId()public CommandFuture<Void> deleteOfflineMessage(int messageId)
messageId - the ID of the offline message to deleteTS3CommandFailedException - if the execution of a command failsMessage.getId()public CommandFuture<Void> deletePermissionFromAllServerGroups(ServerGroupType type, String permName)
type on all virtual servers.type - the kind of server group this permission should be removed frompermName - the name of the permission to removeTS3CommandFailedException - if the execution of a command failsServerGroupType,
Permission.getName()public CommandFuture<Void> deletePrivilegeKey(String token)
token - the token of the privilege keyTS3CommandFailedException - if the execution of a command failsPrivilegeKeypublic CommandFuture<Void> deleteServer(int serverId)
Only stopped virtual servers can be deleted.
serverId - the ID of the virtual serverTS3CommandFailedException - if the execution of a command failsVirtualServer.getId(),
stopServer(int)public CommandFuture<Void> deleteServerGroup(int groupId)
groupId - the ID of the server groupTS3CommandFailedException - if the execution of a command failsServerGroup.getId()public CommandFuture<Void> deleteServerGroup(int groupId, boolean force)
If force is true, the server group will be deleted even if it contains clients,
else the command will fail in this situation.
groupId - the ID of the server groupforce - whether the server group should be deleted if it still contains clientsTS3CommandFailedException - if the execution of a command failsServerGroup.getId()public CommandFuture<Void> deleteServerGroupPermission(int groupId, String permName)
groupId - the ID of the server grouppermName - the name of the permission to revokeTS3CommandFailedException - if the execution of a command failsServerGroup.getId(),
Permission.getName()public CommandFuture<Void> deleteServerQueryLogin(int clientDBId)
If you only know the name of the server query login, use getServerQueryLoginsByName(String) first.
clientDBId - the client database ID of the server query login (usually the ID of the associated client)TS3CommandFailedException - if the execution of a command failsaddServerQueryLogin(String, int),
getServerQueryLogins(),
updateServerQueryLogin(String)public CommandFuture<Void> deployServerSnapshot(Snapshot snapshot)
snapshot - the snapshot to restoreTS3CommandFailedException - if the execution of a command failscreateServerSnapshot()public CommandFuture<Void> deployServerSnapshot(String snapshot)
snapshot - the snapshot to restoreTS3CommandFailedException - if the execution of a command failscreateServerSnapshot()public CommandFuture<Long> downloadFile(OutputStream dataOut, String filePath, int channelId)
OutputStream.
It is the user's responsibility to ensure that the given OutputStream is
open and to close the stream again once the download has finished.
Note that this method will not read the entire file to memory and can thus download arbitrarily sized files from the file repository.
dataOut - a stream that the downloaded data should be written tofilePath - the path of the file on the file repositorychannelId - the ID of the channel to download the file fromTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
downloadFileDirect(String, int)public CommandFuture<Long> downloadFile(OutputStream dataOut, String filePath, int channelId, String channelPassword)
OutputStream.
It is the user's responsibility to ensure that the given OutputStream is
open and to close the stream again once the download has finished.
Note that this method will not read the entire file to memory and can thus download arbitrarily sized files from the file repository.
dataOut - a stream that the downloaded data should be written tofilePath - the path of the file on the file repositorychannelId - the ID of the channel to download the file fromchannelPassword - that channel's passwordTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
downloadFileDirect(String, int, String)public CommandFuture<byte[]> downloadFileDirect(String filePath, int channelId)
Note that this method will read the entire file to memory. That means that if a file is larger than 231-1 bytes in size, the download will fail.
filePath - the path of the file on the file repositorychannelId - the ID of the channel to download the file fromTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
downloadFile(OutputStream, String, int)public CommandFuture<byte[]> downloadFileDirect(String filePath, int channelId, String channelPassword)
Note that this method will read the entire file to memory. That means that if a file is larger than 231-1 bytes in size, the download will fail.
filePath - the path of the file on the file repositorychannelId - the ID of the channel to download the file fromchannelPassword - that channel's passwordTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
downloadFile(OutputStream, String, int, String)public CommandFuture<Long> downloadIcon(OutputStream dataOut, long iconId)
OutputStream.
It is the user's responsibility to ensure that the given OutputStream is
open and to close the stream again once the download has finished.
dataOut - a stream that the downloaded data should be written toiconId - the ID of the icon that should be downloadedTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonIconFile.getIconId(),
downloadIconDirect(long),
uploadIcon(InputStream, long)public CommandFuture<byte[]> downloadIconDirect(long iconId)
Note that this method will read the entire file to memory.
iconId - the ID of the icon that should be downloadedTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonIconFile.getIconId(),
downloadIcon(OutputStream, long),
uploadIconDirect(byte[])public CommandFuture<Void> editChannel(int channelId, Map<ChannelProperty,String> options)
channelId - the ID of the channel to editoptions - the map of properties to modifyTS3CommandFailedException - if the execution of a command failsChannel.getId()public CommandFuture<Void> editChannel(int channelId, ChannelProperty property, String value)
Note that one can set many properties at once with the overloaded method that takes a map of channel properties and strings.
channelId - the ID of the channel to editproperty - the channel property to modify, make sure it is editablevalue - the new value of the propertyTS3CommandFailedException - if the execution of a command failsChannel.getId(),
editChannel(int, Map)public CommandFuture<Void> editClient(int clientId, Map<ClientProperty,String> options)
Only ClientProperty.CLIENT_DESCRIPTION can be changed for other clients.
To update the current client's properties, use updateClient(Map)
or updateClient(ClientProperty, String).
clientId - the ID of the client to editoptions - the map of properties to modifyTS3CommandFailedException - if the execution of a command failsClient.getId(),
updateClient(Map)public CommandFuture<Void> editClient(int clientId, ClientProperty property, String value)
Only ClientProperty.CLIENT_DESCRIPTION can be changed for other clients.
To update the current client's properties, use updateClient(Map)
or updateClient(ClientProperty, String).
clientId - the ID of the client to editproperty - the client property to modify, make sure it is editablevalue - the new value of the propertyTS3CommandFailedException - if the execution of a command failsClient.getId(),
editClient(int, Map),
updateClient(Map)public CommandFuture<Void> editDatabaseClient(int clientDBId, Map<ClientProperty,String> options)
clientDBId - the database ID of the client to editoptions - the map of properties to modifyTS3CommandFailedException - if the execution of a command failsDatabaseClientInfo,
Client.getDatabaseId()public CommandFuture<Void> editInstance(ServerInstanceProperty property, String value)
IllegalArgumentException will be thrown.property - the property to edit, must be changeablevalue - the new value for the editIllegalArgumentException - if property is not changeableTS3CommandFailedException - if the execution of a command failsServerInstanceProperty.isChangeable()public CommandFuture<Void> editServer(Map<VirtualServerProperty,String> options)
options - the map of properties to editTS3CommandFailedException - if the execution of a command failsVirtualServerPropertypublic CommandFuture<List<Ban>> getBans()
TS3CommandFailedException - if the execution of a command failsBanpublic CommandFuture<List<Binding>> getBindings()
TS3CommandFailedException - if the execution of a command failsBindingpublic CommandFuture<Channel> getChannelByNameExact(String name, boolean ignoreCase)
name - the name of the channelignoreCase - whether the case of the name should be ignorednull if no channel was foundTS3CommandFailedException - if the execution of a command failsChannel,
getChannelsByName(String)public CommandFuture<List<Channel>> getChannelsByName(String name)
name - the name to searchTS3CommandFailedException - if the execution of a command failsChannel,
getChannelByNameExact(String, boolean)public CommandFuture<List<Permission>> getChannelClientPermissions(int channelId, int clientDBId)
channelId - the ID of the channelclientDBId - the database ID of the clientTS3CommandFailedException - if the execution of a command failsChannel.getId(),
Client.getDatabaseId(),
Permissionpublic CommandFuture<List<ChannelGroupClient>> getChannelGroupClients(int channelId, int clientDBId, int groupId)
-1.channelId - restricts the search to the channel with a specified ID. Set to -1 to ignore.clientDBId - restricts the search to the client with a specified database ID. Set to -1 to ignore.groupId - restricts the search to the channel group with the specified ID. Set to -1 to ignore.TS3CommandFailedException - if the execution of a command failsChannel.getId(),
Client.getDatabaseId(),
ChannelGroup.getId(),
ChannelGroupClientpublic CommandFuture<List<ChannelGroupClient>> getChannelGroupClientsByChannelGroupId(int groupId)
groupId - the ID of the channel group whose client / channel assignments should be returned.TS3CommandFailedException - if the execution of a command failsChannelGroup.getId(),
ChannelGroupClient,
getChannelGroupClients(int, int, int)public CommandFuture<List<ChannelGroupClient>> getChannelGroupClientsByChannelId(int channelId)
channelId - the ID of the channel whose channel group assignments should be returned.TS3CommandFailedException - if the execution of a command failsChannel.getId(),
ChannelGroupClient,
getChannelGroupClients(int, int, int)public CommandFuture<List<ChannelGroupClient>> getChannelGroupClientsByClientDBId(int clientDBId)
clientDBId - the database ID of the client whose channel groupTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
ChannelGroupClient,
getChannelGroupClients(int, int, int)public CommandFuture<List<Permission>> getChannelGroupPermissions(int groupId)
groupId - the ID of the channel group.TS3CommandFailedException - if the execution of a command failsChannelGroup.getId(),
Permissionpublic CommandFuture<List<ChannelGroup>> getChannelGroups()
TS3CommandFailedException - if the execution of a command failsChannelGrouppublic CommandFuture<ChannelInfo> getChannelInfo(int channelId)
channelId - the ID of the channelTS3CommandFailedException - if the execution of a command failsChannel.getId(),
ChannelInfopublic CommandFuture<List<Permission>> getChannelPermissions(int channelId)
channelId - the ID of the channelTS3CommandFailedException - if the execution of a command failsChannel.getId(),
Permissionpublic CommandFuture<List<Channel>> getChannels()
TS3CommandFailedException - if the execution of a command failsChannelpublic CommandFuture<Client> getClientByNameExact(String name, boolean ignoreCase)
name - the name of the clientignoreCase - whether the case of the name should be ignorednull if no client was foundTS3CommandFailedException - if the execution of a command failsClient,
getClientsByName(String)public CommandFuture<List<Client>> getClientsByName(String name)
name - the name to searchTS3CommandFailedException - if the execution of a command failsClient,
getClientByNameExact(String, boolean)public CommandFuture<ClientInfo> getClientByUId(String clientUId)
clientUId - the unique identifier of the clientTS3CommandFailedException - if the execution of a command failsClient.getUniqueIdentifier(),
ClientInfopublic CommandFuture<ClientInfo> getClientInfo(int clientId)
clientId - the client ID of the clientTS3CommandFailedException - if the execution of a command failsClient.getId(),
ClientInfopublic CommandFuture<List<Permission>> getClientPermissions(int clientDBId)
clientDBId - the database ID of the clientTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
Permissionpublic CommandFuture<List<Client>> getClients()
TS3CommandFailedException - if the execution of a command failsClientpublic CommandFuture<List<Complaint>> getComplaints()
TS3CommandFailedException - if the execution of a command failsComplaint,
getComplaints(int)public CommandFuture<List<Complaint>> getComplaints(int clientDBId)
clientDBId - the database ID of the clientTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
Complaintpublic CommandFuture<ConnectionInfo> getConnectionInfo()
TS3CommandFailedException - if the execution of a command failsConnectionInfo,
getServerInfo()public CommandFuture<Map<String,String>> getCustomClientProperties(int clientDBId)
clientDBId.clientDBId - the database ID of the target clientTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
searchCustomClientProperty(String),
searchCustomClientProperty(String, String)public CommandFuture<List<DatabaseClientInfo>> getDatabaseClientsByName(String name)
name - the nickname for the clients to matchTS3CommandFailedException - if the execution of a command failsClient.getNickname()public CommandFuture<DatabaseClientInfo> getDatabaseClientByUId(String clientUId)
clientUId - the unique identifier of the clientnull if no client was foundTS3CommandFailedException - if the execution of a command failsClient.getUniqueIdentifier(),
DatabaseClientInfopublic CommandFuture<DatabaseClientInfo> getDatabaseClientInfo(int clientDBId)
clientDBId - the database ID of the clientnull if no client was foundTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
DatabaseClientInfopublic CommandFuture<List<DatabaseClient>> getDatabaseClients()
As this method uses internal commands which can only return 200 clients at once, this method can take quite some time to execute.
Also keep in mind that the client database can easily accumulate several thousand entries.
List of all database clientsTS3CommandFailedException - if the execution of a command failsDatabaseClientpublic CommandFuture<List<DatabaseClient>> getDatabaseClients(int offset, int count)
offset.offset - the index of the first database client to be returned.
Note that this is not a database ID, but an arbitrary, 0-based index.count - the number of database clients that should be returned.
Any integer greater than 200 might cause problems with the connectionList of database clientsTS3CommandFailedException - if the execution of a command failsDatabaseClientpublic CommandFuture<FileInfo> getFileInfo(String filePath, int channelId)
Note that this method does not work on directories and the information returned by this
method is identical to the one returned by getFileList(String, int, String)
filePath - the path to the filechannelId - the ID of the channel the file resides inTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<FileInfo> getFileInfo(String filePath, int channelId, String channelPassword)
Note that this method does not work on directories and the information returned by this
method is identical to the one returned by getFileList(String, int, String)
filePath - the path to the filechannelId - the ID of the channel the file resides inchannelPassword - the password of that channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<List<FileInfo>> getFileInfos(String[] filePaths, int channelId)
Note that this method does not work on directories and the information returned by this
method is identical to the one returned by getFileList(String, int, String)
filePaths - the paths to the fileschannelId - the ID of the channel the file resides inTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<List<FileInfo>> getFileInfos(String[] filePaths, int channelId, String channelPassword)
Note that this method does not work on directories and the information returned by this
method is identical to the one returned by getFileList(String, int, String)
filePaths - the paths to the fileschannelId - the ID of the channel the file resides inchannelPassword - the password of that channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<List<FileInfo>> getFileInfos(String[] filePaths, int[] channelIds, String[] channelPasswords)
Note that this method does not work on directories and the information returned by this
method is identical to the one returned by getFileList(String, int, String)
filePaths - the paths to the files, may not be null and may not contain null elementschannelIds - the IDs of the channels the file resides in, may not be nullchannelPasswords - the passwords of those channels, may be null and may contain null elementsIllegalArgumentException - if the dimensions of filePaths, channelIds and channelPasswords don't matchTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<List<FileListEntry>> getFileList(String directoryPath, int channelId)
directoryPath - the path to the parent directorychannelId - the ID of the channel the directory resides inTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<List<FileListEntry>> getFileList(String directoryPath, int channelId, String channelPassword)
directoryPath - the path to the parent directorychannelId - the ID of the channel the directory resides inchannelPassword - the password of that channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId()public CommandFuture<List<FileTransfer>> getFileTransfers()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<HostInfo> getHostInfo()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<IconFile>> getIconList()
public CommandFuture<InstanceInfo> getInstanceInfo()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<String>> getInstanceLogEntries(int lines)
lines - the amount of log entries to fetch, in the range between 1 and 100.
Returns 100 entries if the argument is not in rangeTS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<String>> getInstanceLogEntries()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<String> getOfflineMessage(int messageId)
messageId - the ID of the message to be readnull if there was no message with that IDTS3CommandFailedException - if the execution of a command failsMessage.getId(),
setMessageRead(int)public CommandFuture<String> getOfflineMessage(Message message)
message - the message to be readnull if there was no message with that IDTS3CommandFailedException - if the execution of a command failsMessage.getId(),
setMessageRead(Message)public CommandFuture<List<Message>> getOfflineMessages()
getOfflineMessage(int) or getOfflineMessage(Message).TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<PermissionAssignment>> getPermissionAssignments(String permName)
permName. The output includes the type and the ID of the client,
channel or group associated with the permission.permName - the name of the permissionTS3CommandFailedException - if the execution of a command failsgetPermissionOverview(int, int)public CommandFuture<Integer> getPermissionIdByName(String permName)
permName.
Note that the use of numeric permission IDs is deprecated and that this API only uses the string variant of the IDs.
permName - the name of the permissionTS3CommandFailedException - if the execution of a command failspublic CommandFuture<int[]> getPermissionIdsByName(String... permNames)
permNames.
Note that the use of numeric permission IDs is deprecated and that this API only uses the string variant of the IDs.
permNames - the names of the permissionsIllegalArgumentException - if permNames is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<PermissionAssignment>> getPermissionOverview(int channelId, int clientDBId)
channelId to 0.channelId - the ID of the channelclientDBId - the database ID of the client to create the overview forTS3CommandFailedException - if the execution of a command failsChannel.getId(),
Client.getDatabaseId()public CommandFuture<List<PermissionInfo>> getPermissions()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<Integer> getPermissionValue(String permName)
permName - the name of the permissionTS3CommandFailedException - if the execution of a command failspublic CommandFuture<int[]> getPermissionValues(String... permNames)
permNames - the names of the permissionsIllegalArgumentException - if permNames is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<PrivilegeKey>> getPrivilegeKeys()
TS3CommandFailedException - if the execution of a command failsaddPrivilegeKey(PrivilegeKeyType, int, int, String),
usePrivilegeKey(String)public CommandFuture<List<ServerGroupClient>> getServerGroupClients(int serverGroupId)
serverGroupId - the ID of the server group for which the clients should be looked upTS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<ServerGroupClient>> getServerGroupClients(ServerGroup serverGroup)
serverGroup - the server group for which the clients should be looked upTS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<Permission>> getServerGroupPermissions(int serverGroupId)
serverGroupId - the ID of the server group for which the permissions should be looked upTS3CommandFailedException - if the execution of a command failsServerGroup.getId(),
getServerGroupPermissions(ServerGroup)public CommandFuture<List<Permission>> getServerGroupPermissions(ServerGroup serverGroup)
serverGroup - the server group for which the permissions should be looked upTS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<ServerGroup>> getServerGroups()
Depending on your permissions, the output may also contain global server query groups and template groups.
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<ServerGroup>> getServerGroupsByClientId(int clientDatabaseId)
clientDatabaseId - the database ID of the client for which the server groups should be looked upTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
getServerGroupsByClient(Client)public CommandFuture<List<ServerGroup>> getServerGroupsByClient(Client client)
client - the client for which the server groups should be looked upTS3CommandFailedException - if the execution of a command failsgetServerGroupsByClientId(int)public CommandFuture<Integer> getServerIdByPort(int port)
port - the port of a virtual serverTS3CommandFailedException - if the execution of a command failsVirtualServer.getPort(),
VirtualServer.getId()public CommandFuture<VirtualServerInfo> getServerInfo()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<QueryLogin>> getServerQueryLogins()
QueryLogin objects describing existing server query loginsTS3CommandFailedException - if the execution of a command failsaddServerQueryLogin(String, int),
deleteServerQueryLogin(int),
getServerQueryLoginsByName(String),
updateServerQueryLogin(String)public CommandFuture<List<QueryLogin>> getServerQueryLoginsByName(String pattern)
pattern - the SQL-like pattern to match the server query login name againstQueryLogin objects describing existing server query loginsTS3CommandFailedException - if the execution of a command failsaddServerQueryLogin(String, int),
deleteServerQueryLogin(int),
getServerQueryLogins(),
updateServerQueryLogin(String)public CommandFuture<Version> getVersion()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<VirtualServer>> getVirtualServers()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<String>> getVirtualServerLogEntries(int lines)
lines - the amount of log entries to fetch, in the range between 1 and 100.
Returns 100 entries if the argument is not in rangeTS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<String>> getVirtualServerLogEntries()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<Boolean> isClientOnline(int clientId)
Please note that there is no guarantee that the client will still be online by the time the next command is executed.
clientId - the ID of the clienttrue if the client is online, false otherwisegetClientInfo(int)public CommandFuture<Boolean> isClientOnline(String clientUId)
Please note that there is no guarantee that the client will still be online by the time the next command is executed.
clientUId - the unique ID of the clienttrue if the client is online, false otherwisegetClientByUId(String)public CommandFuture<Void> kickClientFromChannel(int... clientIds)
clientIds - the IDs of the clients to kickTS3CommandFailedException - if the execution of a command failskickClientFromChannel(Client...),
kickClientFromChannel(String, int...)public CommandFuture<Void> kickClientFromChannel(Client... clients)
clients - the clients to kickTS3CommandFailedException - if the execution of a command failskickClientFromChannel(int...),
kickClientFromChannel(String, Client...)public CommandFuture<Void> kickClientFromChannel(String message, int... clientIds)
message - the reason message to display to the clientsclientIds - the IDs of the clients to kickTS3CommandFailedException - if the execution of a command failsClient.getId(),
kickClientFromChannel(int...),
kickClientFromChannel(String, Client...)public CommandFuture<Void> kickClientFromChannel(String message, Client... clients)
message - the reason message to display to the clientsclients - the clients to kickTS3CommandFailedException - if the execution of a command failskickClientFromChannel(Client...),
kickClientFromChannel(String, int...)public CommandFuture<Void> kickClientFromServer(int... clientIds)
clientIds - the IDs of the clients to kickTS3CommandFailedException - if the execution of a command failsClient.getId(),
kickClientFromServer(Client...),
kickClientFromServer(String, int...)public CommandFuture<Void> kickClientFromServer(Client... clients)
clients - the clients to kickTS3CommandFailedException - if the execution of a command failskickClientFromServer(int...),
kickClientFromServer(String, Client...)public CommandFuture<Void> kickClientFromServer(String message, int... clientIds)
message - the reason message to display to the clientsclientIds - the IDs of the clients to kickTS3CommandFailedException - if the execution of a command failsClient.getId(),
kickClientFromServer(int...),
kickClientFromServer(String, Client...)public CommandFuture<Void> kickClientFromServer(String message, Client... clients)
message - the reason message to display to the clientsclients - the clients to kickTS3CommandFailedException - if the execution of a command failskickClientFromServer(Client...),
kickClientFromServer(String, int...)public CommandFuture<Void> login(String username, String password)
Note that you can also set the login in the TS3Config,
so that you will be logged in right after the connection is established.
username - the username of the server querypassword - the password to useTS3CommandFailedException - if the execution of a command failslogout()public CommandFuture<Void> logout()
TS3CommandFailedException - if the execution of a command failslogin(String, String)public CommandFuture<Void> moveChannel(int channelId, int channelTargetId)
channelTargetId to 0.
This will move the channel right below the specified parent channel, above all other child channels. This command will fail if the channel already has the specified target channel as the parent channel.
channelId - the channel to movechannelTargetId - the new parent channel for the specified channelTS3CommandFailedException - if the execution of a command failsChannel.getId(),
moveChannel(int, int, int)public CommandFuture<Void> moveChannel(int channelId, int channelTargetId, int order)
channelTargetId to 0.
The channel will be ordered below the channel with the ID specified by order.
To move the channel right below the parent channel, set order to 0.
Note that you can't re-order a channel without also changing its parent channel with this method.
Use editChannel(int, ChannelProperty, String) to change ChannelProperty.CHANNEL_ORDER instead.
channelId - the channel to movechannelTargetId - the new parent channel for the specified channelorder - the channel to sort the specified channel belowTS3CommandFailedException - if the execution of a command failsChannel.getId(),
moveChannel(int, int)public CommandFuture<Void> moveClient(int clientId, int channelId)
Consider using moveClients(int[], int) to move multiple clients.
clientId - the ID of the client to movechannelId - the ID of the channel to move the client intoTS3CommandFailedException - if the execution of a command failsClient.getId(),
Channel.getId()public CommandFuture<Void> moveClients(int[] clientIds, int channelId)
true for an empty client ID array.
Use this method instead of moveClient(int, int) for moving
several clients as this will only send 1 command to the server and thus complete faster.
clientIds - the IDs of the clients to move, cannot be nullchannelId - the ID of the channel to move the clients intoIllegalArgumentException - if clientIds is nullTS3CommandFailedException - if the execution of a command failsClient.getId(),
Channel.getId()public CommandFuture<Void> moveClient(Client client, ChannelBase channel)
Consider using moveClients(Client[], ChannelBase) to move multiple clients.
client - the client to move, cannot be nullchannel - the channel to move the client into, cannot be nullIllegalArgumentException - if client or channel is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> moveClients(Client[] clients, ChannelBase channel)
true for an empty client array.
Use this method instead of moveClient(Client, ChannelBase) for moving
several clients as this will only send 1 command to the server and thus complete faster.
clients - the clients to move, cannot be nullchannel - the channel to move the clients into, cannot be nullIllegalArgumentException - if clients or channel is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> moveClient(int clientId, int channelId, String channelPassword)
Consider using moveClients(int[], int, String) to move multiple clients.
clientId - the ID of the client to movechannelId - the ID of the channel to move the client intochannelPassword - the password of the channel, can be nullTS3CommandFailedException - if the execution of a command failsClient.getId(),
Channel.getId()public CommandFuture<Void> moveClients(int[] clientIds, int channelId, String channelPassword)
true for an empty client ID array.
Use this method instead of moveClient(int, int, String) for moving
several clients as this will only send 1 command to the server and thus complete faster.
clientIds - the IDs of the clients to move, cannot be nullchannelId - the ID of the channel to move the clients intochannelPassword - the password of the channel, can be nullIllegalArgumentException - if clientIds is nullTS3CommandFailedException - if the execution of a command failsClient.getId(),
Channel.getId()public CommandFuture<Void> moveClient(Client client, ChannelBase channel, String channelPassword)
Consider using moveClients(Client[], ChannelBase, String) to move multiple clients.
client - the client to move, cannot be nullchannel - the channel to move the client into, cannot be nullchannelPassword - the password of the channel, can be nullIllegalArgumentException - if client or channel is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> moveClients(Client[] clients, ChannelBase channel, String channelPassword)
true for an empty client array.
Use this method instead of moveClient(Client, ChannelBase, String) for moving
several clients as this will only send 1 command to the server and thus complete faster.
clients - the clients to move, cannot be nullchannel - the channel to move the clients into, cannot be nullchannelPassword - the password of the channel, can be nullIllegalArgumentException - if clients or channel is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> moveFile(String oldPath, String newPath, int channelId)
oldPath - the current path to the filenewPath - the desired new pathchannelId - the ID of the channel the file resides inTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId(),
moveFile to a different channelpublic CommandFuture<Void> moveFile(String oldPath, String newPath, int oldChannelId, int newChannelId)
oldPath - the current path to the filenewPath - the desired new patholdChannelId - the ID of the channel the file currently resides innewChannelId - the ID of the channel the file should be moved toTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId(),
moveFile within the same channelpublic CommandFuture<Void> moveFile(String oldPath, String newPath, int channelId, String channelPassword)
oldPath - the current path to the filenewPath - the desired new pathchannelId - the ID of the channel the file resides inchannelPassword - the password of the channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId(),
moveFile to a different channelpublic CommandFuture<Void> moveFile(String oldPath, String newPath, int oldChannelId, String oldPassword, int newChannelId, String newPassword)
oldPath - the current path to the filenewPath - the desired new patholdChannelId - the ID of the channel the file currently resides inoldPassword - the password of the current channelnewChannelId - the ID of the channel the file should be moved tonewPassword - the password of the new channelTS3CommandFailedException - if the execution of a command failsFileInfo.getPath(),
Channel.getId(),
moveFile within the same channelpublic CommandFuture<Void> moveQuery(int channelId)
channelId - the ID of the channel to move the server query intoTS3CommandFailedException - if the execution of a command failsChannel.getId()public CommandFuture<Void> moveQuery(ChannelBase channel)
channel - the channel to move the server query into, cannot be nullIllegalArgumentException - if channel is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> moveQuery(int channelId, String channelPassword)
channelId - the ID of the channel to move the client intochannelPassword - the password of the channel, can be nullTS3CommandFailedException - if the execution of a command failsChannel.getId()public CommandFuture<Void> moveQuery(ChannelBase channel, String channelPassword)
channel - the channel to move the client into, cannot be nullchannelPassword - the password of the channel, can be nullIllegalArgumentException - if channel is nullTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> pokeClient(int clientId, String message)
hh:mm:ss - "Your Nickname" poked you: <your message in green color>
The displayed message length is limited to 100 UTF-8 bytes. If a client has already received a poke message, all subsequent pokes will simply add a line to the already opened popup window and will still play a sound.
clientId - the ID of the client to pokemessage - the message to send, may contain BB codesTS3CommandFailedException - if the execution of a command failsClient.getId()public CommandFuture<Void> registerAllEvents()
This means that the following actions will trigger event notifications:
The limitations to when the query receives notifications about chat events cannot be circumvented.
To be able to process these events in your application, register an event listener.TS3CommandFailedException - if the execution of a command failsaddTS3Listeners(TS3Listener...)public CommandFuture<Void> registerEvent(TS3EventType eventType)
If used with TS3EventType.TEXT_CHANNEL, this will listen to chat events in the current channel.
If used with TS3EventType.CHANNEL, this will listen to all channel events.
To specify a different channel for channel events, use registerEvent(TS3EventType, int).
eventType - the event type to be notified aboutTS3CommandFailedException - if the execution of a command failsaddTS3Listeners(TS3Listener...),
registerEvent(TS3EventType, int),
registerAllEvents()public CommandFuture<Void> registerEvent(TS3EventType eventType, int channelId)
eventType - the event type to be notified aboutchannelId - the ID of the channel to listen to, will be ignored if set to -1.
Can be set to 0 for TS3EventType.CHANNEL to receive notifications about all channel switches.TS3CommandFailedException - if the execution of a command failsChannel.getId(),
addTS3Listeners(TS3Listener...),
registerAllEvents()public CommandFuture<Void> registerEvents(TS3EventType... eventTypes)
If used with TS3EventType.TEXT_CHANNEL, this will listen to chat events in the current channel.
If used with TS3EventType.CHANNEL, this will listen to all channel events.
To specify a different channel for channel events, use registerEvent(TS3EventType, int).
eventTypes - the event types to be notified aboutTS3CommandFailedException - if the execution of a command failsaddTS3Listeners(TS3Listener...),
registerEvent(TS3EventType, int),
registerAllEvents()public CommandFuture<Void> removeClientFromServerGroup(int serverGroupId, int clientDatabaseId)
serverGroupId - the ID of the server groupclientDatabaseId - the database ID of the clientTS3CommandFailedException - if the execution of a command failsServerGroup.getId(),
Client.getDatabaseId(),
removeClientFromServerGroup(ServerGroup, Client)public CommandFuture<Void> removeClientFromServerGroup(ServerGroup serverGroup, Client client)
serverGroup - the server group to remove the client fromclient - the client to remove from the server groupTS3CommandFailedException - if the execution of a command failsremoveClientFromServerGroup(int, int)public void removeTS3Listeners(TS3Listener... listeners)
TS3Listeners to the event manager of the query.
If a listener was not actually registered, it will be ignored and no exception will be thrown.
listeners - one or more listeners to removeaddTS3Listeners(TS3Listener...),
TS3Listener,
TS3EventTypepublic CommandFuture<Void> renameChannelGroup(int channelGroupId, String name)
channelGroupId - the ID of the channel group to renamename - the new name for the channel groupTS3CommandFailedException - if the execution of a command failsChannelGroup.getId(),
renameChannelGroup(ChannelGroup, String)public CommandFuture<Void> renameChannelGroup(ChannelGroup channelGroup, String name)
channelGroup - the channel group to renamename - the new name for the channel groupTS3CommandFailedException - if the execution of a command failsrenameChannelGroup(int, String)public CommandFuture<Void> renameServerGroup(int serverGroupId, String name)
serverGroupId - the ID of the server group to renamename - the new name for the server groupTS3CommandFailedException - if the execution of a command failsServerGroup.getId(),
renameServerGroup(ServerGroup, String)public CommandFuture<Void> renameServerGroup(ServerGroup serverGroup, String name)
serverGroup - the server group to renamename - the new name for the server groupTS3CommandFailedException - if the execution of a command failsrenameServerGroup(int, String)public CommandFuture<String> resetPermissions()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<List<CustomPropertyAssignment>> searchCustomClientProperty(String key)
key custom client property,
and returns the client's database ID and the key and value of the matching custom property.key - the key to search for, cannot be nullTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
searchCustomClientProperty(String, String),
getCustomClientProperties(int)public CommandFuture<List<CustomPropertyAssignment>> searchCustomClientProperty(String key, String valuePattern)
key custom client property matches the
SQL-like pattern valuePattern, and returns the client's database ID and the key and value
of the matching custom property.
Patterns are case insensitive. They support the wildcard characters %, which matches any sequence of
zero or more characters, and _, which matches exactly one arbitrary character.
key - the key to search for, cannot be nullvaluePattern - the pattern that values need to match to be includedTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
searchCustomClientProperty(String),
getCustomClientProperties(int)public CommandFuture<Void> selectVirtualServerById(int id)
id - the ID of the virtual serverTS3CommandFailedException - if the execution of a command failsVirtualServer.getId(),
selectVirtualServerById(int, String),
selectVirtualServerByPort(int),
selectVirtualServer(VirtualServer)public CommandFuture<Void> selectVirtualServerById(int id, String nickname)
The nickname must be between 3 and 30 UTF-8 bytes long. BB codes will be ignored.
id - the ID of the virtual servernickname - the nickname, or null if the nickname should not be setTS3CommandFailedException - if the execution of a command failsVirtualServer.getId(),
selectVirtualServerById(int),
selectVirtualServerByPort(int, String),
selectVirtualServer(VirtualServer, String)public CommandFuture<Void> selectVirtualServerByPort(int port)
port - the voice port of the virtual serverTS3CommandFailedException - if the execution of a command failsVirtualServer.getPort(),
selectVirtualServerById(int),
selectVirtualServerByPort(int, String),
selectVirtualServer(VirtualServer)public CommandFuture<Void> selectVirtualServerByPort(int port, String nickname)
The nickname must be between 3 and 30 UTF-8 bytes long. BB codes will be ignored.
port - the voice port of the virtual servernickname - the nickname, or null if the nickname should not be setTS3CommandFailedException - if the execution of a command failsVirtualServer.getPort(),
selectVirtualServerById(int, String),
selectVirtualServerByPort(int),
selectVirtualServer(VirtualServer, String)public CommandFuture<Void> selectVirtualServer(VirtualServer server)
server - the virtual server to move intoTS3CommandFailedException - if the execution of a command failsselectVirtualServerById(int),
selectVirtualServerByPort(int),
selectVirtualServer(VirtualServer, String)public CommandFuture<Void> selectVirtualServer(VirtualServer server, String nickname)
The nickname must be between 3 and 30 UTF-8 bytes long. BB codes will be ignored.
server - the virtual server to move intonickname - the nickname, or null if the nickname should not be setTS3CommandFailedException - if the execution of a command failsselectVirtualServerById(int, String),
selectVirtualServerByPort(int, String),
selectVirtualServer(VirtualServer)public CommandFuture<Void> sendOfflineMessage(String clientUId, String subject, String message)
The message subject's length is limited to 200 UTF-8 bytes and BB codes in it will be ignored. The message body's length is limited to 4096 UTF-8 bytes and accepts BB codes
clientUId - the unique identifier of the client to send the message tosubject - the subject for the message, may not contain BB codesmessage - the actual message body, may contain BB codesTS3CommandFailedException - if the execution of a command failsClient.getUniqueIdentifier(),
Messagepublic CommandFuture<Void> sendTextMessage(TextMessageTargetMode targetMode, int targetId, String message)
To send a message to all virtual servers, use broadcast(String).
To send an offline message, use sendOfflineMessage(String, String, String).
targetMode - where the message should be sent totargetId - the client ID of the recipient of this message. This value is ignored unless targetMode is CLIENTmessage - the text message to sendTS3CommandFailedException - if the execution of a command failsClient.getId()public CommandFuture<Void> sendChannelMessage(int channelId, String message)
This will move the client into the channel with the specified channel ID, but will not move it back to the original channel!
channelId - the ID of the channel to which the message should be sent tomessage - the text message to sendTS3CommandFailedException - if the execution of a command failssendChannelMessage(String),
Channel.getId()public CommandFuture<Void> sendChannelMessage(String message)
message - the text message to sendTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> sendServerMessage(int serverId, String message)
This will move the client to the virtual server with the specified server ID, but will not move it back to the original virtual server!
serverId - the ID of the virtual server to which the message should be sent tomessage - the text message to sendTS3CommandFailedException - if the execution of a command failssendServerMessage(String),
VirtualServer.getId()public CommandFuture<Void> sendServerMessage(String message)
message - the text message to sendTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> sendPrivateMessage(int clientId, String message)
clientId - the ID of the client to send the message tomessage - the text message to sendTS3CommandFailedException - if the execution of a command failsClient.getId()public CommandFuture<Void> setClientChannelGroup(int groupId, int channelId, int clientDBId)
groupId - the ID of the group the client should joinchannelId - the ID of the channel where the channel group should be assignedclientDBId - the database ID of the client for which the channel group should be setTS3CommandFailedException - if the execution of a command failsChannelGroup.getId(),
Channel.getId(),
Client.getDatabaseId()public CommandFuture<Void> setCustomClientProperties(int clientDBId, Map<String,String> properties)
If any key present in the map already has a value assigned for this client, the existing value will be overwritten. This method does not delete keys not present in the map.
If properties contains an entry with null as its key,
that entry will be ignored and no exception will be thrown.
clientDBId - the database ID of the target clientproperties - the map of properties to set, cannot be nullTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
setCustomClientProperty(int, String, String),
deleteCustomClientProperty(int, String)public CommandFuture<Void> setCustomClientProperty(int clientDBId, String key, String value)
key custom client property for a client.
If there is already an assignment of the key custom client property
for this client, the existing value will be overwritten.
clientDBId - the database ID of the target clientkey - the key of the custom property to set, cannot be nullvalue - the (new) value of the custom property to setTS3CommandFailedException - if the execution of a command failsClient.getDatabaseId(),
setCustomClientProperties(int, Map),
deleteCustomClientProperty(int, String)public CommandFuture<Void> setMessageRead(int messageId)
true for a given message. This will not delete the message.messageId - the ID of the message for which the read flag should be setTS3CommandFailedException - if the execution of a command failssetMessageReadFlag(int, boolean)public CommandFuture<Void> setMessageRead(Message message)
true for a given message. This will not delete the message.message - the message for which the read flag should be setTS3CommandFailedException - if the execution of a command failssetMessageRead(int),
setMessageReadFlag(Message, boolean),
deleteOfflineMessage(int)public CommandFuture<Void> setMessageReadFlag(int messageId, boolean read)
messageId - the ID of the message for which the read flag should be setread - the boolean value to which the read flag should be setTS3CommandFailedException - if the execution of a command failssetMessageRead(int),
setMessageReadFlag(Message, boolean),
deleteOfflineMessage(int)public CommandFuture<Void> setMessageReadFlag(Message message, boolean read)
message - the message for which the read flag should be setread - the boolean value to which the read flag should be setTS3CommandFailedException - if the execution of a command failssetMessageRead(Message),
setMessageReadFlag(int, boolean),
deleteOfflineMessage(int)public CommandFuture<Void> setNickname(String nickname)
The nickname must be between 3 and 30 UTF-8 bytes long. BB codes will be ignored.
nickname - the new nickname, may not be nullTS3CommandFailedException - if the execution of a command failsupdateClient(Map)public CommandFuture<Void> startServer(int serverId)
serverId - the ID of the virtual serverTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> startServer(VirtualServer virtualServer)
virtualServer - the virtual server to startTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> stopServer(int serverId)
serverId - the ID of the virtual serverTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> stopServer(int serverId, String reason)
serverId - the ID of the virtual serverreason - the reason message to display to clients when they are disconnectedTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> stopServer(VirtualServer virtualServer)
virtualServer - the virtual server to stopTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> stopServer(VirtualServer virtualServer, String reason)
virtualServer - the virtual server to stopreason - the reason message to display to clients when they are disconnectedTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> stopServerProcess()
To have permission to use this command, you need to use the server query admin login.
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> stopServerProcess(String reason)
To have permission to use this command, you need to use the server query admin login.
reason - the reason message to display to clients when they are disconnectedTS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> unregisterAllEvents()
TS3CommandFailedException - if the execution of a command failspublic CommandFuture<Void> updateClient(Map<ClientProperty,String> options)
options - the map of properties to updateTS3CommandFailedException - if the execution of a command failsupdateClient(ClientProperty, String),
editClient(int, Map)public CommandFuture<Void> updateClient(ClientProperty property, String value)
Note that one can set many properties at once with the overloaded method that takes a map of client properties and strings.
property - the client property to modify, make sure it is editablevalue - the new value of the propertyTS3CommandFailedException - if the execution of a command failsupdateClient(Map),
editClient(int, Map)public CommandFuture<String> updateServerQueryLogin(String loginName)
This will remove the current login credentials! You won't be logged out, but after disconnecting, the old credentials will no longer work. Make sure to not lock yourselves out!
loginName - the name for the server query loginTS3CommandFailedException - if the execution of a command failsaddServerQueryLogin(String, int),
deleteServerQueryLogin(int),
getServerQueryLogins()public CommandFuture<Void> uploadFile(InputStream dataIn, long dataLength, String filePath, boolean overwrite, int channelId)
dataLength bytes from an open InputStream.
It is the user's responsibility to ensure that the given InputStream is
open and that dataLength bytes can eventually be read from it. The user is
also responsible for closing the stream once the upload has finished.
Note that this method will not read the entire file to memory and can thus upload arbitrarily sized files to the file repository.
dataIn - a stream that contains the data that should be uploadeddataLength - how many bytes should be read from the streamfilePath - the path the file should have after being uploadedoverwrite - if false, fails if there's already a file at filePathchannelId - the ID of the channel to upload the file toTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
uploadFileDirect(byte[], String, boolean, int, String)public CommandFuture<Void> uploadFile(InputStream dataIn, long dataLength, String filePath, boolean overwrite, int channelId, String channelPassword)
dataLength bytes from an open InputStream.
It is the user's responsibility to ensure that the given InputStream is
open and that dataLength bytes can eventually be read from it. The user is
also responsible for closing the stream once the upload has finished.
Note that this method will not read the entire file to memory and can thus upload arbitrarily sized files to the file repository.
dataIn - a stream that contains the data that should be uploadeddataLength - how many bytes should be read from the streamfilePath - the path the file should have after being uploadedoverwrite - if false, fails if there's already a file at filePathchannelId - the ID of the channel to upload the file tochannelPassword - that channel's passwordTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
uploadFileDirect(byte[], String, boolean, int, String)public CommandFuture<Void> uploadFileDirect(byte[] data, String filePath, boolean overwrite, int channelId)
data - the file's data as a byte arrayfilePath - the path the file should have after being uploadedoverwrite - if false, fails if there's already a file at filePathchannelId - the ID of the channel to upload the file toTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
uploadFile(InputStream, long, String, boolean, int)public CommandFuture<Void> uploadFileDirect(byte[] data, String filePath, boolean overwrite, int channelId, String channelPassword)
data - the file's data as a byte arrayfilePath - the path the file should have after being uploadedoverwrite - if false, fails if there's already a file at filePathchannelId - the ID of the channel to upload the file tochannelPassword - that channel's passwordTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonFileInfo.getPath(),
Channel.getId(),
uploadFile(InputStream, long, String, boolean, int, String)public CommandFuture<Long> uploadIcon(InputStream dataIn, long dataLength)
dataLength bytes from an open InputStream.
It is the user's responsibility to ensure that the given InputStream is
open and that dataLength bytes can eventually be read from it. The user is
also responsible for closing the stream once the upload has finished.
Note that unlike the file upload methods, this will read the entire file to memory. This is because the CRC32 hash must be calculated before the icon can be uploaded. That means that all icon files must be less than 231-1 bytes in size.
Uploads that is already stored in memory to the icon directory in the file repository. If this icon has already been uploaded or if a hash collision occurs (CRC32), this command will fail.dataIn - a stream that contains the data that should be uploadeddataLength - how many bytes should be read from the streamTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonIconFile.getIconId(),
uploadIconDirect(byte[]),
downloadIcon(OutputStream, long)public CommandFuture<Long> uploadIconDirect(byte[] data)
data - the icon's data as a byte arrayTS3CommandFailedException - if the execution of a command failsTS3FileTransferFailedException - if the file transfer fails for any reasonIconFile.getIconId(),
uploadIcon(InputStream, long),
downloadIconDirect(long)public CommandFuture<Void> usePrivilegeKey(String token)
token - the privilege key to useTS3CommandFailedException - if the execution of a command failsPrivilegeKey,
addPrivilegeKey(PrivilegeKeyType, int, int, String),
usePrivilegeKey(PrivilegeKey)public CommandFuture<Void> usePrivilegeKey(PrivilegeKey privilegeKey)
privilegeKey - the privilege key to useTS3CommandFailedException - if the execution of a command failsPrivilegeKey,
addPrivilegeKey(PrivilegeKeyType, int, int, String),
usePrivilegeKey(String)public CommandFuture<ServerQueryInfo> whoAmI()
TS3CommandFailedException - if the execution of a command failsgetClientInfo(int)Released under the MIT license.