public enum TransportStrategy

  1. Object
  2. Enum<TransportStrategy>
  3. TransportStrategy

ImplementsComparable<TransportStrategy>

The connection topology a transport session uses. The platforms trade bandwidth against the number of simultaneous links, and this is where an app says which side of that trade it wants.

Enum constants

CLUSTERMany-to-many: every device may connect to every other.
STAROne advertiser, many discoverers.
POINT_TO_POINTExactly one connection on each side, and the highest bandwidth of the three.

Methods

public static TransportStrategy[] values()
public static TransportStrategy valueOf(String name)

Inherited methods

Enum constant details

CLUSTER

CLUSTER
Many-to-many: every device may connect to every other. The most flexible and the slowest per link. Android Strategy.P2P_CLUSTER; the natural fit for MultipeerConnectivity, which is a mesh by nature.

STAR

STAR
One advertiser, many discoverers. The advertiser accepts several connections and each discoverer holds exactly one. Android Strategy.P2P_STAR.

POINT_TO_POINT

POINT_TO_POINT
Exactly one connection on each side, and the highest bandwidth of the three. Android Strategy.P2P_POINT_TO_POINT.

Method details

values

public static TransportStrategy[] values()

valueOf

public static TransportStrategy valueOf(String name)