2 * Copyright (c) 2015 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.protocol.rsvp.parser.spi.pojo;
10 import java.util.ServiceLoader;
11 import org.opendaylight.protocol.rsvp.parser.spi.RSVPExtensionProviderActivator;
12 import org.opendaylight.protocol.rsvp.parser.spi.RSVPExtensionProviderContext;
14 public final class ServiceLoaderRSVPExtensionProviderContext {
15 private ServiceLoaderRSVPExtensionProviderContext() {
19 public static RSVPExtensionProviderContext create() {
20 final RSVPExtensionProviderContext ctx = new SimpleRSVPExtensionProviderContext();
22 final ServiceLoader<RSVPExtensionProviderActivator> loader = ServiceLoader
23 .load(RSVPExtensionProviderActivator.class);
24 for (final RSVPExtensionProviderActivator a : loader) {
31 public static RSVPExtensionProviderContext getSingletonInstance() {
32 return Holder.INSTANCE;
35 private static final class Holder {
36 private static final RSVPExtensionProviderContext INSTANCE;