Package io.sentry
Class NoOpConnectionStatusProvider
java.lang.Object
io.sentry.NoOpConnectionStatusProvider
- All Implemented Interfaces:
IConnectionStatusProvider
@Internal
public final class NoOpConnectionStatusProvider
extends Object
implements IConnectionStatusProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sentry.IConnectionStatusProvider
IConnectionStatusProvider.ConnectionStatus, IConnectionStatusProvider.IConnectionStatusObserver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addConnectionStatusObserver
(@NotNull IConnectionStatusProvider.IConnectionStatusObserver observer) Adds an observer for listening to connection status changes.Gets the connection status.@Nullable String
Gets the connection type.void
removeConnectionStatusObserver
(@NotNull IConnectionStatusProvider.IConnectionStatusObserver observer) Removes an observer.
-
Constructor Details
-
NoOpConnectionStatusProvider
public NoOpConnectionStatusProvider()
-
-
Method Details
-
getConnectionStatus
Description copied from interface:IConnectionStatusProvider
Gets the connection status.- Specified by:
getConnectionStatus
in interfaceIConnectionStatusProvider
- Returns:
- the current connection status
-
getConnectionType
Description copied from interface:IConnectionStatusProvider
Gets the connection type.- Specified by:
getConnectionType
in interfaceIConnectionStatusProvider
- Returns:
- the current connection type. E.g. "ethernet", "wifi" or "cellular"
-
addConnectionStatusObserver
public boolean addConnectionStatusObserver(@NotNull @NotNull IConnectionStatusProvider.IConnectionStatusObserver observer) Description copied from interface:IConnectionStatusProvider
Adds an observer for listening to connection status changes.- Specified by:
addConnectionStatusObserver
in interfaceIConnectionStatusProvider
- Parameters:
observer
- the observer to register- Returns:
- true if the observer was sucessfully registered
-
removeConnectionStatusObserver
public void removeConnectionStatusObserver(@NotNull @NotNull IConnectionStatusProvider.IConnectionStatusObserver observer) Description copied from interface:IConnectionStatusProvider
Removes an observer.- Specified by:
removeConnectionStatusObserver
in interfaceIConnectionStatusProvider
- Parameters:
observer
- a previously added observer viaIConnectionStatusProvider.addConnectionStatusObserver(IConnectionStatusObserver)
-