Simple Load Balancer Application - Recommitting the source codewith the whole source...
[controller.git] / opendaylight / samples / loadbalancer / src / main / java / org / opendaylight / controller / samples / loadbalancer / policies / ILoadBalancingPolicy.java
1 /*
2  * Copyright IBM Corporation, 2013.  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.samples.loadbalancer.policies;
9
10 import org.opendaylight.controller.samples.loadbalancer.entities.Client;
11 import org.opendaylight.controller.samples.loadbalancer.entities.VIP;
12
13 /**
14  * All new load balancer policies must implement this interface.
15  */
16 public interface ILoadBalancingPolicy {
17     
18     /**
19      * Returns IP address of the next pool member from the pool
20      * to which the load balancer service can direct incoming packets.
21      * @param source    source on the packet
22      * @param dest      virtual IP (VIP) that is used as destination on the packet
23      * @return  IP address of the next pool member which will serve
24      *          all incoming traffic destined for the given VIP and with the given source
25      *          information
26      */
27     public String getPoolMemberForClient(Client source, VIP dest);
28     
29 }