X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fsamples%2Floadbalancer%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsamples%2Floadbalancer%2Fpolicies%2FILoadBalancingPolicy.java;fp=opendaylight%2Fsamples%2Floadbalancer%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsamples%2Floadbalancer%2Fpolicies%2FILoadBalancingPolicy.java;h=d69c63c20081a47e9c654bdeb29b3febccc0806e;hb=bf9ead90c2584be7c6bafff0a49aec3db62f54da;hp=0000000000000000000000000000000000000000;hpb=ee47b04caddbab0695833f13896c978c57a7d3a3;p=controller.git diff --git a/opendaylight/samples/loadbalancer/src/main/java/org/opendaylight/controller/samples/loadbalancer/policies/ILoadBalancingPolicy.java b/opendaylight/samples/loadbalancer/src/main/java/org/opendaylight/controller/samples/loadbalancer/policies/ILoadBalancingPolicy.java new file mode 100644 index 0000000000..d69c63c200 --- /dev/null +++ b/opendaylight/samples/loadbalancer/src/main/java/org/opendaylight/controller/samples/loadbalancer/policies/ILoadBalancingPolicy.java @@ -0,0 +1,29 @@ +/* + * Copyright IBM Corporation, 2013. 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.samples.loadbalancer.policies; + +import org.opendaylight.controller.samples.loadbalancer.entities.Client; +import org.opendaylight.controller.samples.loadbalancer.entities.VIP; + +/** + * All new load balancer policies must implement this interface. + */ +public interface ILoadBalancingPolicy { + + /** + * Returns IP address of the next pool member from the pool + * to which the load balancer service can direct incoming packets. + * @param source source on the packet + * @param dest virtual IP (VIP) that is used as destination on the packet + * @return IP address of the next pool member which will serve + * all incoming traffic destined for the given VIP and with the given source + * information + */ + public String getPoolMemberForClient(Client source, VIP dest); + +} \ No newline at end of file