public class BlaubotAdapterHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOG_TAG |
Constructor and Description |
---|
BlaubotAdapterHelper() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
extractSupportedConnectionTypes(java.util.List<IBlaubotConnector> connectors)
Extracts all supported connection types from a list of connectors
|
static java.util.List<ConnectionMetaDataDTO> |
filterBySupportedAcceptorTypes(java.util.List<ConnectionMetaDataDTO> connectionMetaDataList,
java.util.List<java.lang.String> supportedAcceptorTypes)
Filters a list of connection meta data objects by a list of supported acceptor types (like intersect, but not a set)
|
static java.util.List<IBlaubotConnectionAcceptor> |
getConnectionAcceptors(java.util.List<IBlaubotAdapter> adapters)
Traverses adapters to retrieve all acceptors.
|
static java.util.List<ConnectionMetaDataDTO> |
getConnectionMetaDataList(java.util.List<IBlaubotConnectionAcceptor> acceptors)
Takes acceptors and retrieves their connection meta data objects as a list by
retrieving the meta data and putting them into a single list.
|
static java.util.List<IBlaubotConnector> |
getConnectors(java.util.List<IBlaubotAdapter> adapters)
Traverses adapters to retrieve all connectors from them.
|
static void |
setDiscoveryActivated(BlaubotBeaconService beaconService,
boolean newState)
Calls setDiscoveryActivated on all beacons
|
static void |
startAcceptors(java.util.List<IBlaubotConnectionAcceptor> acceptors) |
static void |
startAcceptorsAndBeacons(java.util.List<IBlaubotConnectionAcceptor> acceptors,
BlaubotBeaconService beaconService) |
static void |
startBeacons(BlaubotBeaconService beaconService) |
static int |
startedCount(java.util.List<IBlaubotConnectionAcceptor> acceptors,
java.util.List<IBlaubotBeacon> beacons)
counts the number of started beacons and acceptors
|
static void |
stopAcceptors(java.util.List<IBlaubotConnectionAcceptor> acceptors) |
static void |
stopAcceptorsAndBeacons(java.util.List<IBlaubotConnectionAcceptor> acceptors,
BlaubotBeaconService beaconService)
blocking until all acceptors and beacons are stopped (if started)
|
static void |
stopBeacons(BlaubotBeaconService beaconService)
blocking until all beacons are stopped (if started)
|
public static final java.lang.String LOG_TAG
public static java.util.List<IBlaubotConnectionAcceptor> getConnectionAcceptors(java.util.List<IBlaubotAdapter> adapters)
adapters
- the adapterspublic static java.util.List<IBlaubotConnector> getConnectors(java.util.List<IBlaubotAdapter> adapters)
adapters
- the adapters to get the connectors frompublic static int startedCount(java.util.List<IBlaubotConnectionAcceptor> acceptors, java.util.List<IBlaubotBeacon> beacons)
acceptors
- null or list of acceptorsbeacons
- null or list of beaconspublic static void setDiscoveryActivated(BlaubotBeaconService beaconService, boolean newState)
beaconService
- the beacon servicenewState
- the new statepublic static void stopAcceptors(java.util.List<IBlaubotConnectionAcceptor> acceptors)
public static void stopAcceptorsAndBeacons(java.util.List<IBlaubotConnectionAcceptor> acceptors, BlaubotBeaconService beaconService)
acceptors
- the acceptorsbeaconService
- the beacon servicepublic static void stopBeacons(BlaubotBeaconService beaconService)
beaconService
- the beacon servicepublic static void startAcceptors(java.util.List<IBlaubotConnectionAcceptor> acceptors)
public static void startBeacons(BlaubotBeaconService beaconService)
public static void startAcceptorsAndBeacons(java.util.List<IBlaubotConnectionAcceptor> acceptors, BlaubotBeaconService beaconService)
public static java.util.List<ConnectionMetaDataDTO> getConnectionMetaDataList(java.util.List<IBlaubotConnectionAcceptor> acceptors)
acceptors
- the acceptors to gather the meta data frompublic static java.util.List<ConnectionMetaDataDTO> filterBySupportedAcceptorTypes(java.util.List<ConnectionMetaDataDTO> connectionMetaDataList, java.util.List<java.lang.String> supportedAcceptorTypes)
connectionMetaDataList
- the list of acceptor meta datasupportedAcceptorTypes
- the list of supported acceptor types to filter ourAcceptorMetaDataListpublic static java.util.List<java.lang.String> extractSupportedConnectionTypes(java.util.List<IBlaubotConnector> connectors)
connectors
- the connectors