1 package org.opendaylight.controller.sal.binding.spi;
3 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
4 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
5 import org.opendaylight.yangtools.yang.binding.RpcService;
8 * RpcRouter is responsible for selecting RpcService based on provided routing
9 * context identifier {@link RpcRoutingTable#getContextIdentifier()} and path in
10 * overal data tree (@link {@link InstanceIdentifier}.
13 * @author Tony Tkacik <ttkacik@cisco.com>
16 * Type of RpcService for which router provides routing information
17 * and route selection.
19 public interface RpcRouter<T extends RpcService> {
22 * Returns a type of RpcService which is served by this instance of router.
24 * @return type of RpcService which is served by this instance of router.
26 Class<T> getRpcServiceType();
29 * Returns a routing table for particular route context
32 * @return Routing Table for particular route context.
34 <C extends BaseIdentity> RpcRoutingTable<C, T> getRoutingTable(Class<C> routeContext);
37 * Returns an instance of RpcService which is responsible for processing
43 * Instance Identifier which is used as a selector of instance.
44 * @return instance of RpcService which is responsible for processing
47 T getService(Class<? extends BaseIdentity> context, InstanceIdentifier path);
50 * Returns a default fallback instance of RpcService which is responsible
51 * for handling all unknown imports.
53 * @return default instance responsible for processing RPCs.
55 T getDefaultService();
60 void setDefaultService();