BUG-7608: Add ActionServiceMetadata and ActionProviderBean
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / ext / RpcServiceMetadata.java
1 /*
2  * Copyright (c) 2016 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.blueprint.ext;
9
10 import java.util.function.Predicate;
11 import org.opendaylight.controller.md.sal.dom.broker.spi.rpc.RpcRoutingStrategy;
12
13 /**
14  * Factory metadata corresponding to the "rpc-service" element that gets an RPC service implementation from
15  * the RpcProviderRegistry and provides it to the Blueprint container.
16  *
17  * @author Thomas Pantelis
18  */
19 final class RpcServiceMetadata extends AbstractInvokableServiceMetadata {
20     RpcServiceMetadata(final String id, final String interfaceName) {
21         super(id, interfaceName);
22     }
23
24     @Override
25     Predicate<RpcRoutingStrategy> rpcFilter() {
26         return s -> !s.isContextBasedRouted();
27     }
28 }