Update DAO API
[lispflowmapping.git] / mappingservice / api / src / main / java / org / opendaylight / lispflowmapping / interfaces / lisp / IGeneralMapServer.java
1 /*
2  * Copyright (c) 2014 Contextream, 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.lispflowmapping.interfaces.lisp;
9
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispaddress.LispAddressContainer;
11
12 /**
13  * The general methods of the map server
14  */
15 public interface IGeneralMapServer {
16
17     /**
18      * @return Should the map server use authentication.
19      */
20     boolean shouldAuthenticate();
21
22     /**
23      * @return Should the map server use masking.
24      */
25     boolean shouldIterateMask();
26
27     /**
28      * @return Should the map server use overwrite.
29      */
30     boolean shouldOverwrite();
31
32     /**
33      * This method returns the authentication key of the address.
34      *
35      * @param address EID to look up
36      * @return The correct key.
37      */
38     String getAuthenticationKey(LispAddressContainer address);
39
40     void setShouldIterateMask(boolean shouldIterateMask);
41
42     void setShouldAuthenticate(boolean shouldAuthenticate);
43
44     void setOverwrite(boolean overwrite);
45
46     /**
47      * This method removes the given authentication key from the map server.
48      *
49      * @param address EID to remove
50      */
51     void removeAuthenticationKey(LispAddressContainer address);
52
53     /**
54      * This method adds an authentication key to the address.
55      *
56      * @param address EID to add
57      * @param key Value of the key for the EID
58      */
59     void addAuthenticationKey(LispAddressContainer address, String key);
60 }