2  * Copyright 2017 Huawei Technologies Co., Ltd.
 
   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
 
   8  *     http://www.apache.org/licenses/LICENSE-2.0
 
  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.
 
  17 package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.activator;
 
  19 import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.api.internalsvc.inf.IVnfmAdapter2DriverMgrService;
 
  20 import org.slf4j.Logger;
 
  21 import org.slf4j.LoggerFactory;
 
  22 import org.springframework.beans.BeansException;
 
  23 import org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor;
 
  31  * @version VFC 1.0 Jan 23, 2017
 
  33 public class RoaVnfmService2DriverMgr implements DestructionAwareBeanPostProcessor {
 
  35     private static final Logger LOG = LoggerFactory.getLogger(RoaVnfmService2DriverMgr.class);
 
  38     public Object postProcessAfterInitialization(Object bean, String name) throws BeansException {
 
  39         if(bean instanceof IVnfmAdapter2DriverMgrService) {
 
  40             IVnfmAdapter2DriverMgrService vnfmAdapterSvc = (IVnfmAdapter2DriverMgrService)bean;
 
  41             vnfmAdapterSvc.register();
 
  42             LOG.info("Successfully Registered to Driver Manager!", RoaVnfmService2DriverMgr.class);
 
  49     public Object postProcessBeforeInitialization(Object bean, String name) throws BeansException {
 
  54     public void postProcessBeforeDestruction(Object bean, String name) throws BeansException {