Package net.md_5.bungee.api

# Class ServerConnectRequest

java.lang.Object
net.md_5.bungee.api.ServerConnectRequest

public class ServerConnectRequest extends Object
A request to connect a server.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `ServerConnectRequest.Builder`
  Class that sets default properties/adds methods to the lombok builder generated class.
  `static enum`
  `ServerConnectRequest.Result`
  The result from this callback after request has been executed by proxy.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ServerConnectRequest.Builder`
  `builder()`
  `Callback<ServerConnectRequest.Result>`
  `getCallback()`
  Callback to execute post request.
  `int`
  `getConnectTimeout()`
  Timeout in milliseconds for request.
  `ServerConnectEvent.Reason`
  `getReason()`
  Reason for connecting to server.
  `@NonNull ServerInfo`
  `getTarget()`
  Target server to connect to.
  `boolean`
  `isRetry()`
  Should the player be attempted to connect to the next server in their queue if the initial request fails.
  `void`
  `setConnectTimeout(int connectTimeout)`
  Timeout in milliseconds for request.
  `void`
  `setRetry(boolean retry)`
  Should the player be attempted to connect to the next server in their queue if the initial request fails.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### builder

    public static ServerConnectRequest.Builder builder()

  - ### getTarget

    @NonNull public @NonNull ServerInfo getTarget()
    Target server to connect to.

  - ### getReason

    @NonNull public ServerConnectEvent.Reason getReason()
    Reason for connecting to server.

  - ### getCallback

    public Callback<ServerConnectRequest.Result> getCallback()
    Callback to execute post request.

  - ### getConnectTimeout

    public int getConnectTimeout()
    Timeout in milliseconds for request.

  - ### isRetry

    public boolean isRetry()
    Should the player be attempted to connect to the next server in their queue if the initial request fails.

  - ### setConnectTimeout

    public void setConnectTimeout(int connectTimeout)
    Timeout in milliseconds for request.

  - ### setRetry

    public void setRetry(boolean retry)
    Should the player be attempted to connect to the next server in their queue if the initial request fails.