-
Notifications
You must be signed in to change notification settings - Fork 215
/
ProxyActor.java
executable file
·49 lines (41 loc) · 1.69 KB
/
ProxyActor.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Copyright (c) 2017 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.ditto.gateway.service.proxy.actors;
import org.eclipse.ditto.base.model.signals.commands.Command;
import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.Props;
/**
* Actor which delegates {@link Command}s to the appropriate receivers in the cluster.
*/
public final class ProxyActor extends AbstractThingProxyActor {
@SuppressWarnings("unused")
private ProxyActor(final ActorRef pubSubMediator,
final ActorSelection devOpsCommandsActor,
final ActorRef edgeCommandForwarder) {
super(pubSubMediator, devOpsCommandsActor, edgeCommandForwarder);
}
/**
* Creates Akka configuration object Props for this ProxyActor.
*
* @param pubSubMediator the Pub/Sub mediator to use for subscribing for events.
* @param devOpsCommandsActor the Actor ref to the local DevOpsCommandsActor.
* @param edgeCommandForwarder the Actor ref to the {@code EdgeCommandForwarderActor}.
* @return the Akka configuration Props object.
*/
public static Props props(final ActorRef pubSubMediator,
final ActorSelection devOpsCommandsActor,
final ActorRef edgeCommandForwarder) {
return Props.create(ProxyActor.class, pubSubMediator, devOpsCommandsActor, edgeCommandForwarder);
}
}