add documentation to the mapping service TELSDN-568: #close
[lispflowmapping.git] / mappingservice / api / src / main / java / org / opendaylight / lispflowmapping / interfaces / lisp / IGeneralMapServer.java
1 /*
2  * Copyright (c) 2013 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.lispflowmapping.rev131031.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      * This method returns the authentication key of the address.
29      * 
30      * @param address
31      * @param maskLen
32      * @return The correct key.
33      */
34     String getAuthenticationKey(LispAddressContainer address, int maskLen);
35
36     void setShouldIterateMask(boolean shouldIterateMask);
37
38     void setShouldAuthenticate(boolean shouldAuthenticate);
39
40     /**
41      * This method removes the given authentication key from the map server.
42      * 
43      * @param address
44      * @param maskLen
45      * @return
46      */
47     boolean removeAuthenticationKey(LispAddressContainer address, int maskLen);
48
49     /**
50      * This method adds an authentication key to the address.
51      * 
52      * @param address
53      * @param maskLen
54      * @param key
55      * @return
56      */
57     boolean addAuthenticationKey(LispAddressContainer address, int maskLen, String key);
58 }