2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
8 package org.opendaylight.controller.sal.core.api;
\r
10 import java.util.Collection;
\r
12 import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
\r
16 * Defines the component of controller and supplies additional metadata. A
\r
17 * component of the controller or application supplies a concrete implementation
\r
18 * of this interface.
\r
20 * A user-implemented component (application) which faciliates the SAL and SAL
\r
21 * services to access infrastructure services or providers' functionality.
\r
25 public interface Consumer {
\r
28 * Callback signaling initialization of the consumer session to the SAL.
\r
30 * The consumer MUST use the session for all communication with SAL or
\r
31 * retrieving SAL infrastructure services.
\r
33 * This method is invoked by {@link Broker#registerConsumer(Consumer)}
\r
36 * Unique session between consumer and SAL.
\r
38 public void onSessionInitiated(ConsumerSession session);
\r
41 * Get a set of implementations of consumer functionality to be registered
\r
42 * into system during the consumer registration to the SAL.
\r
44 * This method is invoked by {@link Broker#registerConsumer(Consumer)}.
\r
46 * @return Set of consumer functionality.
\r
48 public Collection<ConsumerFunctionality> getConsumerFunctionality();
\r
51 * The marker interface for the interfaces describing the consumer
\r
52 * functionality contracts.
\r
56 public interface ConsumerFunctionality {
\r