1 package org.opendaylight.controller.sal.connector.api;
3 import java.util.concurrent.Future;
5 import org.opendaylight.yangtools.concepts.Immutable;
7 public interface BindingAwareRpcRouter extends RpcRouter<String, String, String, byte[]> {
10 public Future<org.opendaylight.controller.sal.connector.api.RpcRouter.RpcReply<byte[]>> sendRpc(
11 RpcRequest<String, String, String, byte[]> input);
13 class BindingAwareRequest implements RpcRequest<String, String, String, byte[]>, Immutable {
15 private final BindingAwareRouteIdentifier routingInformation;
16 private final byte[] payload;
18 public BindingAwareRequest(BindingAwareRouteIdentifier routingInformation, byte[] payload) {
20 this.routingInformation = routingInformation;
21 this.payload = payload;
24 public BindingAwareRouteIdentifier getRoutingInformation() {
25 return this.routingInformation;
29 public byte[] getPayload() {
34 class BindingAwareRouteIdentifier implements RouteIdentifier<String, String, String>, Immutable {
36 private final String type;
37 private final String route;
38 private final String content;
40 public BindingAwareRouteIdentifier(String type, String route, String content) {
44 this.content = content;
48 * Java class name of Rpc Context
53 public String getContext() {
58 * String representation of route e.g. node-id
62 public String getRoute() {
67 * Java class name of Rpc Type e.g org.opendaylight.AddFlowInput
71 public String getType() {
76 public int hashCode() {
79 result = prime * result + ((content == null) ? 0 : content.hashCode());
80 result = prime * result + ((route == null) ? 0 : route.hashCode());
81 result = prime * result + ((type == null) ? 0 : type.hashCode());
86 public boolean equals(Object obj) {
91 if (getClass() != obj.getClass())
93 BindingAwareRouteIdentifier other = (BindingAwareRouteIdentifier) obj;
94 if (content == null) {
95 if (other.content != null)
97 } else if (!content.equals(other.content))
100 if (other.route != null)
102 } else if (!route.equals(other.route))
105 if (other.type != null)
107 } else if (!type.equals(other.type))