4242@ ModuleDefinition (id = "transfer" , name = "Transfer" )
4343public abstract class TransferModule extends ApolloModule {
4444
45+ /**
46+ * The maximum amount of server IPs the client will ping
47+ * for a single {@link PingRequest}.
48+ *
49+ * @since 1.2.9
50+ */
51+ public static final int MAX_PINGS_PER_PACKET = 10 ;
52+
4553 @ Override
4654 public Collection <ApolloPlatform .Kind > getSupportedPlatforms () {
4755 return Arrays .asList (ApolloPlatform .Kind .SERVER , ApolloPlatform .Kind .PROXY );
@@ -55,6 +63,8 @@ public Collection<ApolloPlatform.Kind> getSupportedPlatforms() {
5563 * @param player the player
5664 * @param serverIps all server IPs to ping
5765 * @return future to be listened to for errors/success
66+ * @throws IllegalArgumentException if no server IPs or more than
67+ * {@value #MAX_PINGS_PER_PACKET} server IPs are provided
5868 * @since 1.0.0
5969 */
6070 public Future <PingResponse > ping (ApolloPlayer player , List <String > serverIps ) {
@@ -85,6 +95,8 @@ public Future<TransferResponse> transfer(ApolloPlayer player, String serverIp) {
8595 * @param player the player
8696 * @param request the ping request
8797 * @return future to be listened to for errors/success
98+ * @throws IllegalArgumentException if no server IPs or more than
99+ * {@value #MAX_PINGS_PER_PACKET} server IPs are provided
88100 * @since 1.0.0
89101 */
90102 public abstract Future <PingResponse > ping (ApolloPlayer player , PingRequest request );
0 commit comments