@@ -18,7 +18,7 @@ public final class SendCachedEnvelopeFireAndForgetIntegration
1818
1919 private final @ NotNull SendFireAndForgetFactory factory ;
2020 private @ Nullable IConnectionStatusProvider connectionStatusProvider ;
21- private @ Nullable IHub hub ;
21+ private @ Nullable IScopes scopes ;
2222 private @ Nullable SentryOptions options ;
2323 private @ Nullable SendFireAndForget sender ;
2424 private final AtomicBoolean isInitialized = new AtomicBoolean (false );
@@ -35,7 +35,7 @@ public interface SendFireAndForgetDirPath {
3535
3636 public interface SendFireAndForgetFactory {
3737 @ Nullable
38- SendFireAndForget create (@ NotNull IHub hub , @ NotNull SentryOptions options );
38+ SendFireAndForget create (@ NotNull IScopes scopes , @ NotNull SentryOptions options );
3939
4040 default boolean hasValidPath (final @ Nullable String dirPath , final @ NotNull ILogger logger ) {
4141 if (dirPath == null || dirPath .isEmpty ()) {
@@ -66,8 +66,8 @@ public SendCachedEnvelopeFireAndForgetIntegration(
6666 }
6767
6868 @ Override
69- public void register (final @ NotNull IHub hub , final @ NotNull SentryOptions options ) {
70- this .hub = Objects .requireNonNull (hub , "Hub is required" );
69+ public void register (final @ NotNull IScopes scopes , final @ NotNull SentryOptions options ) {
70+ this .scopes = Objects .requireNonNull (scopes , "Hub is required" );
7171 this .options = Objects .requireNonNull (options , "SentryOptions is required" );
7272
7373 final String cachedDir = options .getCacheDirPath ();
@@ -81,7 +81,7 @@ public void register(final @NotNull IHub hub, final @NotNull SentryOptions optio
8181 .log (SentryLevel .DEBUG , "SendCachedEventFireAndForgetIntegration installed." );
8282 addIntegrationToSdkVersion (getClass ());
8383
84- sendCachedEnvelopes (hub , options );
84+ sendCachedEnvelopes (scopes , options );
8585 }
8686
8787 @ Override
@@ -95,14 +95,14 @@ public void close() throws IOException {
9595 @ Override
9696 public void onConnectionStatusChanged (
9797 final @ NotNull IConnectionStatusProvider .ConnectionStatus status ) {
98- if (hub != null && options != null ) {
99- sendCachedEnvelopes (hub , options );
98+ if (scopes != null && options != null ) {
99+ sendCachedEnvelopes (scopes , options );
100100 }
101101 }
102102
103103 @ SuppressWarnings ({"FutureReturnValueIgnored" , "NullAway" })
104104 private synchronized void sendCachedEnvelopes (
105- final @ NotNull IHub hub , final @ NotNull SentryOptions options ) {
105+ final @ NotNull IScopes scopes , final @ NotNull SentryOptions options ) {
106106 try {
107107 options
108108 .getExecutorService ()
@@ -122,7 +122,7 @@ private synchronized void sendCachedEnvelopes(
122122 connectionStatusProvider = options .getConnectionStatusProvider ();
123123 connectionStatusProvider .addConnectionStatusObserver (this );
124124
125- sender = factory .create (hub , options );
125+ sender = factory .create (scopes , options );
126126 }
127127
128128 // skip run only if we're certainly disconnected
@@ -138,7 +138,7 @@ private synchronized void sendCachedEnvelopes(
138138 }
139139
140140 // in case there's rate limiting active, skip processing
141- final @ Nullable RateLimiter rateLimiter = hub .getRateLimiter ();
141+ final @ Nullable RateLimiter rateLimiter = scopes .getRateLimiter ();
142142 if (rateLimiter != null && rateLimiter .isActiveForCategory (DataCategory .All )) {
143143 options
144144 .getLogger ()
0 commit comments