blob: 4810417c80b5e42b6d6334c86ad6f53a03602072 [file] [log] [blame]
Phaneendra Manda1c0061d2015-08-06 12:29:38 +05301/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.pcep.controller.driver;
17
18import org.onosproject.pcep.controller.PccId;
19import org.onosproject.pcep.controller.PcepClient;
20import org.onosproject.pcepio.protocol.PcepMessage;
21
22/**
23 * Responsible for keeping track of the current set Pcep clients
24 * connected to the system.
25 *
26 */
27public interface PcepAgent {
28
29 /**
30 * Add a pcc client that has just connected to the system.
31 *
32 * @param pccId the id of pcc client to add
33 * @param pc the actual pce client object.
34 * @return true if added, false otherwise.
35 */
Sho SHIMIZU5fe04e02015-09-04 15:06:33 -070036 boolean addConnectedClient(PccId pccId, PcepClient pc);
Phaneendra Manda1c0061d2015-08-06 12:29:38 +053037
38 /**
39 * Checks if the activation for this pcc client is valid.
40 *
41 * @param pccId the id of pcc client to check
42 * @return true if valid, false otherwise
43 */
Sho SHIMIZU5fe04e02015-09-04 15:06:33 -070044 boolean validActivation(PccId pccId);
Phaneendra Manda1c0061d2015-08-06 12:29:38 +053045
46 /**
47 * Clear all state in controller client maps for a pcc client that has
48 * disconnected from the local controller. Also release control for
49 * that pccIds client from the global repository. Notify client listeners.
50 *
51 * @param pccIds the id of pcc client to remove.
52 */
Sho SHIMIZU5fe04e02015-09-04 15:06:33 -070053 void removeConnectedClient(PccId pccIds);
Phaneendra Manda1c0061d2015-08-06 12:29:38 +053054
55 /**
56 * Process a message coming from a pcc client.
57 *
58 * @param pccId the id of pcc client the message was received.
59 * @param m the message to process
60 */
Sho SHIMIZU5fe04e02015-09-04 15:06:33 -070061 void processPcepMessage(PccId pccId, PcepMessage m);
Phaneendra Manda1c0061d2015-08-06 12:29:38 +053062
63}