Skip to content

Commit

Permalink
review: renamed ProxyActor in gateway to GatewayProxyActor
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Jun 27, 2022
1 parent f369107 commit 5ba29ef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
import akka.japi.pf.ReceiveBuilder;

/**
* Abstract base implementation for a command proxy.
* A command proxy for the Ditto gateway.
*/
public final class ProxyActor extends AbstractActor {
public final class GatewayProxyActor extends AbstractActor {

/**
* The name of this Actor in the ActorSystem.
Expand All @@ -55,7 +55,8 @@ public final class ProxyActor extends AbstractActor {

private final ActorRef statisticsActor;

ProxyActor(final ActorRef pubSubMediator,
@SuppressWarnings("unused")
private GatewayProxyActor(final ActorRef pubSubMediator,
final ActorSelection devOpsCommandsActor,
final ActorRef edgeCommandForwarder) {
this.pubSubMediator = pubSubMediator;
Expand All @@ -65,7 +66,7 @@ public final class ProxyActor extends AbstractActor {
}

/**
* Creates Akka configuration object Props for this ProxyActor.
* Creates Akka configuration object Props for this GatewayProxyActor.
*
* @param pubSubMediator the Pub/Sub mediator to use for subscribing for events.
* @param devOpsCommandsActor the Actor ref to the local DevOpsCommandsActor.
Expand All @@ -76,7 +77,7 @@ public static Props props(final ActorRef pubSubMediator,
final ActorSelection devOpsCommandsActor,
final ActorRef edgeCommandForwarder) {

return Props.create(ProxyActor.class, pubSubMediator, devOpsCommandsActor, edgeCommandForwarder);
return Props.create(GatewayProxyActor.class, pubSubMediator, devOpsCommandsActor, edgeCommandForwarder);
}

static boolean isLiveCommandOrEvent(final Signal<?> signal) {
Expand Down Expand Up @@ -129,7 +130,7 @@ public Receive createReceive() {
.match(Command.class, this::forwardToCommandForwarder)

/* Live Signals */
.match(Signal.class, ProxyActor::isLiveCommandOrEvent, this::forwardToCommandForwarder)
.match(Signal.class, GatewayProxyActor::isLiveCommandOrEvent, this::forwardToCommandForwarder)
.match(Status.Failure.class, failure -> {
Throwable cause = failure.cause();
if (cause instanceof JsonRuntimeException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public Receive createReceive() {
.dittoHeaders(qtr.getDittoHeaders().toBuilder().responseRequired(true).build())
.selectedFields(selectedFieldsWithThingId)
.build();
// delegate to the ThingsAggregatorProxyActor which receives the results via a cluster stream:
// delegate to the ThingsAggregatorProxyActor via the command forwarder -
// which receives the results via a cluster stream:
commandForwarderActor.tell(retrieveThings, getSelf());
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import org.eclipse.ditto.gateway.service.health.DittoStatusAndHealthProviderFactory;
import org.eclipse.ditto.gateway.service.health.GatewayHttpReadinessCheck;
import org.eclipse.ditto.gateway.service.health.StatusAndHealthProvider;
import org.eclipse.ditto.gateway.service.proxy.actors.ProxyActor;
import org.eclipse.ditto.gateway.service.proxy.actors.GatewayProxyActor;
import org.eclipse.ditto.gateway.service.security.authentication.jwt.JwtAuthenticationFactory;
import org.eclipse.ditto.gateway.service.security.authentication.jwt.JwtAuthenticationResultProvider;
import org.eclipse.ditto.gateway.service.streaming.actors.StreamingActor;
Expand Down Expand Up @@ -311,8 +311,8 @@ private ActorRef startProxyActor(final ActorRefFactory actorSystem, final ActorR
final ActorSelection devOpsCommandsActor =
actorSystem.actorSelection(DevOpsRoute.DEVOPS_COMMANDS_ACTOR_SELECTION);

return startChildActor(ProxyActor.ACTOR_NAME,
ProxyActor.props(pubSubMediator, devOpsCommandsActor, edgeCommandForwarder));
return startChildActor(GatewayProxyActor.ACTOR_NAME,
GatewayProxyActor.props(pubSubMediator, devOpsCommandsActor, edgeCommandForwarder));

}

Expand Down

0 comments on commit 5ba29ef

Please sign in to comment.