2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.sal.core.api;
10 import java.util.Collection;
12 import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
16 * Defines the component of controller and supplies additional metadata. A
17 * component of the controller or application supplies a concrete implementation
20 * A user-implemented component (application) which faciliates the SAL and SAL
21 * services to access infrastructure services or providers' functionality.
25 public interface Consumer {
28 * Callback signaling initialization of the consumer session to the SAL.
30 * The consumer MUST use the session for all communication with SAL or
31 * retrieving SAL infrastructure services.
33 * This method is invoked by {@link Broker#registerConsumer(Consumer)}
36 * Unique session between consumer and SAL.
38 public void onSessionInitiated(ConsumerSession session);
41 * Get a set of implementations of consumer functionality to be registered
42 * into system during the consumer registration to the SAL.
44 * This method is invoked by {@link Broker#registerConsumer(Consumer)}.
46 * @return Set of consumer functionality.
48 public Collection<ConsumerFunctionality> getConsumerFunctionality();
51 * The marker interface for the interfaces describing the consumer
52 * functionality contracts.
56 public interface ConsumerFunctionality {