Interface EntityConnection.Builder<T extends EntityConnection,B extends EntityConnection.Builder<T,B>>

Type Parameters:
T - the connection type
B - the builder type
All Known Subinterfaces:
HttpEntityConnection.Builder, LocalEntityConnection.Builder, RemoteEntityConnection.Builder
All Known Implementing Classes:
AbstractEntityConnection.AbstractBuilder, DefaultHttpEntityConnectionBuilder, DefaultLocalEntityConnectionBuilder, DefaultRemoteEntityConnectionBuilder
Enclosing interface:
EntityConnection

public static interface EntityConnection.Builder<T extends EntityConnection,B extends EntityConnection.Builder<T,B>>
Builds a self-managing EntityConnection.
See Also:
  • Method Details

    • supports

      boolean supports(String connectionType)
      Parameters:
      connectionType - the connection type
      Returns:
      true if this builder supports the given connection type, e.g. "local", "remote" or "http"
    • user

      B user(User user)
      Parameters:
      user - the user
      Returns:
      this builder instance
    • domain

      B domain(DomainType domain)
      Parameters:
      domain - the domain type to base this connection on
      Returns:
      this builder instance
    • domain

      B domain(Domain domain)
      Sets the domain by instance. Connections which run the domain in-process (a local connection for example) use the given instance directly, instead of resolving one via ServiceLoader from its Domain.type(); other connections use only its Domain.type().
      Parameters:
      domain - the domain instance to base this connection on
      Returns:
      this builder instance
      See Also:
    • clientId

      B clientId(UUID clientId)
      Parameters:
      clientId - the UUID identifying this client connection
      Returns:
      this builder instance
    • clientType

      B clientType(String clientType)
      If no client type is specified, DomainType.name() is used.
      Parameters:
      clientType - a String identifying the client type for this connection
      Returns:
      this builder instance
      See Also:
    • clientVersion

      B clientVersion(@Nullable Version clientVersion)
      Parameters:
      clientVersion - the client version
      Returns:
      this builder instance
    • build

      T build()
      Returns:
      a new EntityConnection instance