Skip to content

Commit

Permalink
Remove com.hivemq.mqtt.client2.rx.internal, use package-private visib…
Browse files Browse the repository at this point in the history
…ility instead
  • Loading branch information
SgtSilvio committed Nov 19, 2023
1 parent cdbe7a2 commit bbba2cf
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
import com.hivemq.mqtt.client2.internal.util.Checks;
import com.hivemq.mqtt.client2.reactivestreams.PublisherWithSingle;
import com.hivemq.mqtt.client2.reactivestreams.WithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.internal.WithSingleStrictSubscriber;
import com.hivemq.mqtt.client2.rx.internal.operators.FlowableWithSingleMap;
import com.hivemq.mqtt.client2.rx.internal.operators.FlowableWithSingleMapError;
import com.hivemq.mqtt.client2.rx.internal.operators.FlowableWithSingleObserveOn;
import io.reactivex.rxjava3.annotations.BackpressureKind;
import io.reactivex.rxjava3.annotations.BackpressureSupport;
import io.reactivex.rxjava3.annotations.SchedulerSupport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
* limitations under the License.
*/

package com.hivemq.mqtt.client2.rx.internal.operators;
package com.hivemq.mqtt.client2.rx;

import com.hivemq.mqtt.client2.reactivestreams.WithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.FlowableWithSingle;
import com.hivemq.mqtt.client2.rx.FlowableWithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.internal.WithSingleConditionalSubscriber;
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.internal.util.BackpressureHelper;
import io.reactivex.rxjava3.operators.ConditionalSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@
* limitations under the License.
*/

package com.hivemq.mqtt.client2.rx.internal.operators;
package com.hivemq.mqtt.client2.rx;

import com.hivemq.mqtt.client2.internal.util.Checks;
import com.hivemq.mqtt.client2.reactivestreams.WithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.FlowableWithSingle;
import com.hivemq.mqtt.client2.rx.FlowableWithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.internal.WithSingleConditionalSubscriber;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.operators.ConditionalSubscriber;
Expand All @@ -32,17 +29,17 @@
/**
* @author Silvio Giebl
*/
public class FlowableWithSingleMap<F, S, FM, SM> extends FlowableWithSingleOperator<F, S, FM, SM> {
class FlowableWithSingleMap<F, S, FM, SM> extends FlowableWithSingleOperator<F, S, FM, SM> {

public static <F, S, FM, SM> @NotNull FlowableWithSingleMap<F, S, FM, SM> mapBoth(
static <F, S, FM, SM> @NotNull FlowableWithSingleMap<F, S, FM, SM> mapBoth(
final @NotNull FlowableWithSingle<F, S> source,
final @Nullable Function<? super F, ? extends FM> flowableMapper,
final @NotNull Function<? super S, ? extends SM> singleMapper) {

return new FlowableWithSingleMap<>(source, flowableMapper, singleMapper);
}

public static <F, S, SM> @NotNull FlowableWithSingleMap<F, S, F, SM> mapSingle(
static <F, S, SM> @NotNull FlowableWithSingleMap<F, S, F, SM> mapSingle(
final @NotNull FlowableWithSingle<F, S> source,
final @NotNull Function<? super S, ? extends SM> singleMapper) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@
* limitations under the License.
*/

package com.hivemq.mqtt.client2.rx.internal.operators;
package com.hivemq.mqtt.client2.rx;

import com.hivemq.mqtt.client2.internal.util.Checks;
import com.hivemq.mqtt.client2.reactivestreams.WithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.FlowableWithSingle;
import com.hivemq.mqtt.client2.rx.FlowableWithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.internal.WithSingleConditionalSubscriber;
import io.reactivex.rxjava3.core.FlowableSubscriber;
import io.reactivex.rxjava3.exceptions.CompositeException;
import io.reactivex.rxjava3.exceptions.Exceptions;
Expand All @@ -34,11 +31,11 @@
/**
* @author Silvio Giebl
*/
public class FlowableWithSingleMapError<F, S> extends FlowableWithSingleOperator<F, S, F, S> {
class FlowableWithSingleMapError<F, S> extends FlowableWithSingleOperator<F, S, F, S> {

private final @NotNull Function<? super Throwable, ? extends Throwable> errorMapper;

public FlowableWithSingleMapError(
FlowableWithSingleMapError(
final @NotNull FlowableWithSingle<F, S> source,
final @NotNull Function<? super Throwable, ? extends Throwable> errorMapper) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,23 @@
* limitations under the License.
*/

package com.hivemq.mqtt.client2.rx.internal.operators;
package com.hivemq.mqtt.client2.rx;

import com.hivemq.mqtt.client2.reactivestreams.WithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.FlowableWithSingle;
import io.reactivex.rxjava3.core.Scheduler;
import org.jetbrains.annotations.NotNull;
import org.reactivestreams.Subscriber;

/**
* @author Silvio Giebl
*/
public class FlowableWithSingleObserveOn<F, S> extends FlowableWithSingleOperator<F, S, F, S> {
class FlowableWithSingleObserveOn<F, S> extends FlowableWithSingleOperator<F, S, F, S> {

private final @NotNull Scheduler scheduler;
private final boolean delayError;
private final int bufferSize;

public FlowableWithSingleObserveOn(
FlowableWithSingleObserveOn(
final @NotNull FlowableWithSingle<F, S> source,
final @NotNull Scheduler scheduler,
final boolean delayError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
* limitations under the License.
*/

package com.hivemq.mqtt.client2.rx.internal.operators;
package com.hivemq.mqtt.client2.rx;

import com.hivemq.mqtt.client2.rx.FlowableWithSingle;
import org.jetbrains.annotations.NotNull;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
* limitations under the License.
*/

package com.hivemq.mqtt.client2.rx.internal;
package com.hivemq.mqtt.client2.rx;

import com.hivemq.mqtt.client2.rx.FlowableWithSingleSubscriber;
import io.reactivex.rxjava3.operators.ConditionalSubscriber;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
* limitations under the License.
*/

package com.hivemq.mqtt.client2.rx.internal;
package com.hivemq.mqtt.client2.rx;

import com.hivemq.mqtt.client2.reactivestreams.WithSingleSubscriber;
import com.hivemq.mqtt.client2.rx.FlowableWithSingleSubscriber;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.internal.util.BackpressureHelper;
import org.jetbrains.annotations.NotNull;
Expand All @@ -31,7 +30,7 @@
/**
* @author Silvio Giebl
*/
public class WithSingleStrictSubscriber<F, S> implements FlowableWithSingleSubscriber<F, S>, Subscription {
class WithSingleStrictSubscriber<F, S> implements FlowableWithSingleSubscriber<F, S>, Subscription {

private final @NotNull WithSingleSubscriber<? super F, ? super S> subscriber;
private final @NotNull AtomicReference<@Nullable Subscription> subscription = new AtomicReference<>();
Expand Down

0 comments on commit bbba2cf

Please sign in to comment.