Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
PETALS - PETALS Services Platform. Copyright (c) 2005 EBM Websourcing, http://www.ebmwebsourcing.com/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------- $Id$ -------------------------------------------------------------------------
 
 
 package org.ow2.petals.component.framework.su;
 
 import java.util.List;
 
 
Like SimpleServiceUnitManager but start and stop listeners for external addresses.

Author(s):
ofabre - EBM WebSourcing
 
 
 
     public BindingComponentServiceUnitManager(AbstractBindingComponent bindingComponent) {
         super(bindingComponent);
     }
 
     @Override
     public void init(String serviceUnitNameString suRootPaththrows DeploymentException {
         super.init(serviceUnitNamesuRootPath);
         try {
             .createListeners(serviceUnitName,
                     getConsumesForSU(serviceUnitName));
         } catch (PEtALSCDKException e) {
             String msg = "Failed to initialize SU : " + serviceUnitName;
             this..severe(msg);
             throw new DeploymentException(msge);
         }
 
     }
 
     @Override
     public void start(final String serviceUnitNamethrows DeploymentException {
         super.start(serviceUnitName);
         try {
             .startListening(serviceUnitName);
         } catch (PEtALSCDKException e) {
             String msg = "Failed to start SU : " + serviceUnitName;
             this..severe(msg);
             throw new DeploymentException(msge);
         }
     }
 
     @Override
     public void stop(final String serviceUnitNamethrows DeploymentException {
         // stop the consumption of services for the given SU, as said in the JBI
         // specifications
         try {
             .stopListening(serviceUnitName);
         } catch (PEtALSCDKException e) {
             String msg = "Failed to stop SU : " + serviceUnitName;
             this..severe(msg);
             throw new DeploymentException(msge);
         }
         super.stop(serviceUnitName);
     }
 
     @Override
     public String undeploy(final String serviceUnitNamefinal String serviceUnitRootPath)
             throws DeploymentException {
 
         .removeListeners(serviceUnitName);
 
         return super.undeploy(serviceUnitNameserviceUnitRootPath);
     }
 
     private List<ConsumesgetConsumesForSU(String serviceUnitNamethrows DeploymentException {
         ServiceUnitDataHandler handler = getServiceUnitDataHandlers().get(serviceUnitName);
        if (handler != null) {
            return handler.getDescriptor().getServices().getConsumes();
        } else {
            throw new DeploymentException("No data handler for su : " + serviceUnitName
                    + ". SU not deployed.");
        }
    }
New to GrepCode? Check out our FAQ X