X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Feos-dom-akka%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Feos%2Fakka%2Fowner%2Fsupervisor%2Fcommand%2FAbstractEntityRequest.java;fp=opendaylight%2Fmd-sal%2Feos-dom-akka%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Feos%2Fakka%2Fowner%2Fsupervisor%2Fcommand%2FAbstractEntityRequest.java;h=b3b4c8cff82e9375286236009e3454c99361de90;hp=0000000000000000000000000000000000000000;hb=fd7bc3ff484b7b0bd72d425d59883f710e397c3f;hpb=5b97f0fb5068bb3eb9b77b4509164707c5f35cd6 diff --git a/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/AbstractEntityRequest.java b/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/AbstractEntityRequest.java new file mode 100644 index 0000000000..b3b4c8cff8 --- /dev/null +++ b/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/AbstractEntityRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.eos.akka.owner.supervisor.command; + +import akka.actor.typed.ActorRef; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.entity.owners.norev.EntityId; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.entity.owners.norev.EntityName; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.entity.owners.norev.EntityType; + +public abstract class AbstractEntityRequest extends OwnerSupervisorRequest { + private static final long serialVersionUID = 1L; + + private final @NonNull EntityType type; + private final @NonNull EntityName name; + + AbstractEntityRequest(final ActorRef replyTo, final EntityId entity) { + super(replyTo); + this.type = entity.requireType(); + this.name = entity.requireName(); + } + + public final @NonNull EntityType getType() { + return type; + } + + public final @NonNull EntityName getName() { + return name; + } +}